netty: java.net.SocketException Connection reset
“java.net.SocketException Connection reset” is not handlet correctly inside of netty.
Leading to thread crashes using [netty-4.1.72] (https://github.com/netty/netty/releases/tag/netty-4.1.72.Final)
java.net.SocketException: Connection reset
at java.base/sun.nio.ch.SocketChannelImpl.throwConnectionReset(SocketChannelImpl.java:394)
at java.base/sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:426)
at io.netty.buffer.PooledByteBuf.setBytes(PooledByteBuf.java:253)
at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1132)
at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:350)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:151)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:722)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:658)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:584)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:496)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 16 (7 by maintainers)
Im having issues with the exact same problem on our tcp server, this connection reset problem: https://i.stack.imgur.com/vRlCH.png
It can happen at anytime and very hard to reproduce, sometimes during the serverhandler part and sometimes even before the initation of decoderheader and tcpserverhandler inside the TCPserver class that holds the runTCP. It started happening last week, never had any problems with this isse since 2021 - august, we have not changed the network code only data proccessing inside decoderheader. Have you any new information about this?