0

With the recent upgrade of MySQL from 8.0.13 to 8.0.14 on Ubuntu 18.04.1 LTS, I started getting an error by the time I issue the dba.createCluster('mycluster') after following the procedure to create from scratch a 3 machine InnoDB Cluster using the MySQL Shell interface:

MySQL | JS > dba.createCluster('mycluster')

A new InnoDB cluster will be created on instance 'root@server1:3306'.

Validating instance at server1:3306...

This instance reports its own address as server1

Instance configuration is suitable.
Creating InnoDB cluster 'mycluster' on 'root@server1:3306'...

Dba.createCluster: ERROR: Error starting cluster: 'server1: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)

Please note that prior to running the above command I already run the dba.checkInstanceConfiguration('server1') and dba.configureInstance('server1') with success.

Looking at the /var/log/mysql/error.log file immediately after running the dba.createCluster('mycluster') this is what I get:

[System] [MY-010597] [Repl] '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=''.
[Warning] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] Automatically adding IPv4 localhost address to the whitelist. It is mandatory that it is added.'
[Warning] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] Automatically adding IPv6 localhost address to the whitelist. It is mandatory that it is added.'
[System] [MY-010597] [Repl] 'CHANGE MASTER TO FOR CHANNEL 'group_replication_applier' executed'. Previous state master_host='<NULL>', master_port= 0, 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=''.
[ERROR] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] Unable to announce tcp port 33061. Port already in use?'
[ERROR] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] Error joining the group while waiting for the network layer to become ready.'
[ERROR] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] The member was unable to join the group. Local port: 33061'
[ERROR] [MY-011640] [Repl] Plugin group_replication reported: 'Timeout on wait for view after joining group'
[ERROR] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] The member is leaving a group without being on one.'

I have nothing running on port 33061 as the above log output may suggest. Before and after running the dba.createCluster command this is what I have:

# netstat -ltupn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      612/systemd-resolve 
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      816/sshd            
tcp        0      0 10.131.16.221:33060     0.0.0.0:*               LISTEN      870/mysqld          
tcp        0      0 10.131.16.221:33062     0.0.0.0:*               LISTEN      870/mysqld          
tcp        0      0 10.131.16.221:3306      0.0.0.0:*               LISTEN      870/mysqld          
udp        0      0 127.0.0.53:53           0.0.0.0:*                           612/systemd-resolve

The expected behaviour would be to appear a new entry in the above output with 10.131.16.221:33061 after running dba.createCluster but nothing changes...

This is what I have in my /etc/mysql/mysql.conf.d/mysqld.cnf file:

[mysqld]
pid-file        = /var/run/mysqld/mysqld.pid
socket          = /var/run/mysqld/mysqld.sock
datadir         = /var/lib/mysql
log-error       = /var/log/mysql/error.log

admin-address = server1
bind-address = server1
mysqlx_bind_address = server1
session_track_gtids = OWN_GTID
log_timestamps = SYSTEM
default-authentication-plugin = mysql_native_password

And this is what shows for the server group replication settings when I run:

MySQL | SQL > show variables like '%replication%'

+-----------------------------------------------------+--------------------------------------+
| Variable_name                                       | Value                                |
+-----------------------------------------------------+--------------------------------------+
| group_replication_allow_local_lower_version_join    | OFF                                  |
| group_replication_auto_increment_increment          | 7                                    |
| group_replication_bootstrap_group                   | ON                                   |
| group_replication_communication_debug_options       | GCS_DEBUG_NONE                       |
| group_replication_components_stop_timeout           | 31536000                             |
| group_replication_compression_threshold             | 1000000                              |
| group_replication_consistency                       | EVENTUAL                             |
| group_replication_enforce_update_everywhere_checks  | OFF                                  |
| group_replication_exit_state_action                 | READ_ONLY                            |
| group_replication_flow_control_applier_threshold    | 25000                                |
| group_replication_flow_control_certifier_threshold  | 25000                                |
| group_replication_flow_control_hold_percent         | 10                                   |
| group_replication_flow_control_max_quota            | 0                                    |
| group_replication_flow_control_member_quota_percent | 0                                    |
| group_replication_flow_control_min_quota            | 0                                    |
| group_replication_flow_control_min_recovery_quota   | 0                                    |
| group_replication_flow_control_mode                 | QUOTA                                |
| group_replication_flow_control_period               | 1                                    |
| group_replication_flow_control_release_percent      | 50                                   |
| group_replication_force_members                     |                                      |
| group_replication_group_name                        | de380568-1fc9-11e9-9a08-cad7c4f1e463 |
| group_replication_group_seeds                       |                                      |
| group_replication_gtid_assignment_block_size        | 1000000                              |
| group_replication_ip_whitelist                      | AUTOMATIC                            |
| group_replication_local_address                     | server1:33061                      |
| group_replication_member_expel_timeout              | 0                                    |
| group_replication_member_weight                     | 50                                   |
| group_replication_poll_spin_loops                   | 0                                    |
| group_replication_recovery_complete_at              | TRANSACTIONS_APPLIED                 |
| group_replication_recovery_get_public_key           | OFF                                  |
| group_replication_recovery_public_key_path          |                                      |
| group_replication_recovery_reconnect_interval       | 60                                   |
| group_replication_recovery_retry_count              | 10                                   |
| group_replication_recovery_ssl_ca                   |                                      |
| group_replication_recovery_ssl_capath               |                                      |
| group_replication_recovery_ssl_cert                 |                                      |
| group_replication_recovery_ssl_cipher               |                                      |
| group_replication_recovery_ssl_crl                  |                                      |
| group_replication_recovery_ssl_crlpath              |                                      |
| group_replication_recovery_ssl_key                  |                                      |
| group_replication_recovery_ssl_verify_server_cert   | OFF                                  |
| group_replication_recovery_use_ssl                  | ON                                   |
| group_replication_single_primary_mode               | ON                                   |
| group_replication_ssl_mode                          | REQUIRED                             |
| group_replication_start_on_boot                     | ON                                   |
| group_replication_transaction_size_limit            | 150000000                            |
| group_replication_unreachable_majority_timeout      | 0                                    |
| innodb_replication_delay                            | 0                                    |
+-----------------------------------------------------+--------------------------------------+

I don't know what might be wrong with my settings as I followed the same steps with the MySQL version 8.0.13 and everything worked well on my Ubuntu 18.04 LTS env with the same MySQL settings... Only with the MySQL version 8.0.14 this started to happen.

Has anyone experienced the same problem? Help or clues much appreciated!

zzpdr
  • 3
  • 3
  • I'm in a similar situation. Unable to create cluster with the latest version, MySQL 8.0.14 – cmancre Jan 24 '19 at 14:08
  • 1
    Few minutes ago came across this: [link] https://bugs.mysql.com/bug.php?id=94004 So it seems to be a bug related to IPv6... My machines don't have IPv6 enabled.. I have the `ipv6.disable=1` in grub cmdline and as mentioned in the above link removing it "Seems to allow for the mysql daemon to bind correctly and process further."... I will do that in the meanwhile. – zzpdr Jan 24 '19 at 15:04
  • Self-answer this question and get some number of Reputation points. – Rick James Jan 27 '19 at 22:13
  • This Q&A probably belongs in dba.stackexchange.com – Rick James Jan 27 '19 at 22:14

1 Answers1

0

This is a bug in 8.0.14, in 8.0.15 the problem is resolved

https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-15.html