GreatSQL社区

搜索

mgr集群退出节点新建用户后无法加入原有集群

1356 2 2023-2-22 11:40
环境:mysql 5.7 ,3节点集群


问题描述:mgr集群,有个节点退出集群,然后没注意在这个节点新建用户,现在加入不了集群,现在这种情况应该怎么处理


问题错误日志:

2023-02-22T02:43:02.486647Z 1123516 [Note] Plugin group_replication reported: 'Group communication SSL configuration: group_replication_ssl_mode: "DISABLED"'
2023-02-22T02:43:02.486779Z 1123516 [Warning] Plugin group_replication reported: '[GCS] Automatically adding IPv4 localhost address to the whitelist. It is mandatory that it is added.'
2023-02-22T02:43:02.486835Z 1123516 [Note] Plugin group_replication reported: '[GCS] SSL was not enabled'
2023-02-22T02:43:02.486868Z 1123516 [Note] Plugin group_replication reported: 'Initialized group communication with configuration: group_replication_group_name: "25910281-c57b-11ea-81c6-005
056adb0ca"; group_replication_local_address: "192.168.56.140:24901"; group_replication_group_seeds: "192.168.56.140:24901,192.168.56.141:24901,192.168.56.142:24901"; group_replication_bootstrap
_group: false; group_replication_poll_spin_loops: 0; group_replication_compression_threshold: 1000000; group_replication_ip_whitelist: "192.168.56.0/24,127.0.0.1/8"'
2023-02-22T02:43:02.486917Z 1123516 [Note] Plugin group_replication reported: '[GCS] Configured number of attempts to join: 0'
2023-02-22T02:43:02.486927Z 1123516 [Note] Plugin group_replication reported: '[GCS] Configured time between attempts to join: 5 seconds'
2023-02-22T02:43:02.486953Z 1123516 [Note] Plugin group_replication reported: 'Member configuration: member_id: 3306100; member_uuid: "f1e599b2-c579-11ea-b11f-005056adb0ca"; single-primary
mode: "false"; group_replication_auto_increment_increment: 7; '
2023-02-22T02:43:02.487241Z 1123526 [Note] 'CHANGE MASTER TO FOR CHANNEL 'group_replication_applier' executed'. Previous state master_host='<NULL>', master_port= 0, master_log_file='', mast
er_log_pos= 4, master_bind=''. New state master_host='<NULL>', master_port= 0, master_log_file='', master_log_pos= 4, master_bind=''.
2023-02-22T02:43:02.532912Z 1123516 [Note] Plugin group_replication reported: 'Group Replication applier module successfully initialized!'
2023-02-22T02:43:02.532932Z 1123516 [Note] Plugin group_replication reported: 'auto_increment_increment is set to 7'
2023-02-22T02:43:02.532937Z 1123516 [Note] Plugin group_replication reported: 'auto_increment_offset is set to 3306100'
2023-02-22T02:43:02.532919Z 1123529 [Note] Slave SQL thread for channel 'group_replication_applier' initialized, starting replication in log 'FIRST' at position 0, relay log './FJJM-DM-Trus
t-VM6-147-relay-bin-group_replication_applier.000014' position: 4
2023-02-22T02:43:02.533036Z 0 [Note] Plugin group_replication reported: 'XCom protocol version: 3'
2023-02-22T02:43:02.533056Z 0 [Note] Plugin group_replication reported: 'XCom initialized and ready to accept incoming connections on port 24901'
2023-02-22T02:43:04.662104Z 0 [ERROR] Plugin group_replication reported: 'This member has more executed transactions than those present in the group. Local transactions: 25910281-c57b-11ea-81c6-005056adb0ca:1-367:1000006-1000319:2000006-2000360,f1e599b2-c579-11ea-b11f-005056adb0ca:1-71 > Group transactions: 25910281-c57b-11ea-81c6-005056adb0ca:1-423:1000006-1000361:2000006-2000360'
2023-02-22T02:43:04.662131Z 0 [ERROR] Plugin group_replication reported: 'The member contains transactions not present in the group. The member will now exit the group.'
2023-02-22T02:43:04.662136Z 0 [Note] Plugin group_replication reported: 'To force this member into the group you can use the group_replication_allow_local_disjoint_gtids_join option'
2023-02-22T02:43:04.662155Z 0 [Note] Plugin group_replication reported: 'Group membership changed to testmgr-147:3306, testmgr-148:3306, testmgr-149:3306 on view 16550906889498367:9.'
2023-02-22T02:43:04.662177Z 1123516 [Note] Plugin group_replication reported: 'Going to wait for view modification'
2023-02-22T02:43:07.684967Z 0 [Note] Plugin group_replication reported: 'Group membership changed: This member has left the group.'
2023-02-22T02:43:12.685167Z 1123516 [Note] Plugin group_replication reported: 'auto_increment_increment is reset to 1'
2023-02-22T02:43:12.685186Z 1123516 [Note] Plugin group_replication reported: 'auto_increment_offset is reset to 1'
2023-02-22T02:43:12.685339Z 1123529 [Note] Error reading relay log event for channel 'group_replication_applier': slave SQL thread was killed
2023-02-22T02:43:12.685357Z 1123529 [Note] Slave SQL thread for channel 'group_replication_applier' exiting, replication stopped in log 'FIRST' at position 0
2023-02-22T02:43:12.690812Z 1123526 [Note] Plugin group_replication reported: 'The group replication applier thread was killed'

全部回复(2)
yejr 2023-2-22 12:36:44
解决思路可以参考这个文章:有事务冲突时节点怎么加入MGR集群 https://mp.weixin.qq.com/s/BTCjc-bNqFz-hop4NFdFXg

另外补充几点:
1、你的是5.7,不支持clone plugin;8.0下用clone直接复制整个实例重建会更快。
2、个别情况下,可以考虑设置slave-skip-erros,忽略部分错误,然后在primary节点重复执行这个事务,确保各个节点的数据达到最终一致性,但强烈建议不这么做。
3、可以利用mysql shell一件重建实例。

上面这几点建议也能看出来,跑MGR的话建议升级到8.0,尤其建议使用GreatSQL 8.0版本。
王权富贵 2023-2-23 09:54:06

2023-02-22T02:43:04.662104Z 0 [ERROR] Plugin group_replication reported: 'This member has more executed transactions than those present in the group. Local transactions: 25910281-c57b-11ea-81c6-005056adb0ca:1-367:1000006-1000319:2000006-2000360,f1e599b2-c579-11ea-b11f-005056adb0ca:1-71 > Group transactions: 25910281-c57b-11ea-81c6-005056adb0ca:1-423:1000006-1000361:2000006-2000360'
2023-02-22T02:43:04.662131Z 0 [ERROR] Plugin group_replication reported: 'The member contains transactions not present in the group. The member will now exit the group.'
这个节点的事务比组里其他成员事务多,加不进去。
1.看看是啥事务,不涉及数据,不重要的话 可以reset master,再加一下
2.可以执行clone,再加入
wu999

3

主题

0

博客

7

贡献

新手上路

Rank: 1

积分
11

合作电话:010-64087828

社区邮箱:greatsql@greatdb.com

社区公众号
社区小助手
QQ群
GMT+8, 2024-11-21 19:21 , Processed in 0.022011 second(s), 15 queries , Redis On.
快速回复 返回顶部 返回列表