apache / apache/incubator-seata

java.io.IOException: Connection reset by peer

Open
#2,992 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
26k
Forks
8.8k
Avg merge
1d 8h
Merged PRs (30d)
4

Description

This is the error from seata-server 1.3.0:

2020-08-08 06:31:29.159 INFO --- [IOWorker_1_1_12] i.s.c.r.n.AbstractNettyRemotingServer : 192.168.3.15:1610 to server channel inactive.
2020-08-08 06:31:29.160 INFO --- [IOWorker_1_1_12] i.s.c.r.n.AbstractNettyRemotingServer : remove channel:[id: 0x7dee8610, L:/192.168.3.31:8091 ! R:/192.168.3.15:1610]context:RpcContext{applicationId='order-service', transactionServiceGroup='my_test_tx_group', clientId='order-service:192.168.3.15:1610', channel=[id: 0x7dee8610, L:/192.168.3.31:8091 ! R:/192.168.3.15:1610], resourceSets=null}
2020-08-08 06:31:29.607 INFO --- [IOWorker_1_3_12] i.s.c.r.n.AbstractNettyRemotingServer : 192.168.3.15:1615 to server channel inactive.
2020-08-08 06:31:29.608 INFO --- [IOWorker_1_3_12] i.s.c.r.n.AbstractNettyRemotingServer : remove channel:[id: 0xa034e409, L:/192.168.3.31:8091 ! R:/192.168.3.15:1615]context:RpcContext{applicationId='storage-service', transactionServiceGroup='my_test_tx_group', clientId='storage-service:192.168.3.15:1615', channel=[id: 0xa034e409, L:/192.168.3.31:8091 ! R:/192.168.3.15:1615], resourceSets=null}
2020-08-08 06:31:30.525 INFO --- [IOWorker_1_2_12] i.s.c.r.n.AbstractNettyRemotingServer : channel exx:Connection reset by peer,channel:[id: 0x8f8233b1, L:/192.168.3.31:8091 - R:/192.168.3.15:1611]
2020-08-08 06:31:30.530 WARN --- [IOWorker_1_2_12] io.netty.channel.DefaultChannelPipeline : 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: Connection reset by peer
at sun.nio.ch.FileDispatcherImpl.read0(Native Method) ~[na:1.8.0_191]
at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39) ~[na:1.8.0_191]
at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223) ~[na:1.8.0_191]
at sun.nio.ch.IOUtil.read(IOUtil.java:192) ~[na:1.8.0_191]
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380) ~[na:1.8.0_191]
at io.netty.buffer.PooledUnsafeDirectByteBuf.setBytes(PooledUnsafeDirectByteBuf.java:288) ~[netty-all-4.1.30.Final.jar:4.1.30.Final]
at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1128) ~[netty-all-4.1.30.Final.jar:4.1.30.Final]
at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:347) ~[netty-all-4.1.30.Final.jar:4.1.30.Final]
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:148) ~[netty-all-4.1.30.Final.jar:4.1.30.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:644) [netty-all-4.1.30.Final.jar:4.1.30.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:579) [netty-all-4.1.30.Final.jar:4.1.30.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:496) [netty-all-4.1.30.Final.jar:4.1.30.Final]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:458) [netty-all-4.1.30.Final.jar:4.1.30.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:897) [netty-all-4.1.30.Final.jar:4.1.30.Final]
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [netty-all-4.1.30.Final.jar:4.1.30.Final]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_191]
<==

Contributor guide

Open the contributing guide

Research direction

Start with the seata-server 1.3.0 log and the reported Java stack trace, focusing on the connection-reset event and the surrounding channel-inactive messages. Determine the cause and expected handling for this failure, then verify that the server no longer produces an unhandled exception or otherwise behaves incorrectly when the peer resets the connection.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend, distributed-systems, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.