MySQL高可用之MGR安装测试(续)
--14T05::.286396Z [Note] Plugin group_replication reported: '[GCS] Translated 'zlm2' to 127.0.0.1'
--14T05::.286688Z [Note] Plugin group_replication reported: '[GCS] SSL was not enabled'
--14T05::.303290Z [Note] Plugin group_replication reported: 'Group Replication applier module successfully initialized!'
--14T05::.303303Z [Note] Plugin group_replication reported: 'auto_increment_increment is set to 7'
--14T05::.322700Z [Note] Plugin group_replication reported: 'Successfully bound to 0.0.0.0:33061 (socket=59).'
--14T05::.322800Z [Note] Plugin group_replication reported: 'Successfully set listen backlog to 32 (socket=59)!'
--14T05::.323089Z [Note] Plugin group_replication reported: 'connecting to zlm2 33061'
--14T05::.323326Z [Note] Plugin group_replication reported: 'client connected to zlm2 33061 fd 60'
--14T05::.324370Z [Note] Plugin group_replication reported: 'connecting to zlm2 33061'
--14T05::.324594Z [Note] Plugin group_replication reported: 'client connected to zlm2 33061 fd 64'
--14T05::.325365Z [Note] Plugin group_replication reported: 'connecting to zlm2 33061'
--14T05::.325528Z [Note] Plugin group_replication reported: 'client connected to zlm2 33061 fd 67'
--14T05::.326770Z [Note] Plugin group_replication reported: 'connecting to zlm3 33062'
--14T05::.327442Z [ERROR] Plugin group_replication reported: '[GCS] Error on opening a connection to zlm3:33062 on local port: 33061.'
--14T05::.327448Z [Note] Plugin group_replication reported: 'connecting to zlm4 33063'
--14T05::.327991Z [ERROR] Plugin group_replication reported: '[GCS] Error on opening a connection to zlm4:33063 on local port: 33061.'
--14T05::.327996Z [Note] Plugin group_replication reported: 'connecting to zlm3 33062'
--14T05::.328227Z [ERROR] Plugin group_replication reported: '[GCS] Error on opening a connection to zlm3:33062 on local port: 33061.'
--14T05::.328231Z [Note] Plugin group_replication reported: 'connecting to zlm4 33063'
--14T05::.328473Z [ERROR] Plugin group_replication reported: '[GCS] Error on opening a connection to zlm4:33063 on local port: 33061.'
--14T05::.328477Z [Note] Plugin group_replication reported: 'connecting to zlm3 33062'
--14T05::.328692Z [ERROR] Plugin group_replication reported: '[GCS] Error on opening a connection to zlm3:33062 on local port: 33061.'
--14T05::.328696Z [Note] Plugin group_replication reported: 'connecting to zlm4 33063'
--14T05::.328927Z [ERROR] Plugin group_replication reported: '[GCS] Error on opening a connection to zlm4:33063 on local port: 33061.'
--14T05::.328931Z [Note] Plugin group_replication reported: 'connecting to zlm3 33062'
--14T05::.329149Z [ERROR] Plugin group_replication reported: '[GCS] Error on opening a connection to zlm3:33062 on local port: 33061.'
--14T05::.329153Z [Note] Plugin group_replication reported: 'connecting to zlm4 33063'
--14T05::.329371Z [ERROR] Plugin group_replication reported: '[GCS] Error on opening a connection to zlm4:33063 on local port: 33061.'
--14T05::.329376Z [Note] Plugin group_replication reported: 'connecting to zlm3 33062'
--14T05::.329591Z [ERROR] Plugin group_replication reported: '[GCS] Error on opening a connection to zlm3:33062 on local port: 33061.'
--14T05::.329595Z [Note] Plugin group_replication reported: 'connecting to zlm4 33063'
--14T05::.329812Z [ERROR] Plugin group_replication reported: '[GCS] Error on opening a connection to zlm4:33063 on local port: 33061.'
--14T05::.329822Z [Note] Plugin group_replication reported: 'connecting to zlm3 33062'
--14T05::.330046Z [ERROR] Plugin group_replication reported: '[GCS] Error on opening a connection to zlm3:33062 on local port: 33061.'
--14T05::.330051Z [Note] Plugin group_replication reported: 'connecting to zlm4 33063'
--14T05::.330315Z [ERROR] Plugin group_replication reported: '[GCS] Error on opening a connection to zlm4:33063 on local port: 33061.'
--14T05::.330319Z [Note] Plugin group_replication reported: 'connecting to zlm3 33062'
--14T05::.330542Z [ERROR] Plugin group_replication reported: '[GCS] Error on opening a connection to zlm3:33062 on local port: 33061.'
--14T05::.330545Z [Note] Plugin group_replication reported: 'connecting to zlm4 33063'
--14T05::.330846Z [ERROR] Plugin group_replication reported: '[GCS] Error on opening a connection to zlm4:33063 on local port: 33061.'
--14T05::.330850Z [Note] Plugin group_replication reported: 'connecting to zlm3 33062'
--14T05::.331029Z [ERROR] Plugin group_replication reported: '[GCS] Error on opening a connection to zlm3:33062 on local port: 33061.'
--14T05::.331034Z [Note] Plugin group_replication reported: 'connecting to zlm4 33063'
--14T05::.331268Z [ERROR] Plugin group_replication reported: '[GCS] Error on opening a connection to zlm4:33063 on local port: 33061.'
--14T05::.331493Z [ERROR] Plugin group_replication reported: '[GCS] Error on opening a connection to zlm3:33062 on local port: 33061.'
--14T05::.331496Z [Note] Plugin group_replication reported: 'connecting to zlm4 33063'
--14T05::.331710Z [ERROR] Plugin group_replication reported: '[GCS] Error on opening a connection to zlm4:33063 on local port: 33061.'
--14T05::.332195Z [Note] Plugin group_replication reported: 'state 4338 action xa_exit'
--14T05::.332221Z [Note] Plugin group_replication reported: 'Exiting xcom thread'
--14T05::.332223Z [Note] Plugin group_replication reported: 'new state x_start'
--14T05::.341819Z [Warning] Plugin group_replication reported: 'read failed'
--14T05::.341918Z [ERROR] Plugin group_replication reported: '[GCS] The member was unable to join the group. Local port: 33061'
--14T05::.305045Z [ERROR] Plugin group_replication reported: 'Timeout on wait for view after joining group'
--14T05::.305086Z [Note] Plugin group_replication reported: 'Requesting to leave the group despite of not being a member'
--14T05::.305104Z [ERROR] Plugin group_replication reported: '[GCS] The member is leaving a group without being on one.'
--14T05::.305389Z [Note] Plugin group_replication reported: 'auto_increment_increment is reset to 1'
--14T05::.305400Z [Note] Plugin group_replication reported: 'auto_increment_offset is reset to 1'
--14T05::.305657Z [Note] Error reading relay log event for channel 'group_replication_applier': slave SQL thread was killed
--14T05::.306129Z [Note] Plugin group_replication reported: 'The group replication applier thread was killed'
--14T05::.369943Z [Note] Plugin group_replication reported: '[GCS] Translated 'zlm2' to 127.0.0.1'
--14T05::.370020Z [Note] Plugin group_replication reported: '[GCS] SSL was not enabled'
--14T05::.395914Z [Note] Plugin group_replication reported: 'Group Replication applier module successfully initialized!'
--14T05::.395914Z [Note] Plugin group_replication reported: 'auto_increment_increment is set to 7'
--14T05::.395914Z [Note] Plugin group_replication reported: 'auto_increment_offset is set to 1013306'
--14T05::.396105Z [Note] Plugin group_replication reported: 'state 4338 action xa_init'
--14T05::.396141Z [Note] Plugin group_replication reported: 'Successfully unblocked socket (socket=58)!'
--14T05::.396160Z [Note] Plugin group_replication reported: 'Ready to accept incoming connections on 0.0.0.0:33061 (socket=58)!'
--14T05::.396174Z [Note] Plugin group_replication reported: 'connecting to zlm2 33061'
--14T05::.397174Z [Note] Plugin group_replication reported: 'client connected to zlm2 33061 fd 62'
--14T05::.397319Z [Note] Plugin group_replication reported: 'connecting to zlm2 33061'
--14T05::.397405Z [Note] Plugin group_replication reported: 'client connected to zlm2 33061 fd 64'
--14T05::.397872Z [Note] Plugin group_replication reported: 'connecting to zlm2 33061'
--14T05::.397992Z [Note] Plugin group_replication reported: 'client connected to zlm2 33061 fd 66'
--14T05::.398354Z [Note] Plugin group_replication reported: 'connecting to zlm2 33061'
--14T05::.398450Z [Note] Plugin group_replication reported: 'client connected to zlm2 33061 fd 68'
--14T05::.398599Z [Note] Plugin group_replication reported: 'connecting to zlm2 33061'
--14T05::.398689Z [Note] Plugin group_replication reported: 'client connected to zlm2 33061 fd 70'
--14T05::.399791Z [Note] Plugin group_replication reported: 'state 4338 action xa_net_boot'
--14T05::.399804Z [Note] Plugin group_replication reported: 'getstart group_id c3244967'
--14T05::.400093Z [Note] Plugin group_replication reported: 'new state x_run'
--14T05::.400123Z [Note] Plugin group_replication reported: 'state 4411 action xa_net_boot'
--14T05::.400126Z [Note] Plugin group_replication reported: 'new state x_run'
--14T05::.400134Z [Note] Plugin group_replication reported: 'getstart group_id c3244967'
--14T05::.400977Z [Note] Plugin group_replication reported: 'Only one server alive. Declaring this server as online within the replication group'
--14T05::.401085Z [Note] Plugin group_replication reported: 'Group membership changed to zlm2:3306 on view 15289529754008535:1.'
--14T05::.401564Z [Note] Plugin group_replication reported: 'This server was declared online within the replication group'
--14T05::.401607Z [Note] Plugin group_replication reported: 'A new primary with address zlm2:3306 was elected, enabling conflict detection until the new primary applies all relay logs.'
--14T05::.401639Z [Note] Plugin group_replication reported: 'This server is working as primary member.'
--14T05::.239890Z [Note] Plugin group_replication reported: 'getstart group_id c3244967'
--14T05::.722205Z [Note] Plugin group_replication reported: 'Members joined the group: zlm3:3306'
--14T05::.722321Z [Note] Plugin group_replication reported: 'Group membership changed to zlm2:3306, zlm3:3306 on view 15289529754008535:2.'
--14T05::.724228Z [Note] Plugin group_replication reported: 'getstart group_id c3244967'
--14T05::.673695Z [Warning] Plugin group_replication reported: 'Members removed from the group: zlm3:3306'
--14T05::.673798Z [Note] Plugin group_replication reported: 'Group membership changed to zlm2:3306 on view 15289529754008535:3.'
--14T05::.381832Z [Note] Aborted connection to db: 'performance_schema' user: 'root' host: 'localhost' (Got timeout reading communication packets)
--14T05::.257975Z [Note] Plugin group_replication reported: 'Group Replication applier module successfully initialized!'
--14T05::.257984Z [Note] Plugin group_replication reported: 'auto_increment_increment is set to 7'
--14T05::.257984Z [Note] Plugin group_replication reported: 'auto_increment_offset is set to 1023306'
--14T05::.258030Z [Note] Plugin group_replication reported: 'state 0 action xa_init'
--14T05::.292244Z [Note] Plugin group_replication reported: 'Successfully bound to 0.0.0.0:33062 (socket=58).'
--14T05::.292272Z [Note] Plugin group_replication reported: 'Successfully set listen backlog to 32 (socket=58)!'
--14T05::.292276Z [Note] Plugin group_replication reported: 'Successfully unblocked socket (socket=58)!'
--14T05::.292294Z [Note] Plugin group_replication reported: 'Ready to accept incoming connections on 0.0.0.0:33062 (socket=58)!'
--14T05::.292339Z [Note] Plugin group_replication reported: 'connecting to zlm3 33062'
--14T05::.292596Z [Note] Plugin group_replication reported: 'client connected to zlm3 33062 fd 59'
--14T05::.295085Z [Note] Plugin group_replication reported: 'connecting to zlm3 33062'
--14T05::.295189Z [Note] Plugin group_replication reported: 'client connected to zlm3 33062 fd 52'
--14T05::.295440Z [Note] Plugin group_replication reported: 'connecting to zlm3 33062'
--14T05::.295509Z [Note] Plugin group_replication reported: 'client connected to zlm3 33062 fd 62'
--14T05::.295590Z [Note] Plugin group_replication reported: 'connecting to zlm3 33062'
--14T05::.295635Z [Note] Plugin group_replication reported: 'client connected to zlm3 33062 fd 64'
--14T05::.295710Z [Note] Plugin group_replication reported: 'connecting to zlm3 33062'
--14T05::.295748Z [Note] Plugin group_replication reported: 'client connected to zlm3 33062 fd 66'
--14T05::.295817Z [Note] Plugin group_replication reported: 'connecting to zlm3 33062'
--14T05::.295861Z [Note] Plugin group_replication reported: 'client connected to zlm3 33062 fd 68'
--14T05::.296880Z [Note] Plugin group_replication reported: 'connecting to zlm2 33061'
--14T05::.297876Z [Note] Plugin group_replication reported: 'client connected to zlm2 33061 fd 70'
--14T05::.305010Z [Note] Plugin group_replication reported: 'state 4338 action xa_snapshot'
--14T05::.305274Z [Note] Plugin group_replication reported: 'new state x_recover'
--14T05::.305281Z [Note] Plugin group_replication reported: 'state 4358 action xa_complete'
--14T05::.305381Z [Note] Plugin group_replication reported: 'new state x_run'
--14T05::.781232Z [ERROR] Plugin group_replication reported: 'This member has more executed transactions than those present in the group. Local transactions: 5c77c31b-4add-11e8-81e2-080027de0e0e:1-16 > Group transactions: 1b7181ee-6eaf-11e8-998e-080027de0e0e:1-2,
ed142e35-6ed1-11e8-86c6-080027de0e0e:-'
--14T05::.781267Z [ERROR] Plugin group_replication reported: 'The member contains transactions not present in the group. The member will now exit the group.'
--14T05::.781270Z [Note] Plugin group_replication reported: 'To force this member into the group you can use the group_replication_allow_local_disjoint_gtids_join option'
--14T05::.781299Z [Note] Plugin group_replication reported: 'Group membership changed to zlm2:3306, on view 15289529754008535:2.'
--14T05::.781325Z [Note] Plugin group_replication reported: 'Going to wait for view modification'
--14T05::.782782Z [Note] Plugin group_replication reported: 'getstart group_id c3244967'
--14T05::.734727Z [Note] Plugin group_replication reported: 'state 4411 action xa_terminate'
--14T05::.734884Z [Note] Plugin group_replication reported: 'new state x_start'
--14T05::.734891Z [Note] Plugin group_replication reported: 'state 4338 action xa_exit'
--14T05::.734922Z [Note] Plugin group_replication reported: 'Exiting xcom thread'
--14T05::.734926Z [Note] Plugin group_replication reported: 'new state x_start'
--14T05::.743941Z [Note] Plugin group_replication reported: 'Group membership changed: This member has left the group.'
--14T05::.745237Z [Note] Plugin group_replication reported: 'auto_increment_increment is reset to 1'
--14T05::.745284Z [Note] Plugin group_replication reported: 'auto_increment_offset is reset to 1'
--14T05::.745592Z [Note] Error reading relay log event for channel 'group_replication_applier': slave SQL thread was killed
--14T05::.745817Z [Note] Plugin group_replication reported: 'The group replication applier thread was killed'
--14T05::.833707Z [Note] Aborted connection to db: 'unconnected' user: 'root' host: 'localhost' (Got timeout reading communication packets)
(root@localhost mysql3306.sock)[(none)]::>set global group_replication_allow_local_disjoint_gtids_join=on;
Query OK, rows affected, warning (0.00 sec) (root@localhost mysql3306.sock)[(none)]::>start group_replication;
Query OK, rows affected, warning (4.90 sec) (root@localhost mysql3306.sock)[(none)]::>
It seems server zlm3 has joined the group without error output this time.
--14T06::.720574Z [ERROR] Plugin group_replication reported: 'This member has more executed transactions than those present in the group. Local transactions: 5c77c31b-4add-11e8-81e2-080027de0e0e:1-16 > Group transactions: 1b7181ee-6eaf-11e8-998e-080027de0e0e:1-2,
ed142e35-6ed1-11e8-86c6-080027de0e0e:-'
--14T06::.720600Z [Warning] Plugin group_replication reported: 'The member contains transactions not present in the group. It is only allowed to join due to group_replication_allow_local_disjoint_gtids_join option'
--14T06::.720854Z [Note] Plugin group_replication reported: 'This server is working as secondary member with primary member address zlm2:3306.'
--14T06::.721915Z [Note] Plugin group_replication reported: 'Establishing group recovery connection with a possible donor. Attempt 1/10'
--14T06::.722030Z [Note] Plugin group_replication reported: 'Group membership changed to zlm2:3306, zlm3:3306 on view 15289529754008535:4.'
--14T06::.732273Z [Note] 'CHANGE MASTER TO FOR CHANNEL 'group_replication_recovery' executed'. Previous state master_host='', master_port= , master_log_file='', master_log_pos= , master_bind=''. New state master_host='zlm2', master_port= , master_log_file='', master_log_pos= , master_bind=''.
--14T06::.752644Z [Note] Plugin group_replication reported: 'Establishing connection to a group replication recovery donor 1b7181ee-6eaf-11e8-998e-080027de0e0e at zlm2 port: 3306.'
--14T06::.752644Z [Warning] Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
--14T06::.752875Z [Note] Slave SQL thread for channel 'group_replication_recovery' initialized, starting replication in log 'FIRST' at position , relay log './relay-bin-group_replication_recovery.000001' position:
--14T06::.754070Z [Note] Slave I/O thread for channel 'group_replication_recovery': connected to master 'rpl_mgr@zlm2:3306',replication started in log 'FIRST' at position
--14T06::.759820Z [ERROR] Error reading packet from server for channel 'group_replication_recovery': The slave is connecting using CHANGE MASTER TO MASTER_AUTO_POSITION = , but the master has purged binary logs containing GTIDs that the slave requires. (server_errno=)
--14T06::.759854Z [ERROR] Slave I/O for channel 'group_replication_recovery': Got fatal error from master when reading data from binary log: 'The slave is connecting using CHANGE MASTER TO MASTER_AUTO_POSITION = 1, but the master has purged binary logs containing GTIDs that the slave requires.', Error_code:
--14T06::.759860Z [Note] Slave I/O thread exiting for channel 'group_replication_recovery', read up to log 'FIRST', position
--14T06::.760247Z [Note] Plugin group_replication reported: 'Terminating existing group replication donor connection and purging the corresponding logs.'
--14T06::.760289Z [Note] Error reading relay log event for channel 'group_replication_recovery': slave SQL thread was killed
--14T06::.772161Z [Note] 'CHANGE MASTER TO FOR CHANNEL 'group_replication_recovery' executed'. Previous state master_host='zlm2', master_port= , master_log_file='', master_log_pos= , master_bind=''. New state master_host='<NULL>', master_port= , master_log_file='', master_log_pos= , master_bind=''.
--14T06::.792308Z [Note] Plugin group_replication reported: 'Retrying group recovery connection with another donor. Attempt 2/10'
--14T06::.803085Z [Note] 'CHANGE MASTER TO FOR CHANNEL 'group_replication_recovery' executed'. Previous state master_host='<NULL>', master_port= , master_log_file='', master_log_pos= , master_bind=''. New state master_host='zlm2', master_port= , master_log_file='', master_log_pos= , master_bind=''.
--14T06::.822823Z [Note] Plugin group_replication reported: 'Establishing connection to a group replication recovery donor 1b7181ee-6eaf-11e8-998e-080027de0e0e at zlm2 port: 3306.'
--14T06::.822823Z [Warning] Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
--14T06::.823067Z [Note] Slave SQL thread for channel 'group_replication_recovery' initialized, starting replication in log 'FIRST' at position , relay log './relay-bin-group_replication_recovery.000001' position:
--14T06::.824189Z [Note] Slave I/O thread for channel 'group_replication_recovery': connected to master 'rpl_mgr@zlm2:3306',replication started in log 'FIRST' at position
--14T06::.829053Z [ERROR] Error reading packet from server for channel 'group_replication_recovery': The slave is connecting using CHANGE MASTER TO MASTER_AUTO_POSITION = , but the master has purged binary logs containing GTIDs that the slave requires. (server_errno=)
--14T06::.829085Z [ERROR] Slave I/O for channel 'group_replication_recovery': Got fatal error from master when reading data from binary log: 'The slave is connecting using CHANGE MASTER TO MASTER_AUTO_POSITION = 1, but the master has purged binary logs containing GTIDs that the slave requires.', Error_code:
--14T06::.829206Z [Note] Slave I/O thread exiting for channel 'group_replication_recovery', read up to log 'FIRST', position
--14T06::.829575Z [Note] Plugin group_replication reported: 'Terminating existing group replication donor connection and purging the corresponding logs.'
--14T06::.829624Z [Note] Error reading relay log event for channel 'group_replication_recovery': slave SQL thread was killed
--14T06::.842611Z [Note] 'CHANGE MASTER TO FOR CHANNEL 'group_replication_recovery' executed'. Previous state master_host='zlm2', master_port= , master_log_file='', master_log_pos= , master_bind=''. New state master_host='<NULL>', master_port= , master_log_file='', master_log_pos= , master_bind=''.
--14T06::.858279Z [Note] Plugin group_replication reported: 'Retrying group recovery connection with another donor. Attempt 3/10'
Check the "replication_group_member" table which shows the server zlm3 is in a state of recovering.
(root@localhost mysql3306.sock)[performance_schema]::>SELECT * FROM performance_schema.replication_group_members;
+---------------------------+--------------------------------------+-------------+-------------+--------------+
| CHANNEL_NAME | MEMBER_ID | MEMBER_HOST | MEMBER_PORT | MEMBER_STATE |
+---------------------------+--------------------------------------+-------------+-------------+--------------+
| group_replication_applier | 1b7181ee-6eaf-11e8-998e-080027de0e0e | zlm2 | | ONLINE |
| group_replication_applier | 5c77c31b-4add-11e8-81e2-080027de0e0e | zlm3 | | RECOVERING |
+---------------------------+--------------------------------------+-------------+-------------+--------------+
rows in set (0.00 sec)
The error.log on zlm2 shows that the server zlm3 has joined the group who has two members now.
--14T06::.763739Z [Note] Plugin group_replication reported: 'getstart group_id c3244967'
--14T06::.638983Z [Note] Plugin group_replication reported: 'Members joined the group: zlm3:3306'
--14T06::.639079Z [Note] Plugin group_replication reported: 'Group membership changed to zlm2:3306, zlm3:3306 on view 15289529754008535:4.'
But a few minutes later,zlm3 left the group again what we can see below on zlm2.
(root@localhost mysql3306.sock)[performance_schema]::>SELECT * FROM performance_schema.replication_group_members;
ERROR (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id:
Current database: performance_schema +---------------------------+--------------------------------------+-------------+-------------+--------------+
| CHANNEL_NAME | MEMBER_ID | MEMBER_HOST | MEMBER_PORT | MEMBER_STATE |
+---------------------------+--------------------------------------+-------------+-------------+--------------+
| group_replication_applier | 1b7181ee-6eaf-11e8-998e-080027de0e0e | zlm2 | | ONLINE |
+---------------------------+--------------------------------------+-------------+-------------+--------------+
row in set (0.17 sec) ###Error.log output.###
--14T06::.375254Z [Note] Plugin group_replication reported: 'getstart group_id c3244967'
--14T06::.439791Z [Warning] Plugin group_replication reported: 'Members removed from the group: zlm3:3306'
--14T06::.439884Z [Note] Plugin group_replication reported: 'Group membership changed to zlm2:3306 on view 15289529754008535:5.'
--14T06::.556717Z [Note] Aborted connection to db: 'performance_schema' user: 'root' host: 'localhost' (Got timeout reading communication packets)
After server zlm3 have attempted 10 times,the SQL Thread of slave is killed again before the slave leave the group.
--14T06::.369677Z [Note] Plugin group_replication reported: 'Retrying group recovery connection with another donor. Attempt 10/10'
--14T06::.386015Z [Note] 'CHANGE MASTER TO FOR CHANNEL 'group_replication_recovery' executed'. Previous state master_host='<NULL>', master_port= , master_log_file='', master_log_pos= , master_bind=''. New state master_host='zlm2', master_port= , master_log_file='', master_log_pos= , master_bind=''.
--14T06::.405855Z [Note] Plugin group_replication reported: 'Establishing connection to a group replication recovery donor 1b7181ee-6eaf-11e8-998e-080027de0e0e at zlm2 port: 3306.'
--14T06::.405856Z [Warning] Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
--14T06::.405900Z [Note] Slave SQL thread for channel 'group_replication_recovery' initialized, starting replication in log 'FIRST' at position , relay log './relay-bin-group_replication_recovery.000001' position:
--14T06::.407712Z [Note] Slave I/O thread for channel 'group_replication_recovery': connected to master 'rpl_mgr@zlm2:3306',replication started in log 'FIRST' at position
--14T06::.412106Z [ERROR] Error reading packet from server for channel 'group_replication_recovery': The slave is connecting using CHANGE MASTER TO MASTER_AUTO_POSITION = , but the master has purged binary logs containing GTIDs that the slave requires. (server_errno=)
--14T06::.412147Z [ERROR] Slave I/O for channel 'group_replication_recovery': Got fatal error from master when reading data from binary log: 'The slave is connecting using CHANGE MASTER TO MASTER_AUTO_POSITION = 1, but the master has purged binary logs containing GTIDs that the slave requires.', Error_code:
--14T06::.412150Z [Note] Slave I/O thread exiting for channel 'group_replication_recovery', read up to log 'FIRST', position
--14T06::.412498Z [Note] Plugin group_replication reported: 'Terminating existing group replication donor connection and purging the corresponding logs.'
--14T06::.412542Z [Note] Error reading relay log event for channel 'group_replication_recovery': slave SQL thread was killed
--14T06::.424261Z [Note] 'CHANGE MASTER TO FOR CHANNEL 'group_replication_recovery' executed'. Previous state master_host='zlm2', master_port= , master_log_file='', master_log_pos= , master_bind=''. New state master_host='<NULL>', master_port= , master_log_file='', master_log_pos= , master_bind=''.
--14T06::.437615Z [ERROR] Plugin group_replication reported: 'Maximum number of retries when trying to connect to a donor reached. Aborting group replication recovery.'
--14T06::.437632Z [Note] Plugin group_replication reported: 'Terminating existing group replication donor connection and purging the corresponding logs.'
--14T06::.444043Z [Note] 'CHANGE MASTER TO FOR CHANNEL 'group_replication_recovery' executed'. Previous state master_host='<NULL>', master_port= , master_log_file='', master_log_pos= , master_bind=''. New state master_host='<NULL>', master_port= , master_log_file='', master_log_pos= , master_bind=''.
--14T06::.457830Z [ERROR] Plugin group_replication reported: 'Fatal error during the Recovery process of Group Replication. The server will leave the group.'
--14T06::.458777Z [Note] Plugin group_replication reported: 'getstart group_id c3244967'
--14T06::.879847Z [Note] Plugin group_replication reported: 'state 4411 action xa_terminate'
--14T06::.879987Z [Note] Plugin group_replication reported: 'new state x_start'
--14T06::.879993Z [Note] Plugin group_replication reported: 'state 4338 action xa_exit'
--14T06::.880019Z [Note] Plugin group_replication reported: 'Exiting xcom thread'
--14T06::.880027Z [Note] Plugin group_replication reported: 'new state x_start'
--14T06::.898475Z [Note] Plugin group_replication reported: 'Group membership changed: This member has left the group.'
Finally,I figure out the parameter "log-bin" was set to "binlog",but the really name of binlog in my environment is "mysql-bin".Oh my gosh,I'm too careless not to find it out early.These three servers in Group Replication work normally now.
###On the server zlm2.###
(root@localhost mysql3306.sock)[performance_schema]10:14:32>show variables like '%primary%';
+---------------------------------------+-------+
| Variable_name | Value |
+---------------------------------------+-------+
| group_replication_single_primary_mode | ON |
+---------------------------------------+-------+
1 row in set (0.01 sec)
(root@localhost mysql3306.sock)[(none)]10:14:40>select * from performance_schema.replication_group_members;
+---------------------------+--------------------------------------+-------------+-------------+--------------+
| CHANNEL_NAME | MEMBER_ID | MEMBER_HOST | MEMBER_PORT | MEMBER_STATE |
+---------------------------+--------------------------------------+-------------+-------------+--------------+
| group_replication_applier | 1b7181ee-6eaf-11e8-998e-080027de0e0e | zlm2 | 3306 | ONLINE |
| group_replication_applier | 5c77c31b-4add-11e8-81e2-080027de0e0e | zlm3 | 3306 | ONLINE |
| group_replication_applier | fc288b24-6934-11e8-9b0e-080027de0e0e | zlm4 | 3306 | ONLINE |
+---------------------------+--------------------------------------+-------------+-------------+--------------+
3 rows in set (0.00 sec)
(root@localhost mysql3306.sock)[(none)]10:15:15>show global status like 'group_replication_primary_member';
+----------------------------------+--------------------------------------+
| Variable_name | Value |
+----------------------------------+--------------------------------------+
| group_replication_primary_member | 1b7181ee-6eaf-11e8-998e-080027de0e0e |
+----------------------------------+--------------------------------------+
1 row in set (0.00 sec)
(root@localhost mysql3306.sock)[zlm]10:23:34>show tables;
+---------------+
| Tables_in_zlm |
+---------------+
| test_mgr |
+---------------+
1 row in set (0.00 sec)
(root@localhost mysql3306.sock)[zlm]10:23:57>select * from test_mgr;
+----+-----------+
| id | name |
+----+-----------+
| 1 | aaron8219 |
+----+-----------+
1 row in set (0.00 sec)
(root@localhost mysql3306.sock)[zlm]10:24:12>
###On the server zlm3.###
(root@localhost mysql3306.sock)[zlm]10:23:45>show tables;
+---------------+
| Tables_in_zlm |
+---------------+
| t1 |
| t2 |
| t3 |
| test_mgr |
+---------------+
4 rows in set (0.00 sec)
(root@localhost mysql3306.sock)[zlm]10:24:26>select * from test_mgr;
+----+-----------+
| id | name |
+----+-----------+
| 1 | aaron8219 |
+----+-----------+
1 row in set (0.01 sec)
(root@localhost mysql3306.sock)[zlm]10:24:28>insert into test_mgr(name) values('zlm');
ERROR 1290 (HY000): The MySQL server is running with the --super-read-only option so it cannot execute this statement
(root@localhost mysql3306.sock)[zlm]10:24:36>
###On the server zlm4.###
+---------------+
| Tables_in_zlm |
+---------------+
| t1 |
| t2 |
| t3 |
| test_mgr |
+---------------+
4 rows in set (0.01 sec)
(root@localhost mysql.sock)[zlm]10:28:14>select * from test_mgr;
+----+-----------+
| id | name |
+----+-----------+
| 1 | aaron8219 |
+----+-----------+
1 row in set (0.00 sec)
(root@localhost mysql.sock)[zlm]10:28:20>insert into test_mgr(name) values('zlm');
ERROR 1290 (HY000): The MySQL server is running with the --super-read-only option so it cannot execute this statement
(root@localhost mysql3306.sock)[zlm]10:28:58>
- Single-primary mode is supported by default like what I've configured above.
- The first member who creates replication group by starting it is the master who can merely do dml operations.
- Parameter "group_replication_allow_local_disjoint_gtids_join" will lead to inconsistency and be deprecated in 5.7.21.
- Becareful when using the parameters in examples of official documents which are probably imcompatible with your environment,that can cause complex troubleshooting procedure like what I did.
MySQL高可用之MGR安装测试(续)的更多相关文章
- MySQL高可用之MGR安装测试
Preface We've learned the machenism of MGR yesterday,Let's configurate an environment and have s ...
- 【DB宝45】MySQL高可用之MGR+Consul架构部署
目录 一.MGR+Consul架构简介 二.搭建MGR 2.1.申请3台MGR机器 2.2.3台主机安装MySQL环境 2.3.修改MySQL参数 2.4.重启MySQL环境 2.5.安装MGR插件( ...
- MySQL高可用架构-MMM安装教程
安装指南: 一.架构以及服务器信息 基本安装包含至少2个数据库服务器和1个监视服务器.本例中使用2个监视服务器和5个数据库服务器(服务器系统为CentOS 7) 用途 IP 主机名 Server-id ...
- MySQL高可用之PXC安装部署(续)
Preface Yesterday I implemented a three-nodes PXC,but there were some errors when proceeding ...
- MySQL高可用之PXC安装部署
Preface Today,I'm gonna implement a PXC,Let's see the procedure. Framework Hostname IP P ...
- MySQL高可用之MHA切换测试(switchover & failover)
Preface I've installed MasterHA yesterday,Now let's test the master-slave switch and failove ...
- MySQL高可用之MHA安装
Preface MasterHA is a tool which can be used in MySQL HA architecture.I'm gonna implement it ...
- 032:基于Consul和MGR的MySQL高可用架构
目录 一.Consul 1.Consul简介 2.准备环境 3.Consul 安装 4.Consul配置文件 5.Consul 服务检查脚本 6.Consul启动 二.MGR搭建 1.MGR配置 2. ...
- MySQL高可用新玩法之MGR+Consul
前面的文章有提到过利用consul+mha实现mysql的高可用,以及利用consul+sentinel实现redis的高可用,具体的请查看:http://www.cnblogs.com/gomysq ...
随机推荐
- Linux 套接字编程 - select
select 可以感知文件表述符集合中的变化,如果办fd0(即标准输入)放入select的read fd set,发现只有按回车的时候select才会返回.查了下要把终端的缓冲大小设为1,这样就能实现 ...
- MongoDB(online) 优化
MongoDB(online) 优化 1. find.findOne 2. 操作 vip_emp_relation 的一个公共方法 3. 查询记录数 4. save.insert 5. 总结 1. f ...
- Spring MVC 如何加载静态html
在spring mvc的xml文件最后面加上下面这一行<mvc:deault-servlet-handler/>
- event.cancelBubble=true
<tr><a href="xxx">连接</a></tr> 如上结构,单击tr的时候跳转至另一页面 <tr style=&qu ...
- C# Process.WaitForExit()与死锁
前段时间遇到一个问题,搞得焦头烂额,现在记录下来,希望对大家有所帮助. 程序里我使用Process类启动命令行,执行批处理文件 'Create.cmd'(当我手工将此文件拖入命令行执行时,一切正常). ...
- 元素float以后,div高度无法自适应解决方案
首先要明白 >> 浮动的子元素会脱离文档流,不再占据父元素的空间,父元素也就没有了高度. 解决方案:1 给父元素加上overflow:hidden;属性就行了. 第一种:(给父级加over ...
- numpy cheat sheet
numpy cheat sheet https://files.cnblogs.com/files/lion-zheng/Numpy_Python_Cheat_Sheet.pdf
- June 02nd 2017 Week 22nd Friday
A burden of one's choice is not felt. 爱挑的担子不嫌重. When doing things I love to do, I seldom feel tired ...
- 长大DeepMind第一次团队作业
1.队名 长大DeepMind 2.队员风采 学号 姓名 擅长的技术 编程的兴趣点 希望承担的角色 一句话宣言 B20150304508 晏司举 JAVA,ssm框架,MySQL数据库 JAVA后台服 ...
- Lucas 大组合数
题目:HDU 3037 题意:有n个树,m个坚果,放到n个树里,可以不放完,有多少种方法. 分析: 得到组合数了. 大组合数什么费马小定理,Lucas定理都来了: 总的说,不能用二维地推了,用的却是组 ...