MySQL Forums
Forum List  »  Replication

Mysql5.7.17 group replication add second server failed
Posted by: zero yang
Date: December 26, 2016 07:44PM

When I start the first server(ip:172.27.19.233) to create a new group, it's all ok.
But when I add the second server(ip:10.130.10.192) to join the group, it turn out that the second server will seize then master's position, and the first server's state turn to OFFLINE.

Here is the second's log and state:

2016-12-26T06:40:11.712220Z 0 [Note] Plugin group_replication reported: 'state 0 action xa_init'
2016-12-26T06:40:11.734264Z 0 [Note] Plugin group_replication reported: 'Successfully bound to 0.0.0.0:24901 (socket=49).'
2016-12-26T06:40:11.734308Z 0 [Note] Plugin group_replication reported: 'Successfully set listen backlog to 32 (socket=49)!'
2016-12-26T06:40:11.734316Z 0 [Note] Plugin group_replication reported: 'Successfully unblocked socket (socket=49)!'
2016-12-26T06:40:11.734355Z 0 [Note] Plugin group_replication reported: 'Ready to accept incoming connections on 0.0.0.0:24901 (socket=49)!'
2016-12-26T06:40:11.734372Z 0 [Note] Plugin group_replication reported: 'connecting to 10.130.10.192 24901'
2016-12-26T06:40:11.734516Z 0 [Note] Plugin group_replication reported: 'client connected to 10.130.10.192 24901 fd 50'
2016-12-26T06:40:11.735224Z 0 [Note] Plugin group_replication reported: 'connecting to 10.130.10.192 24901'
2016-12-26T06:40:11.735334Z 0 [Note] Plugin group_replication reported: 'client connected to 10.130.10.192 24901 fd 66'
2016-12-26T06:40:11.735890Z 0 [Note] Plugin group_replication reported: 'connecting to 10.130.10.192 24901'
2016-12-26T06:40:11.735984Z 0 [Note] Plugin group_replication reported: 'client connected to 10.130.10.192 24901 fd 68'
2016-12-26T06:40:11.736138Z 0 [Note] Plugin group_replication reported: 'connecting to 10.130.10.192 24901'
2016-12-26T06:40:11.736226Z 0 [Note] Plugin group_replication reported: 'client connected to 10.130.10.192 24901 fd 70'
2016-12-26T06:40:11.736381Z 0 [Note] Plugin group_replication reported: 'connecting to 10.130.10.192 24901'
2016-12-26T06:40:11.736466Z 0 [Note] Plugin group_replication reported: 'client connected to 10.130.10.192 24901 fd 72'
2016-12-26T06:40:11.736582Z 0 [Note] Plugin group_replication reported: 'connecting to 10.130.10.192 24901'
2016-12-26T06:40:11.736678Z 0 [Note] Plugin group_replication reported: 'client connected to 10.130.10.192 24901 fd 74'
2016-12-26T06:40:11.736793Z 0 [Note] Plugin group_replication reported: 'connecting to 172.27.19.233 24901'
2016-12-26T06:40:11.737004Z 0 [Note] Plugin group_replication reported: 'client connected to 172.27.19.233 24901 fd 76'
2016-12-26T06:40:13.036560Z 0 [Note] Plugin group_replication reported: 'state 4257 action xa_snapshot'
2016-12-26T06:40:13.036757Z 0 [Note] Plugin group_replication reported: 'new state x_recover'
2016-12-26T06:40:13.036771Z 0 [Note] Plugin group_replication reported: 'state 4277 action xa_complete'
2016-12-26T06:40:13.036901Z 0 [Note] Plugin group_replication reported: 'new state x_run'
2016-12-26T06:40:14.040952Z 0 [Note] Plugin group_replication reported: 'getstart group_id 4317e324'
2016-12-26T06:40:14.958794Z 0 [Note] Plugin group_replication reported: 'Starting group replication recovery with view_id 14827338559155649:2'
2016-12-26T06:40:14.959139Z 12 [Note] Plugin group_replication reported: 'Only one server alive. Declaring this server as online within the replication group'
2016-12-26T06:40:14.960508Z 0 [Note] Plugin group_replication reported: 'This server was declared online within the replication group'


mysql> SELECT * FROM performance_schema.replication_group_members;
+---------------------------+--------------------------------------+-------------+-------------+--------------+
| CHANNEL_NAME | MEMBER_ID | MEMBER_HOST | MEMBER_PORT | MEMBER_STATE |
+---------------------------+--------------------------------------+-------------+-------------+--------------+
| group_replication_applier | 04f4c329-cb2f-11e6-b304-e41f1345523a | qsitil6 | 3306 | ONLINE |
+---------------------------+--------------------------------------+-------------+-------------+--------------+
1 row in set (0.00 sec)



And here is the first server's log and state:

2016-12-26T06:40:14.039546Z 0 [Note] Plugin group_replication reported: 'getstart group_id 4317e324'
2016-12-26T06:40:14.957262Z 0 [Note] Plugin group_replication reported: 'Marking group replication view change with view_id 14827338559155649:2'
2016-12-26T06:40:14.959046Z 0 [Note] Plugin group_replication reported: 'This server was not declared online since it is on status OFFLINE'


mysql> SELECT * FROM performance_schema.replication_group_members;
+---------------------------+--------------------------------------+-------------+-------------+--------------+
| CHANNEL_NAME | MEMBER_ID | MEMBER_HOST | MEMBER_PORT | MEMBER_STATE |
+---------------------------+--------------------------------------+-------------+-------------+--------------+
| group_replication_applier | 04f4c329-cb2f-11e6-b304-e41f1345523a | qsitil5 | 3306 | OFFLINE |
+---------------------------+--------------------------------------+-------------+-------------+--------------+
1 row in set (0.00 sec)

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.