Galera cluster is being created using mariadb docker image. The first node is bootstrapped successfully, 2 others fail.
One with

MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
2017-05-10 14:01:34 139839130081216 [ERROR] WSREP: failed to open gcomm backend connection: 110: failed to reach primary view:nection timed out)
         at gcomm/src/pc.cpp:connect():158
2017-05-10 14:01:34 139839130081216 [ERROR] WSREP: gcs/src/gcs_core.cpp:gcs_core_open():208: Failed to open backend connectiononnection timed out)
2017-05-10 14:01:34 139839130081216 [ERROR] WSREP: gcs/src/gcs.cpp:gcs_open():1380: Failed to open channel 'my_wsrep_cluster' ://10.0.0.5': -110 (Connection timed out)
2017-05-10 14:01:34 139839130081216 [ERROR] WSREP: gcs connect failed: Connection timed out
2017-05-10 14:01:34 139839130081216 [ERROR] WSREP: wsrep::connect(gcomm://10.0.0.5) failed: 7
2017-05-10 14:01:34 139839130081216 [ERROR] Aborting

MySQL init process failed.

Second with:

MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process in progress...
MySQL init process failed.

my.cnf is being copied during custom image creation

Dockerfile:

FROM mariadb:10.1
COPY paas-docker-entrypoint.sh /paas-docker-entrypoint.sh
COPY my.cnf /etc/mysql/my.cnf
ENTRYPOINT ["/paas-docker-entrypoint.sh"]

paas-docker-entrypoint.sh contains

_#!/bin/bash
sleep 259200 # 3 days to allow for restore
exec docker-entrypoint.sh mysqld --verbose_

It contains the following galera settings:

[galera]
# Mandatory settings
wsrep_on=ON
wsrep_provider=/usr/lib/libgalera_smm.so
wsrep_cluster_address=gcomm://
binlog_format=row
default_storage_engine=InnoDB
innodb_autoinc_lock_mode=2

General cluster creation procedure: 1) bootsrap first node (kill sleep) 2) write to my.cnf of the remaninig nodes wsrepclusteraddress=gcomm://bootstrapnodeip 3) start 2 remaining nodes by killing sleep
Because of the above errors, only bootstrap node remains running.

It’s interesting that restarting all of the nodes results in cluster of size 3.
Another solution was adding /var/lib/mysql/mysql empty folder to the containers of the remaining nodes before starting mysqld in them (by killing sleep) and 2 containers started up successfully.
Is it correct solution to the above errors in the logs?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

I just came across the same problem and this helped me fix my issue:

https://github.com/docker-library/mysql/issues/82

Basically the env_file included the MYSQL_HOST environment variable - as it was used by another container - but it should be empty.

Submit an Answer