AlreadyConnectedException when using netty for client connection
Y. J. Chun
monac3 at gmail.com
Mon Aug 31 07:23:33 EDT 2009
Hello.
I'm using netty to connect to remote server. The connection is
established successfully. But handleUpstream() receives ExceptionEvent
which is java.nio.channels.AlreadyConnectedException. Not sure if
affects the channel in one way or another because connection seems to
be processed without problem. Please tell me if this is normal or
something is wrong.
Exception message is following.
java.nio.channels.AlreadyConnectedException: null
at sun.nio.ch.SocketChannelImpl.ensureOpenAndUnconnected(SocketChannelImpl.java:474)
[na:1.6.0_16]
at sun.nio.ch.SocketChannelImpl.bind(SocketChannelImpl.java:446) [na:1.6.0_16]
at sun.nio.ch.SocketAdaptor.bind(SocketAdaptor.java:132) [na:1.6.0_16]
at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink.bind(NioClientSocketPipelineSink.java:131)
[netty-3.1.0.GA.jar:na]
at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink.eventSunk(NioClientSocketPipelineSink.java:102)
[netty-3.1.0.GA.jar:na]
at <DELETING:My class name> [classes/:na]
at org.jboss.netty.channel.Channels.fireChannelBound(Channels.java:239)
[netty-3.1.0.GA.jar:na]
at org.jboss.netty.channel.socket.nio.NioWorker$RegisterTask.run(NioWorker.java:760)
[netty-3.1.0.GA.jar:na]
at org.jboss.netty.channel.socket.nio.NioWorker.processRegisterTaskQueue(NioWorker.java:260)
[netty-3.1.0.GA.jar:na]
at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:199)
[netty-3.1.0.GA.jar:na]
at org.jboss.netty.util.internal.IoWorkerRunnable.run(IoWorkerRunnable.java:53)
[netty-3.1.0.GA.jar:na]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
[na:1.6.0_16]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
[na:1.6.0_16]
at java.lang.Thread.run(Thread.java:619) [na:1.6.0_16]
channel was created by following bootstrap
bootstrap = new ClientBootstrap(
new NioClientSocketChannelFactory(Executors .newCachedThreadPool()
, Executors.newCachedThreadPool()));
bootstrap.getPipeline().addLast("handler", this);
Thanks.
More information about the netty-users
mailing list