An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means
2016-08-31 16:06
483 查看
问题描述:
我这里问题发生原因是服务端未给客户端回应消息前客户端提前关闭连接造成。
解决方案:
警告: An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception. java.io.IOException: 远程主机强迫关闭了一个现有的连接。 at sun.nio.ch.SocketDispatcher.read0(Native Method) at sun.nio.ch.SocketDispatcher.read(Unknown Source) at sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source) at sun.nio.ch.IOUtil.read(Unknown Source) at sun.nio.ch.SocketChannelImpl.read(Unknown Source) at io.netty.buffer.UnpooledUnsafeDirectByteBuf.setBytes(UnpooledUnsafeDirectByteBuf.java:446) at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:871) at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:208) at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:119) at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:485) at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:452) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:346) at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:794) at java.lang.Thread.run(Unknown Source)
我这里问题发生原因是服务端未给客户端回应消息前客户端提前关闭连接造成。
解决方案:
@Override public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { super.exceptionCaught(ctx, cause); Channel channel = ctx.channel(); //…… if(channel.isActive())ctx.close(); }
相关文章推荐
- Getting the ID of the element that fired an event using jQuery
- java.lang.NullPointerException: Expected timestamp in the Flume event headers, but it was null
- EventBusException: Subscriber class *** and its super classes have no public methods with the @Subsc
- What are the different versions of JSF and when was it released?
- Trick:Auto start it at the end of installing an application(Symbian)
- It is possible that this issue is resolved by uninstalling an existing version of the apk if it is present, and then re-installing ___Error Installing APK
- Installation failed with message...It is possible that this issue is resolved by uninstalling an existing version of the apk if it is present, and then re-installing.
- EventBusException: Subscriber class *** and its super classes have no public methods with the @Subsc
- java.lang.NullPointerException: Expected timestamp in the Flume event headers, but it was null
- java.lang.NullPointerException: Expected timestamp in the Flume event headers, but it was null
- java.lang.NullPointerException: Expected timestamp in the Flume event headers, but it was null
- struts2 <debug>标签报错:Caught an exception while getting the property values of null
- EventBusException: Subscriber class *** and its super classes have no public methods with the @Subsc
- Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 500 解决办法
- Get the Degree of Angle Between Hour and Minute Hand of a Clock at Anytime
- Get the Degree of Angle Between Hour and Minute Hand of a Clock at Anytime
- EJB3 Exception:identifier of an instance of net.model.entity.Role was altered from 2 to 0
- Noticed a strange thing the other day, a list has the property ItemCount and also an Items collection which has its own .Count b
- The run order about Loaded event and OnApplyTemplate in custom control of Silverlight 2 beta 2
- EJB3 Exception:identifier of an instance of net.model.entity.Role was altered from 2 to 0