2020-12-08
mysql mgr 一节点状态始终是RECOVERING,但是同步正常
环境
mgrb01和mgrb02在ubuntu20.4 docker容器上
mgrb03在一个虚拟机上centos 8.2.2004
数据库软件为8.0.22
现象
- mgrb03再加入集群后一直处于RECOVERING状态
root@172.20.3.11:3308 : (none) : 10:54:19>SELECT * FROM performance_schema.replication_group_members;
+---------------------------+--------------------------------------+-------------+-------------+--------------+-------------+----------------+
| CHANNEL_NAME | MEMBER_ID | MEMBER_HOST | MEMBER_PORT | MEMBER_STATE | MEMBER_ROLE | MEMBER_VERSION |
+---------------------------+--------------------------------------+-------------+-------------+--------------+-------------+----------------+
| group_replication_applier | 3661b76a-38f7-11eb-9d7a-0242ac1e000a | mgrb01 | 3308 | ONLINE | SECONDARY | 8.0.22 |
| group_replication_applier | 4ced7a3e-38fa-11eb-bcc5-0242ac10000a | mgrb02 | 3308 | ONLINE | PRIMARY | 8.0.22 |
| group_replication_applier | eda990af-1e5c-11eb-9895-00155d011502 | mgrb03 | 3306 | RECOVERING | SECONDARY | 8.0.22 |
+---------------------------+--------------------------------------+-------------+-------------+--------------+-------------+----------------+
- 数据同步正常,mgrb02是primary,上面的一切操作都同步到mgrb03了,show master status看到的Executed_Gtid_Set都是一致的
- mgrb03的error日志中没有报错,其余两节点error日志也没报错
- 主动将master角色的mgrb02停止后,mgrb03的状态变为online
- 对比了下日志,发下mgrb03刚加入组的时候日志中少了一句:This server was declared online within the replication group,此时才出现这个日志
2020-12-08T03:03:45.197782Z 0 [Warning] [MY-011499] [Repl] Plugin group_replication reported: 'Members removed from the group: mgrb02:3308'
2020-12-08T03:03:45.197800Z 0 [System] [MY-011500] [Repl] Plugin group_replication reported: 'Primary server with address mgrb02:3308 left the group. Electing new Primary.'
2020-12-08T03:03:45.197883Z 0 [System] [MY-011507] [Repl] Plugin group_replication reported: 'A new primary with address mgrb01:3308 was elected. The new primary will execute all previous group transactions before allowing writes.'
2020-12-08T03:03:45.198100Z 0 [System] [MY-011503] [Repl] Plugin group_replication reported: 'Group membership changed to mgrb01:3308, mgrb03:3306 on view 16073947051824521:6.'
2020-12-08T03:03:45.198962Z 0 [System] [MY-011490] [Repl] Plugin group_replication reported: 'This server was declared online within the replication group.'
2020-12-08T03:03:46.916812Z 36 [System] [MY-011511] [Repl] Plugin group_replication reported: 'This server is working as secondary member with primary member address mgrb01:3308.'
我来答
添加附件
收藏
分享
问题补充
6条回答
默认
最新
回答交流
提交
问题信息
请登录之后查看
邀请回答
暂无人订阅该标签,敬请期待~~
墨值悬赏

评论
