MySQL init process failed. Docker on Ubuntu 16.04

I’m having a tough time getting Xibo running in Docker on Ubuntu 16.04. I’ve been following the guide here: Xibo 1.8.0 with Docker on Ubuntu 16.04

Everything seems very straight forward but after starting docker-compose up -d, I can’t load the login page by navigating to the IP address of the server. (DigitalOcean brand new droplet just for this.)

When I run docker-compose up to see the output, I see cms-db_1 | MySQL init process failed. and it gets stuck in a loop trying to complete that step. If I let it run long enough, it will start the webserver anyway and loading the webpage will display:

Fatal Error - sorry this shouldn't happen. SQLSTATE[HY000] [2005] Unknown MySQL server host 'mysql' (2)

My config.env has an alphanumeric password set, and on each attempt I remove the shared folder completely before trying again.

Ideas?

In this case when you run
docker ps -a

I assume it will show -db_1 as down

Could you run
docker-compose logs
and show us the output of that please?

If you open the config.env file does it has your correct mysql password?

It shows -db_1 as Restarting (137) XX seconds ago. Seems to stay in the loop.

Here’s a portion of the logs before the loop begins.

Attaching to xibo_cms-web_1, xibo_cms-xmr_1, xibo_cms-db_1
cms-web_1  | Waiting for MySQL to start - max 300 seconds
cms-web_1  | Waiting for MySQL to start - max 300 seconds
cms-web_1  | MySQL started
cms-web_1  | ERROR 2005 (HY000): Unknown MySQL server host 'mysql' (0)
cms-web_1  | New install
cms-web_1  | Provisioning Database
cms-web_1  | ERROR 2005 (HY000): Unknown MySQL server host 'mysql' (0)
cms-web_1  | ERROR 2005 (HY000): Unknown MySQL server host 'mysql' (0)
cms-web_1  | ERROR 2005 (HY000): Unknown MySQL server host 'mysql' (0)
cms-web_1  | Configuring Database Settings
cms-web_1  | ERROR 2005 (HY000): Unknown MySQL server host 'mysql' (0)
cms-web_1  | ERROR 2005 (HY000): Unknown MySQL server host 'mysql' (0)
cms-web_1  | ERROR 2005 (HY000): Unknown MySQL server host 'mysql' (0)
cms-web_1  | ERROR 2005 (HY000): Unknown MySQL server host 'mysql' (0)
cms-web_1  | ERROR 2005 (HY000): Unknown MySQL server host 'mysql' (0)
cms-web_1  | Setting up Maintenance
cms-web_1  | ERROR 2005 (HY000): Unknown MySQL server host 'mysql' (0)
cms-web_1  | ERROR 2005 (HY000): Unknown MySQL server host 'mysql' (0)
cms-web_1  | ERROR 2005 (HY000): Unknown MySQL server host 'mysql' (0)
cms-web_1  | Updating settings.php
cms-web_1  | Configuring Backups
cms-web_1  | Configuring Maintenance
cms-web_1  | Setting up CMS alias
cms-web_1  | Running maintenance
cms-db_1   | Initializing database
cms-db_1   | 2017-07-18 15:03:23 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
cms-db_1   | 2017-07-18 15:03:23 0 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap.
cms-db_1   | 2017-07-18 15:03:23 0 [Note] /usr/sbin/mysqld (mysqld 5.6.36) starting as process 32 ...
cms-web_1  | Starting cron
cms-web_1  | Starting webserver
cms-web_1  | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.18.0.4. Set the 'ServerName' directive globally to suppress this message
cms-web_1  | Waiting for MySQL to start - max 300 seconds
cms-web_1  | Waiting for MySQL to start - max 300 seconds
cms-db_1   | 
cms-db_1   | 
cms-db_1   | 2017-07-18 15:03:26 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
cms-db_1   | 2017-07-18 15:03:26 0 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap.
cms-db_1   | 2017-07-18 15:03:26 0 [Note] /usr/sbin/mysqld (mysqld 5.6.36) starting as process 55 ...
cms-db_1   | 
cms-db_1   | 
cms-db_1   | 
cms-db_1   | 
cms-db_1   | PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
cms-db_1   | To do so, start the server, then issue the following commands:
cms-db_1   | 
cms-db_1   |   /usr/bin/mysqladmin -u root password 'new-password'
cms-db_1   |   /usr/bin/mysqladmin -u root -h fe23f9fc1df4 password 'new-password'
cms-db_1   | 
cms-db_1   | Alternatively you can run:
cms-db_1   | 
cms-db_1   |   /usr/bin/mysql_secure_installation
cms-db_1   | 
cms-db_1   | which will also give you the option of removing the test
cms-db_1   | databases and anonymous user created by default.  This is
cms-db_1   | strongly recommended for production servers.
cms-db_1   | 
cms-db_1   | See the manual for more instructions.
cms-db_1   | 
cms-db_1   | Please report any problems at http://bugs.mysql.com/
cms-db_1   | 
cms-db_1   | The latest information about MySQL is available on the web at
cms-db_1   | 
cms-db_1   |   http://www.mysql.com
cms-db_1   | 
cms-db_1   | Support MySQL by buying support/licenses at http://shop.mysql.com
cms-db_1   | 
cms-db_1   | Note: new default config file not created.
cms-db_1   | Please make sure your config file is current
cms-db_1   | 
cms-db_1   | WARNING: Default config file /etc/mysql/my.cnf exists on the system
cms-db_1   | This file will be read by default by the MySQL server
cms-db_1   | If you do not want to use this, either remove it, or use the
cms-db_1   | --defaults-file argument to mysqld_safe when starting the server
cms-db_1   | 
cms-db_1   | Database initialized
cms-db_1   | MySQL init process in progress...
cms-db_1   | /usr/local/bin/docker-entrypoint.sh: line 100:    83 Killed                  "$@" --skip-networking --socket="${SOCKET}"
cms-db_1   | MySQL init process in progress...
cms-db_1   | MySQL init process in progress...
cms-db_1   | MySQL init process in progress...
cms-db_1   | MySQL init process in progress...
cms-db_1   | MySQL init process in progress...
cms-db_1   | MySQL init process in progress...
cms-db_1   | MySQL init process in progress...
cms-db_1   | MySQL init process in progress...
cms-db_1   | MySQL init process in progress...
cms-db_1   | MySQL init process in progress...
cms-db_1   | MySQL init process in progress...
cms-db_1   | MySQL init process in progress...
cms-db_1   | MySQL init process in progress...
cms-db_1   | MySQL init process in progress...
cms-db_1   | MySQL init process in progress...
cms-db_1   | MySQL init process in progress...
cms-db_1   | MySQL init process in progress...
cms-db_1   | MySQL init process in progress...
cms-db_1   | MySQL init process in progress...
cms-db_1   | MySQL init process in progress...
cms-db_1   | MySQL init process in progress...
cms-db_1   | MySQL init process in progress...
cms-db_1   | MySQL init process in progress...
cms-db_1   | MySQL init process in progress...
cms-db_1   | MySQL init process in progress...
cms-db_1   | MySQL init process in progress...
cms-db_1   | MySQL init process in progress...
cms-db_1   | MySQL init process in progress...
cms-db_1   | MySQL init process in progress...
cms-db_1   | MySQL init process in progress...
cms-db_1   | MySQL init process failed.

Since this is a new installation I’ve been providing a new password that I generated.

Very strange, that’s the second instance I’ve seen today restarting over and over. I wonder if there’s a bad MySQL container been pushed up to Docker Hub (we don’t maintain that).

I’ll have a try here and see if I can replicate it.

One thing, you say you’re removing the shared/db folder between attempts, but are you also destroying the containers? You need to as well - ie docker-compose down to get a clean slate, as well as removing shared/db

I trashed my containers, did a docker-compose pull, and the resulting setup worked, so I don’t think it’s a bad container.

If you want to PM me some SSH details, I’ll have a look for you and see if I can work out what the issue is.

I wasn’t destroying the container before. I’ve tried again a few times with that as well, but it’s not helping. I can send login details, but I’m having trouble finding a link to do that on your profile.

Issue was insufficient RAM.

Indeed it was. Upgraded to a 1GB droplet and added a swapfile. Things seem to be running good so far. Thanks for your personal help!

1 Like
The Xibo Community site uses cookies. What are cookies?