Cannot create InnoDB cluster on AWS EC2, group replication fail
Posted by: Rukeith Tseng
Date: September 26, 2018 03:37AM
Date: September 26, 2018 03:37AM
I am trying to deploy MySQL InnoDB Cluster on AWS EC2 (Version 5.7)
When I run `dba.createCluster('test')`, I got error.
Please someone could help me.
```
Dba.createCluster: ERROR: Error starting cluster: 'node1:3306' - Query failed. MySQL Error (3092): ClassicSession.query: The server is not configured properly to be an active member of the group. Please see more details on error log.. Query: START group_replication: MySQL Error (3092): ClassicSession.query: The server is not configured properly to be an active member of the group. Please see more details on error log. (RuntimeError)
```
I check the log at /var/log/mysqld.log. I don't know how to fix this. I search many articles say I need to add ip to whitelist. But it still error.
```
2018-09-26T09:04:30.291149Z 18 [Warning] Neither --relay-log nor --relay-log-index were used; so replication may break when this MySQL server acts as a slave and has his hostname changed!! Please use '--relay-log=ip-172-31-19-11-relay-bin' to avoid this problem.
2018-09-26T09:04:30.297475Z 18 [Note] 'CHANGE MASTER TO FOR CHANNEL 'group_replication_recovery' executed'. Previous state master_host='', master_port= 3306, master_log_file='', master_log_pos= 4, master_bind=''. New state master_host='', master_port= 3306, master_log_file='', master_log_pos= 4, master_bind=''.
2018-09-26T09:04:30.305972Z 18 [Note] Plugin group_replication reported: 'Group communication SSL configuration: group_replication_ssl_mode: "REQUIRED"; server_key_file: "server-key.pem"; server_cert_file: "server-cert.pem"; client_key_file: "server-key.pem"; client_cert_file: "server-cert.pem"; ca_file: "ca.pem"; ca_path: ""; cipher: ""; tls_version: "TLSv1,TLSv1.1"; crl_file: ""; crl_path: ""'
2018-09-26T09:04:30.306066Z 18 [Note] Plugin group_replication reported: '[GCS] Added automatically IP ranges 127.0.0.1/8,172.31.19.11/20 to the whitelist'
2018-09-26T09:04:30.306240Z 18 [Note] Plugin group_replication reported: '[GCS] Translated 'node1' to 172.31.19.11'
2018-09-26T09:04:30.306421Z 18 [Warning] Plugin group_replication reported: '[GCS] Automatically adding IPv4 localhost address to the whitelist. It is mandatory that it is added.'
2018-09-26T09:04:30.306735Z 18 [Note] Plugin group_replication reported: 'Initialized group communication with configuration: group_replication_group_name: "2d708904-c16b-11e8-91a4-0682e52f1d54"; group_replication_local_address: "node1:33061"; group_replication_group_seeds: "node1:3306,node2:3306,node3:3306"; group_replication_bootstrap_group: true; group_replication_poll_spin_loops: 0; group_replication_compression_threshold: 1000000; group_replication_ip_whitelist: "AUTOMATIC"'
2018-09-26T09:04:30.306770Z 18 [Note] Plugin group_replication reported: '[GCS] Configured number of attempts to join: 0'
2018-09-26T09:04:30.306776Z 18 [Note] Plugin group_replication reported: '[GCS] Configured time between attempts to join: 5 seconds'
2018-09-26T09:04:30.306796Z 18 [Note] Plugin group_replication reported: 'Member configuration: member_id: 1; member_uuid: "6d682855-c165-11e8-9574-0682e52f1d54"; single-primary mode: "true"; group_replication_auto_increment_increment: 7; '
2018-09-26T09:04:30.314934Z 20 [Note] 'CHANGE MASTER TO FOR CHANNEL 'group_replication_applier' executed'. Previous state master_host='', master_port= 3306, master_log_file='', master_log_pos= 4, master_bind=''. New state master_host='<NULL>', master_port= 0, master_log_file='', master_log_pos= 4, master_bind=''.
2018-09-26T09:04:30.328730Z 23 [Note] Slave SQL thread for channel 'group_replication_applier' initialized, starting replication in log 'FIRST' at position 0, relay log './ip-172-31-19-11-relay-bin-group_replication_applier.000001' position: 4
2018-09-26T09:04:30.329085Z 18 [Note] Plugin group_replication reported: 'Group Replication applier module successfully initialized!'
2018-09-26T09:04:30.357797Z 0 [Note] Plugin group_replication reported: 'XCom protocol version: 3'
2018-09-26T09:04:30.357818Z 0 [Note] Plugin group_replication reported: 'XCom initialized and ready to accept incoming connections on port 33061'
2018-09-26T09:04:40.361408Z 0 [ERROR] Plugin group_replication reported: '[GCS] Error connecting to the local group communication engine instance.'
2018-09-26T09:04:40.375243Z 0 [ERROR] Plugin group_replication reported: '[GCS] The member was unable to join the group. Local port: 33061'
2018-09-26T09:05:30.329294Z 18 [ERROR] Plugin group_replication reported: 'Timeout on wait for view after joining group'
2018-09-26T09:05:30.329343Z 18 [Note] Plugin group_replication reported: 'Requesting to leave the group despite of not being a member'
2018-09-26T09:05:30.329361Z 18 [ERROR] Plugin group_replication reported: '[GCS] The member is leaving a group without being on one.'
2018-09-26T09:05:30.329573Z 23 [Note] Error reading relay log event for channel 'group_replication_applier': slave SQL thread was killed
2018-09-26T09:05:30.329584Z 23 [Note] Slave SQL thread for channel 'group_replication_applier' exiting, replication stopped in log 'FIRST' at position 0
2018-09-26T09:05:30.331042Z 20 [Note] Plugin group_replication reported: 'The group replication applier thread was killed'
```
My my.cnf
```
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
server_id=1
gtid_mode=ON
enforce_gtid_consistency=ON
binlog_checksum=NONE
log_bin=binlog
log_slave_updates=ON
binlog_format=ROW
master_info_repository=TABLE
relay_log_info_repository=TABLE
transaction_write_set_extraction=XXHASH64
loose-group_replication_group_name="ed142e35-6ed1-11e8-86c6-080027de0e0e"
loose-group_replication_start_on_boot=off
loose-group_replication_local_address= "127.0.0.1:3306"
loose-group_replication_group_seeds= "127.0.0.1:3306,node2:3306,node3:3306"
loose-group_replication_bootstrap_group=off
```
When I run `dba.createCluster('test')`, I got error.
Please someone could help me.
```
Dba.createCluster: ERROR: Error starting cluster: 'node1:3306' - Query failed. MySQL Error (3092): ClassicSession.query: The server is not configured properly to be an active member of the group. Please see more details on error log.. Query: START group_replication: MySQL Error (3092): ClassicSession.query: The server is not configured properly to be an active member of the group. Please see more details on error log. (RuntimeError)
```
I check the log at /var/log/mysqld.log. I don't know how to fix this. I search many articles say I need to add ip to whitelist. But it still error.
```
2018-09-26T09:04:30.291149Z 18 [Warning] Neither --relay-log nor --relay-log-index were used; so replication may break when this MySQL server acts as a slave and has his hostname changed!! Please use '--relay-log=ip-172-31-19-11-relay-bin' to avoid this problem.
2018-09-26T09:04:30.297475Z 18 [Note] 'CHANGE MASTER TO FOR CHANNEL 'group_replication_recovery' executed'. Previous state master_host='', master_port= 3306, master_log_file='', master_log_pos= 4, master_bind=''. New state master_host='', master_port= 3306, master_log_file='', master_log_pos= 4, master_bind=''.
2018-09-26T09:04:30.305972Z 18 [Note] Plugin group_replication reported: 'Group communication SSL configuration: group_replication_ssl_mode: "REQUIRED"; server_key_file: "server-key.pem"; server_cert_file: "server-cert.pem"; client_key_file: "server-key.pem"; client_cert_file: "server-cert.pem"; ca_file: "ca.pem"; ca_path: ""; cipher: ""; tls_version: "TLSv1,TLSv1.1"; crl_file: ""; crl_path: ""'
2018-09-26T09:04:30.306066Z 18 [Note] Plugin group_replication reported: '[GCS] Added automatically IP ranges 127.0.0.1/8,172.31.19.11/20 to the whitelist'
2018-09-26T09:04:30.306240Z 18 [Note] Plugin group_replication reported: '[GCS] Translated 'node1' to 172.31.19.11'
2018-09-26T09:04:30.306421Z 18 [Warning] Plugin group_replication reported: '[GCS] Automatically adding IPv4 localhost address to the whitelist. It is mandatory that it is added.'
2018-09-26T09:04:30.306735Z 18 [Note] Plugin group_replication reported: 'Initialized group communication with configuration: group_replication_group_name: "2d708904-c16b-11e8-91a4-0682e52f1d54"; group_replication_local_address: "node1:33061"; group_replication_group_seeds: "node1:3306,node2:3306,node3:3306"; group_replication_bootstrap_group: true; group_replication_poll_spin_loops: 0; group_replication_compression_threshold: 1000000; group_replication_ip_whitelist: "AUTOMATIC"'
2018-09-26T09:04:30.306770Z 18 [Note] Plugin group_replication reported: '[GCS] Configured number of attempts to join: 0'
2018-09-26T09:04:30.306776Z 18 [Note] Plugin group_replication reported: '[GCS] Configured time between attempts to join: 5 seconds'
2018-09-26T09:04:30.306796Z 18 [Note] Plugin group_replication reported: 'Member configuration: member_id: 1; member_uuid: "6d682855-c165-11e8-9574-0682e52f1d54"; single-primary mode: "true"; group_replication_auto_increment_increment: 7; '
2018-09-26T09:04:30.314934Z 20 [Note] 'CHANGE MASTER TO FOR CHANNEL 'group_replication_applier' executed'. Previous state master_host='', master_port= 3306, master_log_file='', master_log_pos= 4, master_bind=''. New state master_host='<NULL>', master_port= 0, master_log_file='', master_log_pos= 4, master_bind=''.
2018-09-26T09:04:30.328730Z 23 [Note] Slave SQL thread for channel 'group_replication_applier' initialized, starting replication in log 'FIRST' at position 0, relay log './ip-172-31-19-11-relay-bin-group_replication_applier.000001' position: 4
2018-09-26T09:04:30.329085Z 18 [Note] Plugin group_replication reported: 'Group Replication applier module successfully initialized!'
2018-09-26T09:04:30.357797Z 0 [Note] Plugin group_replication reported: 'XCom protocol version: 3'
2018-09-26T09:04:30.357818Z 0 [Note] Plugin group_replication reported: 'XCom initialized and ready to accept incoming connections on port 33061'
2018-09-26T09:04:40.361408Z 0 [ERROR] Plugin group_replication reported: '[GCS] Error connecting to the local group communication engine instance.'
2018-09-26T09:04:40.375243Z 0 [ERROR] Plugin group_replication reported: '[GCS] The member was unable to join the group. Local port: 33061'
2018-09-26T09:05:30.329294Z 18 [ERROR] Plugin group_replication reported: 'Timeout on wait for view after joining group'
2018-09-26T09:05:30.329343Z 18 [Note] Plugin group_replication reported: 'Requesting to leave the group despite of not being a member'
2018-09-26T09:05:30.329361Z 18 [ERROR] Plugin group_replication reported: '[GCS] The member is leaving a group without being on one.'
2018-09-26T09:05:30.329573Z 23 [Note] Error reading relay log event for channel 'group_replication_applier': slave SQL thread was killed
2018-09-26T09:05:30.329584Z 23 [Note] Slave SQL thread for channel 'group_replication_applier' exiting, replication stopped in log 'FIRST' at position 0
2018-09-26T09:05:30.331042Z 20 [Note] Plugin group_replication reported: 'The group replication applier thread was killed'
```
My my.cnf
```
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
server_id=1
gtid_mode=ON
enforce_gtid_consistency=ON
binlog_checksum=NONE
log_bin=binlog
log_slave_updates=ON
binlog_format=ROW
master_info_repository=TABLE
relay_log_info_repository=TABLE
transaction_write_set_extraction=XXHASH64
loose-group_replication_group_name="ed142e35-6ed1-11e8-86c6-080027de0e0e"
loose-group_replication_start_on_boot=off
loose-group_replication_local_address= "127.0.0.1:3306"
loose-group_replication_group_seeds= "127.0.0.1:3306,node2:3306,node3:3306"
loose-group_replication_bootstrap_group=off
```
Subject
Views
Written By
Posted
Cannot create InnoDB cluster on AWS EC2, group replication fail
1489
September 26, 2018 03:37AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.