1.MGR其中一个节点挂了,按照以下的方式恢复
2 修复过程
- 1.其中一台second上备份全库
- /usr/local/mysql/bin/mysqldump -uroot -P3312 -S /data0/mysql/log/testdb/mysql_testdb.sock -prootroot --master-data=2 --databases TESTDB db1 db10 db11 db12 db2 db3 vodb > alldb.sql
-
- 2.sql有记录gtid复制点信息
- SET @@GLOBAL.GTID_PURGED='aaaaaaaa-bbbb-cccc-ddda-aaaaaaaaaaaa:1-36';
-
-
- 3.失败节点导入sql
-
-
- 4.mysql> START GROUP_REPLICATION;
-
-
- 然后就一直失败:
2018-04-09T02:11:25.147448Z 0 [Note] Plugin group_replication reported: 'client connected to mysql02 24902 fd 66'
2018-04-09T02:11:55.147914Z 0 [ERROR] Plugin group_replication reported: '[GCS] Timeout while waiting for the group communication engine to be ready!'
2018-04-09T02:11:55.147974Z 0 [ERROR] Plugin group_replication reported: '[GCS] The group communication engine is not ready for the member to join. Local port: 24901'
2018-04-09T02:11:55.148058Z 0 [Note] Plugin group_replication reported: 'state 4272 action xa_terminate'
2018-04-09T02:11:55.148081Z 0 [Note] Plugin group_replication reported: 'new state x_start'
2018-04-09T02:11:55.148085Z 0 [Note] Plugin group_replication reported: 'state 4272 action xa_exit'
2018-04-09T02:11:55.148183Z 0 [Note] Plugin group_replication reported: 'Exiting xcom thread'
2018-04-09T02:11:55.148219Z 0 [Note] Plugin group_replication reported: 'new state x_start'
2018-04-09T02:11:55.148920Z 0 [Warning] Plugin group_replication reported: 'read failed'
2018-04-09T02:11:55.169025Z 0 [ERROR] Plugin group_replication reported: '[GCS] The member was unable to join the group. Local port: 24901'
null2018-04-09T02:12:25.145183Z 27 [ERROR] Plugin group_replication reported: 'Timeout on wait for view after joining group'
2018-04-09T02:12:26.145357Z 27 [Note] Plugin group_replication reported: 'Requesting to leave the group despite of not being a member'
2018-04-09T02:12:26.145417Z 27 [ERROR] Plugin group_replication reported: '[GCS] The member is leaving a group without being on one.'
2018-04-09T02:12:26.145551Z 27 [Note] Plugin group_replication reported: 'auto_increment_increment is reset to 1'
2018-04-09T02:12:26.145594Z 27 [Note] Plugin group_replication reported: 'auto_increment_offset is reset to 1'
2018-04-09T02:12:26.146050Z 32 [Note] Error reading relay log event for channel 'group_replication_applier': slave SQL thread was killed
2018-04-09T02:12:26.146573Z 29 [Note] Plugin group_replication reported: 'The group replication applier thread was killed'
2018-04-09T02:13:57.164181Z 27 [Note] Aborted connection 27 to db: 'unconnected' user: 'root' host: 'localhost' (Got timeout reading communication packets)
null2018-04-09T02:20:55.810967Z 34 [Note] Aborted connection 34 to db: 'mysql' user: 'root' host: 'localhost' (Got timeout reading communication packets)
2018-04-09T02:11:55.147914Z 0 [ERROR] Plugin group_replication reported: '[GCS] Timeout while waiting for the group communication engine to be ready!'
2018-04-09T02:11:55.147974Z 0 [ERROR] Plugin group_replication reported: '[GCS] The group communication engine is not ready for the member to join. Local port: 24901'
2018-04-09T02:11:55.148058Z 0 [Note] Plugin group_replication reported: 'state 4272 action xa_terminate'
2018-04-09T02:11:55.148081Z 0 [Note] Plugin group_replication reported: 'new state x_start'
2018-04-09T02:11:55.148085Z 0 [Note] Plugin group_replication reported: 'state 4272 action xa_exit'
2018-04-09T02:11:55.148183Z 0 [Note] Plugin group_replication reported: 'Exiting xcom thread'
2018-04-09T02:11:55.148219Z 0 [Note] Plugin group_replication reported: 'new state x_start'
2018-04-09T02:11:55.148920Z 0 [Warning] Plugin group_replication reported: 'read failed'
2018-04-09T02:11:55.169025Z 0 [ERROR] Plugin group_replication reported: '[GCS] The member was unable to join the group. Local port: 24901'
null2018-04-09T02:12:25.145183Z 27 [ERROR] Plugin group_replication reported: 'Timeout on wait for view after joining group'
2018-04-09T02:12:26.145357Z 27 [Note] Plugin group_replication reported: 'Requesting to leave the group despite of not being a member'
2018-04-09T02:12:26.145417Z 27 [ERROR] Plugin group_replication reported: '[GCS] The member is leaving a group without being on one.'
2018-04-09T02:12:26.145551Z 27 [Note] Plugin group_replication reported: 'auto_increment_increment is reset to 1'
2018-04-09T02:12:26.145594Z 27 [Note] Plugin group_replication reported: 'auto_increment_offset is reset to 1'
2018-04-09T02:12:26.146050Z 32 [Note] Error reading relay log event for channel 'group_replication_applier': slave SQL thread was killed
2018-04-09T02:12:26.146573Z 29 [Note] Plugin group_replication reported: 'The group replication applier thread was killed'
2018-04-09T02:13:57.164181Z 27 [Note] Aborted connection 27 to db: 'unconnected' user: 'root' host: 'localhost' (Got timeout reading communication packets)
null2018-04-09T02:20:55.810967Z 34 [Note] Aborted connection 34 to db: 'mysql' user: 'root' host: 'localhost' (Got timeout reading communication packets)
2 修复过程
- mysql> SELECT * FROM performance_schema.replication_group_members;
- +---------------------------+--------------------------------------+-------------+-------------+--------------+
- | CHANNEL_NAME | MEMBER_ID | MEMBER_HOST | MEMBER_PORT | MEMBER_STATE |
- +---------------------------+--------------------------------------+-------------+-------------+--------------+
- | group_replication_applier | 0a4a3b1d-ebc1-11e7-bf81-005056b9d83d | mysql03 | 3312 | ONLINE |
- | group_replication_applier | 648a6cb1-ebc1-11e7-8425-005056b9f3f2 | mysql02 | 3312 | ONLINE |
- | group_replication_applier | d59224f9-ebc1-11e7-92f2-005056b96aae | mysql01 | 3312 | UNREACHABLE |
- +---------------------------+--------------------------------------+-------------+-------------+--------------+
UNREACHABLE 表示节点处于不可达状态,无法与之发生网络通讯
-
- 检查半天是防火强的原因
- centos 6 的nc -vz ip port即可获取状态
centos 7的nc命令有变化
[root@mysql02 ~]# nc -w 1 10.168.17.202 3312 < /dev/null && echo "tcp port ok"
[root@mysql02 ~]# nc -w 1 10.168.17.202 3312 < /dev/null && echo "tcp port ok"
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29096438/viewspace-2152698/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/29096438/viewspace-2152698/