孤独的狼
1
【 TiDB 使用环境】生产环境
An error occurred using the connection to database ‘ProdRe’ on server ‘172.*’.
【 TiDB 版本】
v4.0.9
【复现路径】做过哪些操作出现的问题
jdbc连接数据库报错,不是直接连接就报错
An error occurred using the connection to database ‘ProdRe’ on server ‘172.*’.
【遇到的问题:问题现象及影响】
【资源配置】
【附件:截图/日志/监控】
Hacker_小峰
(Hacker F Cd Ju Sse)
2
账号权限什么样?会不会是 172.* 的机器没有这个库的权限?
孤独的狼
3
不是权限的问题。是一段时间连接不上,正常是可以连接的。感觉是长连接的问题。我对于tidb连接的不多
,不知道是不是这方便的参数导致的连接超时,断开了连接
孤独的狼
4
[2022/11/14 10:34:44.168 +08:00]
[INFO] [conn.go:793] [“command dispatched failed”] [conn=1617584] [connInfo=“id:1617584, addr:172.:44714 status:11, collation:utf8mb4_general_ci, user:app_tidb"] [command=Query] [status=“inTxn:1, autocommit:1”] [sql=“INSERT INTO OrderAddServiceRecommandOperationLog
(CreationTime
, OperationPoint
, OperationType
, OperatorId
, OrderId
, OrderUserType
, Platform
)\nVALUES (timestamp(‘2022-11-14 10:34:21.614388’), 1, 1, ‘27886’, ‘1206554826’, 2, 1010967);\nSELECT Id
\nFROM OrderAddServiceRecommandOperationLog
\nWHERE ROW_COUNT() = 1 AND Id
= LAST_INSERT_ID();\n\n”] [txn_mode=PESSIMISTIC] [err="write tcp 172.33.6.60:4000->172.:44714: write: connection reset by peer\ngithub.com/pingcap/errors.AddStack\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/pkg/mod/github.com/pingcap/errors@v0.11.5-0.20201029093017-5a7df2af2ac7/errors.go:174\ngithub.com/pingcap/errors.Trace\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/pkg/mod/github.com/pingcap/errors@v0.11.5-0.20201029093017-5a7df2af2ac7/juju_adaptor.go:15\ngithub.com/pingcap/tidb/server.(*packetIO).flush\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/server/packetio.go:172\ngithub.com/pingcap/tidb/server.(*clientConn).flush\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/server/conn.go:1054\ngithub.com/pingcap/tidb/server.(*clientConn).writeOkWith\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/server/conn.go:1087\ngithub.com/pingcap/tidb/server.(*clientConn).writeMultiResultset\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/server/conn.go:1666\ngithub.com/pingcap/tidb/server.(*clientConn).handleQuery\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/server/conn.go:1400\ngithub.com/pingcap/tidb/server.(*clientConn).dispatch\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/server/conn.go:1005\ngithub.com/pingcap/tidb/server.(*clientConn).Run\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/server/conn.go:778\ngithub.com/pingcap/tidb/server.(*Server).onConn\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/server/server.go:439\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1357”]
tidb 用mysql的jdbc 有错误 你用tidb 自己的jdbc
如果偶然发现连不上或者拒绝断开 应该是tidb压力太大了