java.net.BindException: Address already in use: Cannot bind

1,094 views
Skip to first unread message

vargh...@gmail.com

unread,
Oct 11, 2008, 8:57:31 PM10/11/08
to Hazelcast
Hi,

I was trying the sample that comes as a part of the hazelcast-1.2
distribution. I tried to start two instances of the sample
application. One instance came up and is bound to the 5701 port, the
other one gives the BindException, Address already in use. I have
tried to give another port using the xml config file, but the result
is the same bind error.

Has anybody else faced this issue before?

regards
Varghese C V

Talip Ozturk

unread,
Oct 12, 2008, 6:19:56 AM10/12/08
to haze...@googlegroups.com
Hi Varghese,

Is this happening all the time? can you send me the entire stacktrace?
even better a screenshot of the console?

thanks,
-talip

varghese CV

unread,
Oct 12, 2008, 2:49:27 PM10/12/08
to haze...@googlegroups.com
Hi Talip,
Please find attached the console screenshots.

regards
Varghese C V

On Sun, Oct 12, 2008 at 6:19 AM, Talip Ozturk <ozt...@gmail.com> wrote:

Hi Varghese,

Is this happening all the time? can you send me the entire stacktrace?
even better a screenshot of the console?

thanks,
-talip
hazelcast.jpeg

Talip Ozturk

unread,
Oct 13, 2008, 6:31:54 AM10/13/08
to haze...@googlegroups.com
Thanks Varghese,

What is your java -version? can you try it with another JDK/JRE?

thanks,
-talip

vargh...@gmail.com

unread,
Oct 13, 2008, 6:09:49 PM10/13/08
to Hazelcast

This is the java version :
java version "1.5.0_15"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_15-b04)
Java HotSpot(TM) Client VM (build 1.5.0_15-b04, mixed mode, sharing)

I will try with Java 6. What version do you use?

thanks
Varghese



On Oct 13, 6:31 am, "Talip Ozturk" <ozta...@gmail.com> wrote:
> Thanks Varghese,
>
> What is your java -version? can you try it with another JDK/JRE?
>
> thanks,
> -talip
>
> On Sun, Oct 12, 2008 at 9:49 PM, varghese CV <varghese...@gmail.com> wrote:
> > Hi Talip,
> > Please find attached the console screenshots.
>
> > regards
> > Varghese C V
>
> > On Sun, Oct 12, 2008 at 6:19 AM, Talip Ozturk <ozta...@gmail.com> wrote:
>
> >> Hi Varghese,
>
> >> Is this happening all the time? can you send me the entire stacktrace?
> >> even better a screenshot of the console?
>
> >> thanks,
> >> -talip
>

Talip Ozturk

unread,
Oct 14, 2008, 4:47:07 AM10/14/08
to haze...@googlegroups.com
Varghese,

I have 1.5.0_07 and couple of others for testing. but the problem I
think is related to multicast socket reuse. somehow your OS doesn't
like the reuse socket option or doesn't set it at all. with the new
code, I am explicitly setting 'reuse' option. so please try the latest
jar I have sent you directly.

thanks,
-talip

varghese CV

unread,
Oct 14, 2008, 11:19:37 AM10/14/08
to haze...@googlegroups.com
Hi Talip,

I have tried the jar you sent me. Same error. I will try with 1.5.0_07. Meanwhile here is the stake trace and the hz-core file.

thanks
Varghese C V

java.net.BindException: Address already in use: Cannot bind
        at java.net.PlainDatagramSocketImpl.bind0(Native Method)
        at java.net.PlainDatagramSocketImpl.bind(PlainDatagramSocketImpl.java:82)
        at java.net.DatagramSocket.bind(DatagramSocket.java:368)
        at com.hazelcast.impl.Node.init(Node.java:127)
        at com.hazelcast.impl.Node.start(Node.java:155)
        at com.hazelcast.impl.FactoryImpl.init(FactoryImpl.java:70)
        at com.hazelcast.impl.FactoryImpl.getProxy(FactoryImpl.java:156)
        at com.hazelcast.impl.FactoryImpl.getMap(FactoryImpl.java:115)
        at com.hazelcast.core.Hazelcast.getMap(Hazelcast.java:28)
        at TestApp.start(TestApp.java:62)
        at TestApp.main(TestApp.java:58)


hz-core-10.10.10.10_5702.txt

vargh...@gmail.com

unread,
Oct 21, 2008, 5:05:33 PM10/21/08
to Hazelcast
Hi Talip, any update on this error?

Regards
Varghese C V.

Talip Ozturk

unread,
Oct 21, 2008, 5:57:54 PM10/21/08
to haze...@googlegroups.com
Varghese,

I am pretty confident that problem you are experiencing is solvable.
We just need to exchange couple of emails in an hour (or simply
chat). Lets arrange a time to solve that problem. I will send you an
email in private. After the problem is solved, I will write an email
to the group explaining how it is solved.

Regards,
-talip

Alexandre Vasseur

unread,
Oct 22, 2008, 8:06:08 AM10/22/08
to haze...@googlegroups.com
could something like Ethereal help there to capture some packets?
http://thud.ethereal.com/
Also could it be related to socket close pending at the OS level (then netstat may help)
Alex

On Tue, Oct 21, 2008 at 11:57 PM, Talip Ozturk <ozt...@gmail.com> wrote:

Varghese,

I am pretty confident that problem you are experiencing is solvable.
We just need to exchange couple of emails in an hour  (or simply
chat). Lets arrange a time to solve that problem. I will send you an
email in private. After the problem is solved, I will write an email
to the group explaining how it is solved.

Regards,
-talip
Reply all
Reply to author
Forward
0 new messages