I have been trying to set up an MySQL Innodb Cluster, initially with two databases, both MySQL 8.0.19.
But I keep getting the same errors.
On the first one (username@1.2.3.4:3306), I have created the cluster, and that seems to be ok.
then I run:
cluster.addInstance('username@1.2.3.5:3306')
and get:
ERROR: Unable to start Group Replication for instance 'dbname1:3306'. Please check the MySQL server error log for more information.
Cluster.addInstance: Group Replication failed to start: MySQL Error 3096 (HY000): dbname1:3306: The START GROUP_REPLICATION command failed as there was an error when initializing the group communication layer. (RuntimeError)
From the errorlog on the second DB I get:
[Warning] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] Peer address "dbname:33061" is not valid.'
[ERROR] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] None of the provided peer address is valid.'
[ERROR] [MY-011674] [Repl] Plugin group_replication reported: 'Unable to initialize the group communication engine'
[ERROR] [MY-011637] [Repl] Plugin group_replication reported: 'Error on group communication engine initialization'
[Note] [MY-011649] [Repl] Plugin group_replication reported: 'Requesting to leave the group despite of not being a member'
[ERROR] [MY-011718] [Repl] Plugin group_replication reported: 'Error calling group communication interfaces while trying to leave the group'
My configuration thus far (from DB1) is:
group_replication_ip_whitelist="1.2.3.4,1.2.3.5"
group_replication_local_address="1.2.3.4:3306"
group_replication_group_seeds="1.2.3.4:3306,1.2.3.5:3306"
I thought maybe it was an issue with port 33061, so I tried using port 33061 for MySQL's port, and 3306 for the Cluster CommunicationPort with
cluster.addInstance('username@1.2.3.5:33061',{localAddress:"dbname:3306"})
But got the same errors.
Have I missed something obvious?