netty 错误

项目场景:

提示:这里简述项目相关背景:


问题描述

提示:这里描述项目中遇到的问题:

七月 28, 2023 11:12:49 上午 org.jboss.netty.channel.SimpleChannelHandler
警告: EXCEPTION, please implement cn.com.onlinetool.jt809.jt.RecevieHandler.exceptionCaught() for proper handling.
java.nio.channels.ClosedChannelException
	at org.jboss.netty.channel.socket.nio.AbstractNioWorker.cleanUpWriteBuffer(AbstractNioWorker.java:433)
	at org.jboss.netty.channel.socket.nio.AbstractNioWorker.writeFromUserCode(AbstractNioWorker.java:128)
	at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink.eventSunk(NioClientSocketPipelineSink.java:84)
	at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendDownstream(DefaultChannelPipeline.java:779)
	at org.jboss.netty.channel.SimpleChannelHandler.writeRequested(SimpleChannelHandler.java:292)
	at org.jboss.netty.channel.SimpleChannelHandler.handleDownstream(SimpleChannelHandler.java:254)
	at org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:591)
	at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendDownstream(DefaultChannelPipeline.java:784)
	at org.jboss.netty.channel.SimpleChannelHandler.writeRequested(SimpleChannelHandler.java:292)
	at org.jboss.netty.channel.SimpleChannelHandler.handleDownstream(SimpleChannelHandler.java:254)
	at org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:591)
	at org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:582)
	at org.jboss.netty.channel.Channels.write(Channels.java:704)
	at org.jboss.netty.channel.Channels.write(Channels.java:671)
	at org.jboss.netty.channel.AbstractChannel.write(AbstractChannel.java:347)
	at cn.com.onlinetool.jt809.jt.TcpClientDemo.sendMsg2Gov(TcpClientDemo.java:114)
	at cn.com.onlinetool.jt809.jt.TcpClientDemo.main(TcpClientDemo.java:283)

原因分析:

提示:这里填写问题的分析:


解决方案:

提示:这里填写该问题的具体解决方案:

如果报错,先把原来的网络管道socketchannel关闭,重新创建管道并连接服务端,注意不是创建客户端对象而是管道

你可能感兴趣的:(服务器,运维)