Netty examples fail to bind

Tristan Sloughter kungfooguru at gmail.com
Thu Jun 17 10:43:07 EDT 2010


It is definitely the server. I told the client to use port 8083, just to see
what the error is and its still:

Exception in thread "main" org.jboss.netty.channel.ChannelException: Failed
to bind to: 0.0.0.0/0.0.0.0:8080

Also, I have this on both my Ubuntu laptop and a Centos workstation when
trying to run the examples in Eclipse.

Tristan

2010/6/17 Marc-André Laverdière <marcandre.laverdiere at gmail.com>

> Are you sure its the server socket that throws that exception, or is
> it the client(s)?
>
> The reason I'm asking that is that I had that kind of exception with
> client sockets with multiple threads (that was using JNDI)... the
> client sockets somehow wanted to all be on the same port and it was
> throwing that exception. The solution was to synchronize that bit of
> code.
>
> It feels like a VM issue... how come it doesn't pick a random port in
> an atomic way?
>
> Marc-André LAVERDIÈRE
> "Perseverance must finish its work so that you may be mature and
> complete, not lacking anything." -James 1:4
> mlaverd.theunixplace.com/blog
>
>  /"\
>  \ /    ASCII Ribbon Campaign
>  X      against HTML e-mail
>  / \
>
>
>
> 2010/6/17 "이희승 (Trustin Lee)" <trustin at gmail.com>:
> > Hi Tristan,
> >
> > That's a problem I have never heard before..  Please let me know once
> > you got to know how to reproduce the problem reliably in different
> machines.
> >
> > Thanks,
> > Trustin
> >
> > On 06/16/2010 01:48 AM, kungfooguru wrote:
> >>
> >> I am attempting to use the examples that come with the Netty source
> code.
> >> I've loaded them up in Eclipse and started with the Echo example. The
> server
> >> appears to start fine and the ThroughputMonitor begins to write to the
> >> console. The server does not throw any exceptions until I attempt to
> connect
> >> with the echo client and the exception is 'Exception in thread "main"
> >> org.jboss.netty.channel.ChannelException: Failed to bind to: ... Caused
> by:
> >> java.net.BindException: Address already in use'. I've tried different
> ports
> >> and I have checked through netstat to see that they aren't being used
> before
> >> trying but it still happens... Even weirder is that this isn't thrown
> till I
> >> run the client. I no idea at all how a client can cause that to happen,
> >> haha. If it can't bind to the port it should never know the client is
> >> sending something to it!
> >>
> >> Any help would much appreciated.
> >>
> >> Thanks,
> >> Tristan
> >
> > --
> > what we call human nature in actuality is human habit
> > http://gleamynode.net/
> >
> >
> > _______________________________________________
> > netty-users mailing list
> > netty-users at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/netty-users
> >
>
> _______________________________________________
> netty-users mailing list
> netty-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/netty-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/netty-users/attachments/20100617/759733ef/attachment.html 


More information about the netty-users mailing list