MySQL GROUP_REPLICATION节点主动退出后无法重新加入问题求助
解决MySQL组复制节点重新加入失败的问题
错误日志
2023-08-09T16:39:41.931968Z 0 [ERROR] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] Error connecting to all peers. Member join failed. Local port: 33061' 2023-08-09T16:39:42.594398Z 0 [ERROR] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] The member was unable to join the group. Local port: 33061' 2023-08-09T16:39:47.819059Z 0 [ERROR] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] Error connecting to all peers. Member join failed. Local port: 33061' 2023-08-09T16:39:47.884893Z 0 [ERROR] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] The member was unable to join the group. Local port: 33061'
排查与解决步骤
检查组内节点状态
在组内任意正常节点执行SQL,确认成员状态:SELECT * FROM performance_schema.replication_group_members;如果退出的节点仍显示
ONLINE,手动清理失效成员:-- 8.0+版本直接移除 SELECT group_replication_remove_member('节点IP:端口'); -- 5.7版本需重置组主节点 STOP GROUP_REPLICATION; RESET MASTER; START GROUP_REPLICATION;验证网络连通性
在失败节点上测试与组内其他节点的33061端口连通性:telnet 组内节点IP 33061若不通,检查防火墙/安全组规则,确保33061端口双向放行,同时确认节点间DNS解析正常。
重置本地复制配置
在失败节点执行以下命令清理旧复制信息后重新加入:STOP GROUP_REPLICATION; RESET MASTER; RESET SLAVE ALL; SET GLOBAL group_replication_bootstrap_group=OFF; START GROUP_REPLICATION;核对配置一致性
对比失败节点与正常节点的组复制核心配置:SHOW VARIABLES LIKE 'group_replication%';重点确认
group_replication_group_name、group_replication_local_address、group_replication_group_seeds完全一致。查看完整错误日志
检查失败节点的MySQL完整错误日志,排查是否有SSL配置错误、权限不足等细节原因。
内容的提问来源于stack exchange,提问作者sky
相关产品推荐
相关产品推荐

