GreatSQL社区

搜索

[已解决] 求助:部署单主MGR集群,第二个实例无法加入集群报错

637 2 2024-3-20 22:05
本帖最后由 tony 于 2024-3-21 14:09 编辑

第一个节点部署成功
  1. mysql> select * from performance_schema.replication_group_members;
  2. +---------------------------+--------------------------------------+-------------+-------------+--------------+-------------+----------------+----------------------------+
  3. | CHANNEL_NAME              | MEMBER_ID                            | MEMBER_HOST | MEMBER_PORT | MEMBER_STATE | MEMBER_ROLE | MEMBER_VERSION | MEMBER_COMMUNICATION_STACK |
  4. +---------------------------+--------------------------------------+-------------+-------------+--------------+-------------+----------------+----------------------------+
  5. | group_replication_applier | 2b5c6540-e5d0-11ee-8376-000c29ec4ae4 | mgr01       |        3306 | ONLINE       | PRIMARY     | 8.0.35         | XCom                       |
  6. +---------------------------+--------------------------------------+-------------+-------------+--------------+-------------+----------------+----------------------------+
  7. 1 row in set (0.00 sec)
复制代码
第二个节点加入集群报错
  1. mysql> START GROUP_REPLICATION;
  2. ERROR 3092 (HY000): The server is not configured properly to be an active member of the group. Please see more details on error log.
复制代码
报错日志如下
  1. 2024-03-20T21:16:28.301465+08:00 0 [ERROR] [MY-011526] [Repl] Plugin group_replication reported: 'This member has more executed transactions than those present in the group. Local transactions: f4343bed-e68a-11ee-9d06-000c293b6e72:1-4 > Group transactions: 2b5c6540-e5d0-11ee-8376-000c29ec4ae4:1-8, aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:1-4'
  2. 2024-03-20T21:16:28.301534+08:00 0 [ERROR] [MY-011522] [Repl] Plugin group_replication reported: 'The member contains transactions not present in the group. The member will now exit the group.'
  3. 2024-03-20T21:16:28.301580+08:00 0 [System] [MY-011503] [Repl] Plugin group_replication reported: 'Group membership changed to mgr01:3306, mgr02:3306 on view 17109245818795019:2.'
  4. 2024-03-20T21:16:31.371530+08:00 0 [System] [MY-011504] [Repl] Plugin group_replication reported: 'Group membership changed: This member has left the group.'
  5. 2024-03-20T21:16:31.373589+08:00 11 [System] [MY-011566] [Repl] Plugin group_replication reported: 'Setting super_read_only=OFF.'
复制代码
请问各位大佬有哪些解决方法?
全部回复(2)
KAiTO 2024-3-21 09:32:53
报错很明显了
Plugin group_replication reported: 'This member has more executed transactions than those present in the group. Local transactions: f4343bed-e68a-11ee-9d06-000c293b6e72:1-4 > Group transactions: 2b5c6540-e5d0-11ee-8376-000c29ec4ae4:1-8, aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:1-4'
此成员执行的事务比组中的事务多
在SECONDARY节点上使用 reset master 清空所有执行事务就好了
yejr 2024-3-21 12:48:50
KAiTO 发表于 2024-3-21 09:32
报错很明显了
Plugin group_replication reported: 'This member has more executed transactions than th ...

reset master还不够,因为第二个节点上可能有更多数据。

最好是用CLONE之类的方法重建第二个节点。

详情参考:有事务冲突时节点怎么加入MGR集群,https://mp.weixin.qq.com/s/F8NtR7igL6Nd4v2i1hvmNw
tony

8

主题

0

博客

173

贡献

注册会员

Rank: 2

积分
196

助人为乐(铜)

合作电话:010-64087828

社区邮箱:greatsql@greatdb.com

社区公众号
社区小助手
QQ群
GMT+8, 2024-12-4 01:30 , Processed in 0.018758 second(s), 14 queries , Redis On.
快速回复 返回顶部 返回列表