TiDB Error [ERROR] [terror.go:307] ["encountered error"] [error="write tcp 10.18.13.226:4000->10.18.13.224:28952: write: connection reset by peer"]

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: tidb 报错 [ERROR] [terror.go:307] [“encountered error”] [error=“write tcp 10.18.13.226:4000->10.18.13.224:28952: write: connection reset by peer”]

| username: 裤衩儿飞上天

【TiDB Environment】Test environment
【TiDB Version】5.4.1
【Encountered Problem】
TiDB error [ERROR] [terror.go:307] [“encountered error”] [error=“write tcp 10.18.13.226:4000->10.18.13.224:28952: write: connection reset by peer”]
【Reproduction Path】What operations were performed to cause the problem
【Problem Phenomenon and Impact】
HAProxy is configured with IP pass-through, 10.18.13.224 is the HAProxy IP
[2022/10/30 17:53:12.640 +08:00] [ERROR] [terror.go:307] [“encountered error”] [error=“write tcp 10.18.13.226:4000->10.18.13.224:28952: write: connection reset by peer”] [stack=“github.com/pingcap/tidb/parser/terror.Log\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/parser/terror/terror.go:307\ngithub.com/pingcap/tidb/server.(*Server).onConn\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/server/server.go:516”]
[2022/10/30 17:53:14.643 +08:00] [ERROR] [terror.go:307] [“encountered error”] [error=“write tcp 10.18.13.226:4000->10.18.13.224:28955: write: connection reset by peer”] [stack=“github.com/pingcap/tidb/parser/terror.Log\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/parser/terror/terror.go:307\ngithub.com/pingcap/tidb/server.(*Server).onConn\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/server/server.go:516”]
[2022/10/30 17:53:16.646 +08:00] [ERROR] [terror.go:307] [“encountered error”] [error=“write tcp 10.18.13.226:4000->10.18.13.224:28959: write: connection reset by peer”] [stack=“github.com/pingcap/tidb/parser/terror.Log\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/parser/terror/terror.go:307\ngithub.com/pingcap/tidb/server.(*Server).onConn\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/server/server.go:516”]
[2022/10/30 17:53:18.649 +08:00] [ERROR] [terror.go:307] [“encountered error”] [error=“write tcp 10.18.13.226:4000->10.18.13.224:28962: write: connection reset by peer”] [stack=“github.com/pingcap/tidb/parser/terror.Log\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/parser/terror/terror.go:307\ngithub.com/pingcap/tidb/server.(*Server).onConn\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/server/server.go:516”]
[2022/10/30 17:53:20.651 +08:00] [ERROR] [terror.go:307] [“encountered error”] [error=“write tcp 10.18.13.226:4000->10.18.13.224:28965: write: connection reset by peer”] [stack=“github.com/pingcap/tidb/parser/terror.Log\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/parser/terror/terror.go:307\ngithub.com/pingcap/tidb/server.(*Server).onConn\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/server/server.go:516”]
[2022/10/30 17:53:22.655 +08:00] [ERROR] [terror.go:307] [“encountered error”] [error=“write tcp 10.18.13.226:4000->10.18.13.224:28967: write: connection reset by peer”] [stack=“github.com/pingcap/tidb/parser/terror.Log\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/parser/terror/terror.go:307\ngithub.com/pingcap/tidb/server.(*Server).onConn\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/server/server.go:516”]

| username: xfworld | Original post link

First, provide the cluster configuration information and describe the status of the relevant nodes.
Then, “write tcp 10.18.13.226:4000->10.18.13.224:28952: write: connection reset by peer” - what is the relationship between these two nodes? Please describe clearly.

| username: 裤衩儿飞上天 | Original post link

[Issue Clarification]

[error] write tcp 10.138.1.98:4000->10.130.64.10:36760: write: connection reset by peer

[Cause Analysis]

This indicates that the client disconnected itself, and the message sent by TiDB was not received. TiDB currently does not have a timeout mechanism.

[Solution]

If this message appears frequently in the TiDB logs, it may be because the frontend has a load balancer probing the backend service for liveliness. This is normal information and can be changed to use the status port (default is 10080).

| username: 裤衩儿飞上天 | Original post link

Mark
server web01 172.30.1.106:80 cookie httpd-106 check port 9000 addr 172.30.1.107 inter 3000 fall 3 rise 5

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.