MySQL5.7.34 MGR集群单主模式,节点信息: +--------------------------------------+--------------+-------------+--------------+------------+ | MEMBER_ID | MEMBER_HOST | MEMBER_PORT | MEMBER_STATE | IS_PRIMARY | +--------------------------------------+--------------+-------------+--------------+------------+ | 9c88649e-9f2f-11ee-ba5c-8c2a8e5c1504 | l76-186-p-yz | 3306 | ONLINE | YES | | 9d7be087-9f2f-11ee-8595-8c2a8e5c187f | l76-187-p-yz | 3306 | ONLINE | NO | | 9e5b9e54-9f2f-11ee-af5c-8c2a8e5c1516 | l76-188-p-yz | 3306 | ONLINE | NO | +--------------------------------------+--------------+-------------+--------------+------------+ 主节点l76-186-p-yz被机房管理员在搬机器的过程中不小心碰到了电源键,导致异常关机。主节点宕机后,未发生主从切换。两个从节点的日志如下: 2025-09-10T17:47:34.576495+08:00 0 [Warning] Plugin group_replication reported: 'The member with address l76-188-p-yz:3306 has already sent the stable set. Therefore discarding the second message.' 2025-09-10T17:47:46.923357+08:00 0 [Warning] Plugin group_replication reported: 'The member with address l76-187-p-yz:3306 has already sent the stable set. Therefore discarding the second message.' 2025-09-10T17:48:34.603089+08:00 0 [Warning] Plugin group_replication reported: 'The member with address l76-188-p-yz:3306 has already sent the stable set. Therefore discarding the second message.' 2025-09-10T17:48:46.953037+08:00 0 [Warning] Plugin group_replication reported: 'The member with address l76-187-p-yz:3306 has already sent the stable set. Therefore discarding the second message.' 2025-09-10T17:49:34.528252+08:00 0 [Warning] Plugin group_replication reported: 'The member with address l76-188-p-yz:3306 has already sent the stable set. Therefore discarding the second message.' 2025-09-10T17:49:46.978338+08:00 0 [Warning] Plugin group_replication reported: 'The member with address l76-187-p-yz:3306 has already sent the stable set. Therefore discarding the second message.' 2025-09-10T17:50:34.559733+08:00 0 [Warning] Plugin group_replication reported: 'The member with address l76-188-p-yz:3306 has already sent the stable set. Therefore discarding the second message.' 2025-09-10T17:50:47.007786+08:00 0 [Warning] Plugin group_replication reported: 'The member with address l76-187-p-yz:3306 has already sent the stable set. Therefore discarding the second message.' 2025-09-10T17:51:34.584621+08:00 0 [Warning] Plugin group_replication reported: 'The member with address l76-188-p-yz:3306 has already sent the stable set. Therefore discarding the second message.' 2025-09-10T17:51:47.034747+08:00 0 [Warning] Plugin group_replication reported: 'The member with address l76-187-p-yz:3306 has already sent the stable set. Therefore discarding the second message.' 2025-09-10T17:52:34.609476+08:00 0 [Warning] Plugin group_replication reported: 'The member with address l76-188-p-yz:3306 has already sent the stable set. Therefore discarding the second message.' 2025-09-10T17:52:47.060166+08:00 0 [Warning] Plugin group_replication reported: 'The member with address l76-187-p-yz:3306 has already sent the stable set. Therefore discarding the second message.' 2025-09-10T17:53:34.633964+08:00 0 [Warning] Plugin group_replication reported: 'The member with address l76-188-p-yz:3306 has already sent the stable set. Therefore discarding the second message.' 2025-09-10T17:53:47.082814+08:00 0 [Warning] Plugin group_replication reported: 'The member with address l76-187-p-yz:3306 has already sent the stable set. Therefore discarding the second message.' 2025-09-10T17:54:34.657171+08:00 0 [Warning] Plugin group_replication reported: 'The member with address l76-188-p-yz:3306 has already sent the stable set. Therefore discarding the second message.' 2025-09-10T17:54:47.105487+08:00 0 [Warning] Plugin group_replication reported: 'The member with address l76-187-p-yz:3306 has already sent the stable set. Therefore discarding the second message.' 2025-09-10T17:55:34.673285+08:00 0 [Warning] Plugin group_replication reported: 'The member with address l76-188-p-yz:3306 has already sent the stable set. Therefore discarding the second message.' 两个从节点的视图未改变,仍然认为l76-186-p-yz是主节点,视图如下: +--------------------------------------+--------------+-------------+--------------+------------+ | MEMBER_ID | MEMBER_HOST | MEMBER_PORT | MEMBER_STATE | IS_PRIMARY | +--------------------------------------+--------------+-------------+--------------+------------+ | 9c88649e-9f2f-11ee-ba5c-8c2a8e5c1504 | l76-186-p-yz | 3306 | ONLINE | YES | | 9d7be087-9f2f-11ee-8595-8c2a8e5c187f | l76-187-p-yz | 3306 | ONLINE | NO | | 9e5b9e54-9f2f-11ee-af5c-8c2a8e5c1516 | l76-188-p-yz | 3306 | ONLINE | NO | +--------------------------------------+--------------+-------------+--------------+------------+ 请问,什么原因导致主节点宕机后,集群未发生主从切换? |
yejr
2025-9-15 11:13:14
| ||
pengzhaojing
2025-9-15 11:25:07
| ||
yejr
2025-9-15 12:03:21
| ||
pengzhaojing
2025-9-15 14:16:10
| ||
yejr
2025-9-15 16:17:04
| ||
reddey
2025-9-15 17:03:45
| ||
yejr
2025-9-15 17:04:58
| ||
reddey
2025-9-16 08:39:26
| ||
合作电话:010-64087828
社区邮箱:greatsql@greatdb.com