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. lLinux安装JDK

    1.在Linux中新建文件夹  mkdir /usr/local/java 2.上传jdk-7u55-linux-i586.tar到Linux中 3.解压文件  tar xzvf jdk-7u55-l ...

  2. Flask入门文件上传flask-uploads(八)

    1 视图传递多个参数 (1) 普通传参 : 关键字参数传递 return render_template('模板名称.html',arg1=val1,arg2=val2...) (2) 字典传参 : ...

  3. Windows装系统

    这几天电脑频繁崩溃,自己尝试着装了几次系统,遇到一些问题.有的解决了,有的没解决.将其一一记录在这里,作为经验参考. 自己以前最常用的方式是直接通过ultraiso将IOS文件解压到到U盘,会将U盘做 ...

  4. 用unoreder_map实现词频统计

    博客写在CSDN了,google了一下移植真的巨麻烦.... 这里贴个网址算了.... https://blog.csdn.net/z1991998920/article/details/796891 ...

  5. NO.011-2018.02.16《三五七言 / 秋风词》唐代:李白

    三五七言 / 秋风词_古诗文网 三五七言 / 秋风词 唐代:李白 秋风清,秋月明,秋风凌清,秋月明朗. 落叶聚还散,寒鸦栖复惊.风中的落叶时聚时散,寒鸦本已栖息,又被明月惊起.落叶聚还(huán)散: ...

  6. IOS VFL语言(页面布局)

    ● 什么是VFL语言 ● VFL全称是Visual Format Language,翻译过来是“可视化格式语言” ● VFL是苹果公司为了简化Autolayout的编码而推出的抽象语言     VFL ...

  7. linux自动备份文件 并上传到远程服务器 脚本实现

    (1)在服务器上创建备份目录,并赋予权限       mkdir -p /backup/bakdata  #新建数据备份目录(2)完成备份脚本操作新建脚本文件      vi bakdata.sh添加 ...

  8. 20165322 实验三 敏捷开发与XP实践

    实验三 敏捷开发与XP实践 安装alibaba 插件,解决代码中的规范问题 根据老师的教程:打开Settings ->Plugins -> Browse repositories...在搜 ...

  9. 2018.12.14 Mac的Matlab2018a软件及其安装步骤

    软件百度云链接:https://pan.baidu.com/s/1q3EO5up-1YuAQ4gEi7sTwQ 密码:p6mf MATLAB R2018a for Mac破解说明 1.MATLAB R ...

  10. 【luogu P2251 质量检测】 题解

    也是一道ST表的板子题,很裸的RMQ问题,只需要在查询区间时处理一下下就好啦~ #include <cstdio> #include <algorithm> using nam ...