我是Netty的新手,我面临的问题是,Netty工作了几天,5-6天之后它就没有响应。
我检查了日志中的错误,即
Nov 26, 2013 11:58:17 PM com.spciq.eventmanagement.connection.MsgServerHandler exceptionCaught
WARNING: Unexpected exception from downstream.
java.nio.channels.ClosedChannelException
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.cleanUpWriteBuffer(AbstractNioWorker.java:409)
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.writeFromUserCode(AbstractNioWorker.java:127)
at org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink.handleAcceptedSocket(NioServerSocketPipelineSink.java:99)
at org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink.eventSunk(NioServerSocketPipelineSink.java:36)
at org.jboss.netty.channel.Channels.write(Channels.java:725)
at org.jboss.netty.handler.codec.oneone.OneToOneEncoder.doEncode(OneToOneEncoder.java:71)
at org.jboss.netty.handler.codec.oneone.OneToOneEncoder.handleDownstream(OneToOneEncoder.java:59)
at org.jboss.netty.handler.codec.oneone.OneToOneEncoder.handleDownstream(OneToOneEncoder.java:60)
at com.spciq.eventmanagement.connection.MsgUser.notifyUser(MsgUser.java:274)
at com.spciq.eventmanagement.connection.MsgUser.onMessage(MsgUser.java:177)
at com.hazelcast.impl.ListenerManager.callListener(ListenerManager.java:419)
at com.hazelcast.impl.ListenerManager.callListeners(ListenerManager.java:334)
at com.hazelcast.impl.BaseManager$2.run(BaseManager.java:1391)
at com.hazelcast.impl.executor.ParallelExecutorService$ParallelExecutorImpl$ExecutionSegment.run(ParallelExecutorService.java:212)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
at com.hazelcast.impl.ExecutorThreadFactory$1.run(ExecutorThreadFactory.java:38)
有人可以帮我解决这个问题。这影响了我们的Prod Chat客户端
答案 0 :(得分:0)
这意味着在写完所有内容之前,频道已关闭。如果不了解您的应用程序,很难说出问题所在。可能是远程对等方已关闭连接,然后才能将所有内容写出或之前关闭它。