java.net.SocketException Connection reset
See original GitHub issue“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)
Issue Analytics
- State:
- Created 2 years ago
- Comments:16 (7 by maintainers)
Top Results From Across the Web
java.net.SocketException: Connection reset - Stack Overflow
Connection reset simply means that a TCP RST was received. This happens when your peer receives data that it can' ...
Read more >How to resolve java.net.SocketException: Connection reset
This SocketException occurs on the server side when the client closed the socket connection before the response could be returned over the socket....
Read more >How to Fix with java.net.SocketException: Connection reset ...
The java.net.SocketException: Connection reset error usually comes when one of the parties in TCP connection like client or server is trying to read/write...
Read more >How To Fix Internet Exception java.net.socketexception ... - Alphr
1. Click the “Start” menu and search the "Control Panel." 2. Locate and click “Network and Sharing Center.” 3. Press “Network connection” and...
Read more >How does java net SocketException Connection reset happen
The java.net.SocketException: Connection reset error usually comes when one of the parties in TCP connection like client or server is trying to ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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?
The netty-http thing is also logging it as it propagates through the pipeline: https://github.com/cdapio/netty-http/blob/b64b170a86d45bb6bed5ade5a4d59b4b8882f0d9/src/main/java/io/cdap/http/internal/RequestRouter.java#L110-L140
So I suspect no threads are actually crashing, and it’s just messages being logged from places that don’t show up in the stack trace.
I think we can close this.