How do I debug this random connection reset in V4?...
# questions-and-troubleshooting
c
How do I debug this random connection reset in V4? I don't believe the first error
cannot find task. type: PUBLISH_VERSION
is related but I cannot be sure. It is so cryptic and I cannot find anything in BE at all. The problem cannot be reproduced at all and it is so random and infrequent
Copy code
# fe.warn.log

 2025-11-13 16:42:12.256+11:00 WARN (thrift-server-pool-7|199) [LeaderImpl.finishTask():237] cannot find task. type: PUBLISH_VERSION, backendId: 10001, signature: 1930

 2025-11-13 16:42:44.007+11:00 WARN (starrocks-mysql-nio-pool-269|2215) [ReadListener.lambda$handleEvent$0():85] Exception happened in one session(com.starrocks.qe.ConnectContext@5219c15a).
 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 org.xnio.nio.NioSocketConduit.read(NioSocketConduit.java:289)
	at org.xnio.conduits.ConduitStreamSourceChannel.read(ConduitStreamSourceChannel.java:127)
	at org.xnio.channels.Channels.readBlocking(Channels.java:344)
	at com.starrocks.mysql.MysqlChannel.realNetRead(MysqlChannel.java:168)
	at com.starrocks.mysql.MysqlChannel.readAllPlain(MysqlChannel.java:157)
	at com.starrocks.mysql.MysqlChannel.readAll(MysqlChannel.java:150)
	at com.starrocks.mysql.MysqlChannel.fetchOnePacket(MysqlChannel.java:181)
	at com.starrocks.qe.ConnectProcessor.processOnce(ConnectProcessor.java:1006)
	at com.starrocks.mysql.nio.ReadListener.lambda$handleEvent$0(ReadListener.java:71)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:840)
k
search by the java thread id
c
@Kevin Cai Do you mean
Copy code
cd fe
grep --color -rn "starrocks-mysql-nio-pool-497|6581"
If so, I found 3 matches
Copy code
2025-11-14 08:38:51.362+11:00 INFO (starrocks-mysql-nio-pool-497|6581) [AcceptListener.lambda$handleEvent$1():88] Connection scheduled to worker thread 6581. remote=/x.x.x.x:41258, connectionId=16777915

2025-11-14 08:38:51.400+11:00 WARN (starrocks-mysql-nio-pool-497|6581) [ReadListener.lambda$handleEvent$0():85] Exception happened in one session(com.starrocks.qe.ConnectContext@3a98679c).
java.net.SocketException: Connection reset
        at sun.nio.ch.SocketChannelImpl.throwConnectionReset(SocketChannelImpl.java:394) ~[?:?]
        at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:426) ~[?:?]
        at org.xnio.nio.NioSocketConduit.read(NioSocketConduit.java:289) ~[xnio-nio-3.8.16.Final.jar:3.8.16.Final]
        at org.xnio.conduits.ConduitStreamSourceChannel.read(ConduitStreamSourceChannel.java:127) ~[xnio-api-3.8.16.Final.jar:3.8.16.Final]
        at org.xnio.channels.Channels.readBlocking(Channels.java:344) ~[xnio-api-3.8.16.Final.jar:3.8.16.Final]
        at com.starrocks.mysql.MysqlChannel.realNetRead(MysqlChannel.java:168) ~[starrocks-fe.jar:?]
        at com.starrocks.mysql.MysqlChannel.readAllPlain(MysqlChannel.java:157) ~[starrocks-fe.jar:?]
        at com.starrocks.mysql.MysqlChannel.readAll(MysqlChannel.java:150) ~[starrocks-fe.jar:?]
        at com.starrocks.mysql.MysqlChannel.fetchOnePacket(MysqlChannel.java:181) ~[starrocks-fe.jar:?]
        at com.starrocks.qe.ConnectProcessor.processOnce(ConnectProcessor.java:1006) ~[starrocks-fe.jar:?]
        at com.starrocks.mysql.nio.ReadListener.lambda$handleEvent$0(ReadListener.java:71) ~[starrocks-fe.jar:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
        at java.lang.Thread.run(Thread.java:840) ~[?:?]

2025-11-14 08:38:51.403+11:00 INFO (starrocks-mysql-nio-pool-497|6581) [ConnectScheduler.unregisterConnection():183] Connection closed. remote=x.x.x.x:59628, connectionId=16777917, qualifiedUser=root, user.currConn=7
The extra 2 new logs didn't give much to me to debug it.
k
it said the connection is broken, what about the client side?