Question

MySQL init process in progress... loop then MySQL init process failed during MariaDB Galera Cluster configuration

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 wsrep_cluster_address=gcomm://bootstrap_node_ip 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?


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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.