Skip to content

dble执行语句后报“the dbInstance[xxxx] can't reach. Please check the dbInstance status” #2888

Answered by PanternBao
PanternBao asked this question in Q&A
Discussion options

You must be logged in to vote

当出现上述问题时,表明dble中对这个实例的心跳是不正常。

首先应该检查后端MySQL节点是否确实存在问题

如果MySQL节点正常,从dble侧来排查:

1. 收集dble.log以及wrapper.log辅助排查,wrapper.log的日志需要先关注

2. dble提供了以下管理命令观察

  1. 可以通过dble提供的管理端命令查看各个dbInstance的心跳状态

https://github.com/actiontech/dble-docs-cn/blob/master/2.Function/2.1_manager_cmd/2.1.03_show.md#21326--show-heartbeat

上面的命令会将所有实例的心跳信息展现出来,需要关注返回结果的 RS_CODE 和 RS_MESSAG 两列:

  • 当RS_CODE为INIT, OK, TIMEOUT时,message为null,
  • 只有当RS_CODE为ERROR时,message才会显示最近一次心跳失败的信息
  1. 通过下面的命令查看心跳连接的状态,通过 used_for_heartbeat = ‘true’过滤出

https://github.com/actiontech/dble-docs-cn/blob/master/2.Function/2.001_manager_dble_information.md#20112-backend_connections

下面列举了RS_CODE异常时的常见原因

当RS_CODE为ERROR时,具体可以通过message来判断失败的原因,下面列举常见的:

  • M…

Replies: 2 comments

Comment options

PanternBao
Sep 26, 2021
Collaborator Author

You must be logged in to vote
0 replies
Answer selected by yanhuqing666
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants