我有一个 mysql 半同步副本集,有一个主节点和两个从节点。只有一个节点可以正常复制,但另一个节点始终处于以下状态。Slave_IO_State:等待主节点发送事件
主服务器没有发送任何数据,并且我在主服务器 mysqld 错误日志中看到以下内容。
2018-05-14T06:43:51.880292Z 113 [ERROR] Semi-sync master failed on
net_flush() before waiting for slave reply
2018-05-14T06:43:51.880985Z 113 [Note] Stop semi-sync binlog_dump to slave (server_id: 111)
2018-05-14T06:44:41.754052Z 1343 [Note] While initializing dump thread
for slave with UUID <770ca92e-5730-11e8-9f7a-000d3a064af1>, found a
zombie dump thread with the same UUID. Master is killing the zombie
dump thread(113).
2018-05-14T06:44:41.863759Z 1343 [Note] Start binlog_dump to
master_thread_id(1343) slave_server(111), pos(, 4)
2018-05-14T06:46:11.934785Z 1382 [Note] While initializing dump thread
for slave with UUID <770ca92e-5730-11e8-9f7a-000d3a064af1>, found a
zombie dump thread with the same UUID. Master is killing the zombie
dump thread(113).
2018-05-14T06:46:11.934894Z 1382 [Note] Start binlog_dump to
master_thread_id(1382) slave_server(111), pos(, 4)
2018-05-14T06:47:11.985863Z 1408 [Note] While initializing dump thread
for slave with UUID <770ca92e-5730-11e8-9f7a-000d3a064af1>, found a
zombie dump thread with the same UUID. Master is killing the zombie
dump thread(113).
等等....
我的从属服务器上的 slave_net_timeout 为 60 秒,我可以清楚地看到,每隔 60 秒,从属服务器就会尝试重新连接,但主服务器会确认并保持连接,但不发送任何数据。作为副作用,从属服务器与主服务器的连接数量不断增加。我还在主服务器的 Show Processlist 中看到以下内容:
| 113 | repl_user | 172.19.0.12:58174 | NULL | Binlog Dump GTID | 3189 | Waiting to finalize termination | NULL
| 1343 | repl_user | 172.19.0.12:35394 | NULL | Binlog Dump GTID | 418 | starting | NULL |
| 1382 | repl_user | 172.19.0.12:35572 | NULL | Binlog Dump GTID | 328 | starting | NULL |
任何指示和进一步调试都将不胜感激。谢谢!