Netty examples fail to bind

changyh changyh123 at gmail.com
Wed May 4 22:18:28 EDT 2011


I got the following message on console by running echo server on eclipse:
===========================================

Exception in thread "main" org.jboss.netty.channel.ChannelException: Failed
to bind to: 0.0.0.0/0.0.0.0:8080
	at org.jboss.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:303)
	at org.jboss.netty.example.echo.EchoServer.main(EchoServer.java:54)
Caused by: java.net.BindException: Address already in use
	at sun.nio.ch.Net.bind(Native Method)
	at
sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:126)
	at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)
	at
org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink.bind(NioServerSocketPipelineSink.java:146)
	at
org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink.handleServerSocket(NioServerSocketPipelineSink.java:98)
	at
org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink.eventSunk(NioServerSocketPipelineSink.java:72)
	at org.jboss.netty.channel.Channels.bind(Channels.java:469)
	at org.jboss.netty.channel.AbstractChannel.bind(AbstractChannel.java:208)
	at
org.jboss.netty.bootstrap.ServerBootstrap$Binder.channelOpen(ServerBootstrap.java:348)
	at org.jboss.netty.channel.Channels.fireChannelOpen(Channels.java:177)
	at
org.jboss.netty.channel.socket.nio.NioServerSocketChannel.<init>(NioServerSocketChannel.java:85)
	at
org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory.newChannel(NioServerSocketChannelFactory.java:143)
	at
org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory.newChannel(NioServerSocketChannelFactory.java:1)
	at org.jboss.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:282)
	... 1 more


--
View this message in context: http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Netty-examples-fail-to-bind-tp5182800p6332962.html
Sent from the Netty User Group mailing list archive at Nabble.com.


More information about the netty-users mailing list