Closed MisterDeeds closed 2 years ago
Hello, The cluster still bootstraping. You need to wait until the cluster bootstraped.
Hello and thanks for the answer. Unfortunately, the cluster still has the same status even after a few days.
Node 1
Node 2
Node 3
I have also enabled the following ports
My docker-compose.yml looks like this
version: '3.4'
services:
seed:
image: colinmollenhour/mariadb-galera-swarm
environment:
- XTRABACKUP_PASSWORD=/run/secrets/mysql.xtrabackup_password
- MYSQL_USER=root
- MYSQL_PASSWORD=/run/secrets/mysql.db_password
- MYSQL_DATABASE=database
- MYSQL_ROOT_PASSWORD=/run/secrets/mysql.root_password
- NODE_ADDRESS=^10.0.*.*
networks:
- galera_network
command: seed
volumes:
- mysql-data:/var/lib/mysql
secrets:
- mysql.xtrabackup_password
- mysql.db_password
- mysql.root_password
node:
image: colinmollenhour/mariadb-galera-swarm
environment:
- XTRABACKUP_PASSWORD=/run/secrets/mysql.xtrabackup_passwordi
- NODE_ADDRESS=^10.0.*.*
- HEALTHY_WHILE_BOOTING=1
networks:
- galera_network
command: node tasks.seed,tasks.node
volumes:
- mysql-data:/var/lib/mysql
deploy:
replicas: 0
secrets:
- mysql.xtrabackup_password
ports:
- 3306:3306
- 4444:4444
- 4567:4567/tcp
- 4567:4567/udp
- 4568:4568
- 8080:8080
- 8081:8081
volumes:
mysql-data:
name: '{{.Service.Name}}-{{.Task.Slot}}-data'
driver: local
networks:
galera_network:
driver: overlay
secrets:
mysql.xtrabackup_password:
external: true
mysql.db_password:
external: true
mysql.root_password:
external: true
I am not quite clear what the NODE_ADDRESS means. Does it have to correspond to the node on which the container is running?
After some time this message appears in all containers:
===|mysqld.sh|===: Could not communicate with at least 1 other nodes and no nodes are up... Giving up!
===|mysqld.sh|===: Refusing to start since something is seriously wrong..
===|mysqld.sh|===: Touch /var/lib/mysql/new-cluster to force a node to start a new cluster.
===|mysqld.sh|===:
===|mysqld.sh|===: VvVvVv
===|mysqld.sh|===: |- -| //
===|mysqld.sh|===: <----|O O|---<<<
===|mysqld.sh|===: | D | \\
===|mysqld.sh|===: | () |
===|mysqld.sh|===: \__/
===|mysqld.sh|===:
MariaDB exited with return code (0)
# GALERA saved state
version: 2.1
uuid: 00000000-0000-0000-0000-000000000000
seqno: -1
safe_to_bootstrap: 1
The NODE_ADDRESS
env variable corresponds to the Galera --wsrep-node-address variable - the nodes must be able to communicate with each other on this IP address. I don't know anything about Portainer, but is this address one that nodes can reach each-other on? You can exec into the container and try ip addr
and getent hosts $(hostname)
to see what the different interface addresses are and then try tools like ping and telnet to see if a connection can be established between nodes. Once you find an interface that works you can set NODE_ADDRESS to either the interface name or a pattern that matches the IP and you should be good to go.
Hello together
I am new to the topic with Docker Swarm and Galera. Unfortunately I don't quite understand what the problem is. Maybe you can help me further. I have three hosts running Docker Swarm and Portainer. Other containers on them run without problems. I used the following example (https://github.com/colinmollenhour/mariadb-galera-swarm/tree/master/examples/swarm) to initialize the cluster. Here is my docker-compose.yml
It looks like the containers are started on the 3 hosts.
Here are the log files of the containers:
SrvContHost01
SrvContHost02
SrvContHost03
Unfortunately, I do not understand the meaning of NODE_ADDRESS. Furthermore it is not clear to me whether the ports e.g. 3306 must be released or not?
Sorry for my ignorance and already many thanks for the help
Many greetings