Preface
 
    I've implemented the Group Replication with three servers yesterday,What a shame it eventually terminated in several glitches.Now that it doesn't work appropriately,I decide to inquire what has happened and solve the problems.Let's see some details below.
 
Procedure
 
    Here's some phenomena in the error.log file of zlm2 when I started the Group Replicaiotn on server zlm2 and subsequently the server zlm3:
 
 --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)
    There're some clues in the error.log file on zlm3 in the same time after I've started Group Replication.

 

 --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)
    In my test environment,the database on server zlm3 is different from zlm2,as it is the master in my master-slave replication.Howerver the server zlm2 is a newly initialized one which has no old data.they have their own data respectively.
 
    The error.log indicates the reason why zlm3 cannot join the group of Group Replication.The workaround is shown above by setting "group_replication_allow_local_disjoint_gtids_join" parameter to force zlm3 join the group.Let's have a try and see whether it makes sence.
 (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>

Summary
  • 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安装测试(续)的更多相关文章

  1. MySQL高可用之MGR安装测试

    Preface     We've learned the machenism of MGR yesterday,Let's configurate an environment and have s ...

  2. 【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插件( ...

  3. MySQL高可用架构-MMM安装教程

    安装指南: 一.架构以及服务器信息 基本安装包含至少2个数据库服务器和1个监视服务器.本例中使用2个监视服务器和5个数据库服务器(服务器系统为CentOS 7) 用途 IP 主机名 Server-id ...

  4. MySQL高可用之PXC安装部署(续)

      Preface       Yesterday I implemented a three-nodes PXC,but there were some errors when proceeding ...

  5. MySQL高可用之PXC安装部署

      Preface       Today,I'm gonna implement a PXC,Let's see the procedure.   Framework   Hostname IP P ...

  6. MySQL高可用之MHA切换测试(switchover & failover)

      Preface       I've installed MasterHA yesterday,Now let's test the master-slave switch and failove ...

  7. MySQL高可用之MHA安装

      Preface       MasterHA is a tool which can be used in MySQL HA architecture.I'm gonna implement it ...

  8. 032:基于Consul和MGR的MySQL高可用架构

    目录 一.Consul 1.Consul简介 2.准备环境 3.Consul 安装 4.Consul配置文件 5.Consul 服务检查脚本 6.Consul启动 二.MGR搭建 1.MGR配置 2. ...

  9. MySQL高可用新玩法之MGR+Consul

    前面的文章有提到过利用consul+mha实现mysql的高可用,以及利用consul+sentinel实现redis的高可用,具体的请查看:http://www.cnblogs.com/gomysq ...

随机推荐

  1. GitHub网页端和客户端操作

    参见GitHub上的repository中的moreLove.tata.tata2 moreLove 在网页版GitHub上创建的空项目然后填充的tata 在windows客户端创建的空项目然后填充的 ...

  2. ADO.NET Tips

    1. SqlCommand.ExecuteScalar Method Executes the query, and returns the first column of the first row ...

  3. mysql忘记root用户密码重置密码的方式

    解决方法如下: 让mysql不载入权限表,命令:mysqld --skip-grant-tables(windows).mysqld_safe --skip-grant-tables user=mys ...

  4. How to reference two table when lack reference column.

    Question:How to reference two table when lack reference column. Example: 1.Create two tables the one ...

  5. 一点一点学写Makefile(2)-自动搜所当前目录下的所有源文件

    上个博客我们使用的是笨方法添加源文件,本次我要实现的是遍历文件夹来获得所有的cpp文件 //makefile CROSS = CC = $(CROSS)gcc CXX = $(CROSS)g++ DE ...

  6. 团队第三次scrum

    长大一条龙之课表查询 一.设计概要 本次内容主要是实现了长大一条龙系统的课表查询功能,我们的这个项目严格遵守MVC架构,采用前后端分离的策略.我们将课表查询分为二层,DAO层:负责与数据进行交互,读写 ...

  7. Black Rock Shooter 题解

    题目描述 在人气动漫 Black Rock shooter 中,当加贺里对麻陶 说出了“滚回去“以后,与此同时,在另一个心灵世界里, BRS 也遭到了敌人的攻击.此时,一共有 n 个攻击排成一行 朝着 ...

  8. where are you going ? 反序为:going you are where

    一个反序小算法,就是首尾替换,生成新的反序后的数组

  9. VS中添加预处理宏的方法

    VS中添加预处理宏的方法 除了在.c及.h中添加宏定义之外,还可以采用如下方法添加宏定义: 1.若只需要定义一个宏(如#define DEBUG),可以右键点击工程-->属性-->c/c+ ...

  10. 使用canvas上传图片+上传进度

    实现效果: 速度过快,调式浏览器方式:F12 后台java代码 public String imageshangchuan(@RequestPart("xxx") Multipar ...