MySQL Cluster on Docker Swarm -- issues
I've taken the new mysql/mysql-cluster image and tried to get it running on Docker Swarm. I supply .cnf files through Docker Secrets and pin services to specific swarm nodes using placement prefs so they can store their local data.
However, I cannot get data nodes to connect to the manager. I believe problem is the use of Virtual IPs in Docker Swarm.
My service is called 'mysql_data2' and if you lookup the address for this hostname you get the virtual IP 10.0.1.4. However, the single container for this service has the actual IP 10.0.1.5. The hostname 'mysql_data2' is registered with the cluster management node in its config.ini file. I see this error in the data node:
Failed to allocate nodeid, error: 'Error: Could not alloc node id at mysql_mgmt port 1186: Connection done from wrong host ip 10.0.1.5.
Is there any way to bootstrap the system? Does MySQL Cluster rely on registering by IP address/hostname alone or is there some other way to do it that can handle changing IPs, NAT, ...
Generally there is no way to know the IP of the container or its hostname ahead of time (and it might change).
Subject
Views
Written By
Posted
MySQL Cluster on Docker Swarm -- issues
4562
June 29, 2017 12:37PM
1331
July 03, 2017 02:13PM
1125
July 12, 2017 09:32AM
1060
July 12, 2017 04:13PM
1042
July 14, 2017 06:39AM
1408
July 17, 2017 09:06AM
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.