eugeneware / eugeneware/docker-wordpress-nginx

Mysqld entered FATAL state, too many start retries too quickly

Open
#59 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Shell
Stars
865
Forks
370
PR merge metrics
No merged PRs in 30d

Description

I was able to run a Docker container with Wordpress with the default settings.

Then I aded shared volumes on the host machine:

`-v ~/workspace/mysql:/var/lib/mysql`

`-v ~/workspace/www:/usr/share/nginx/www`

Those statements cause `supervisord` to exit running `mysql` process without many info:

> 2017-03-08 06:49:59,081 INFO exited: mysqld (exit status 1; not
> expected)
> 2017-03-08 06:50:00,082 INFO gave up: mysqld entered FATAL
> state, too many start retries too quickly

The mysql log files are empty using these commands:

$ docker exec CONTAINER_ID cat /var/log/mysql.log
$ docker exec CONTAINER_ID cat /var/log/mysql.err

Console:

$ sudo docker run -p 8082:80 -v ~/workspace/mysql:/var/lib/mysql -v ~/workspace/www:/usr/share/nginx/www --name docker-wordpress-nginx eugeneware/docker-wordpress-nginx
/usr/local/lib/python2.7/dist-packages/supervisor-3.1.3-py2.7.egg/supervisor/options.py:296: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security.
'Supervisord is running as root and it is searching '
2017-03-08 06:49:51,793 CRIT Supervisor running as root (no user in config file)
2017-03-08 06:49:51,801 INFO RPC interface 'supervisor' initialized
2017-03-08 06:49:51,801 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2017-03-08 06:49:51,801 INFO supervisord started with pid 5
2017-03-08 06:49:52,803 INFO spawned: 'stdout' with pid 8
2017-03-08 06:49:52,805 INFO spawned: 'php5-fpm-log' with pid 9
2017-03-08 06:49:52,806 INFO spawned: 'nginx' with pid 10
2017-03-08 06:49:52,808 INFO spawned: 'mysqld' with pid 11
2017-03-08 06:49:52,814 INFO spawned: 'php5-fpm' with pid 12
2017-03-08 06:49:52,822 INFO exited: php5-fpm-log (exit status 1; not expected)
2017-03-08 06:49:52,933 INFO exited: mysqld (exit status 1; not expected)
2017-03-08 06:49:53,934 INFO success: stdout entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2017-03-08 06:49:53,935 INFO spawned: 'php5-fpm-log' with pid 31
2017-03-08 06:49:53,936 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2017-03-08 06:49:53,937 INFO spawned: 'mysqld' with pid 32
2017-03-08 06:49:53,938 INFO success: php5-fpm entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
php5-fpm-log stderr | tail: cannot open '/var/log/php5-fpm.log' for reading: No such file or directory
mysqld stderr | 170308 6:49:52 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
mysqld stderr | 170308 6:49:52 [Note] /usr/sbin/mysqld (mysqld 5.5.43-0ubuntu0.14.04.1) starting as process 11 ...
php5-fpm-log stdout | [08-Mar-2017 06:49:52] NOTICE: fpm is running, pid 12
[08-Mar-2017 06:49:52] NOTICE: ready to handle connections
[08-Mar-2017 06:49:52] NOTICE: systemd monitor interval set to 10000ms
mysqld stderr | 170308 6:49:53 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
mysqld stderr | 170308 6:49:53 [Note] /usr/sbin/mysqld (mysqld 5.5.43-0ubuntu0.14.04.1) starting as process 32 ...
2017-03-08 06:49:53,985 INFO exited: mysqld (exit status 1; not expected)
2017-03-08 06:49:54,987 INFO success: php5-fpm-log entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2017-03-08 06:49:55,989 INFO spawned: 'mysqld' with pid 44
mysqld stderr | 170308 6:49:55 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
170308 6:49:55 [Note] /usr/sbin/mysqld (mysqld 5.5.43-0ubuntu0.14.04.1) starting as process 44 ...
2017-03-08 06:49:56,033 INFO exited: mysqld (exit status 1; not expected)
2017-03-08 06:49:59,038 INFO spawned: 'mysqld' with pid 56
mysqld stderr | 170308 6:49:59 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
170308 6:49:59 [Note] /usr/sbin/mysqld (mysqld 5.5.43-0ubuntu0.14.04.1) starting as process 56 ...
2017-03-08 06:49:59,081 INFO exited: mysqld (exit status 1; not expected)
2017-03-08 06:50:00,082 INFO gave up: mysqld entered FATAL state, too many start retries too quickly

Using the latest version of the Dockerfile [(GitHub link)](https://github.com/eugeneware/docker-wordpress-nginx/blob/master/Dockerfile) `commit 3517aec2533d526f0a7b600e79390516f37c6123`.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the Dockerfile at commit 3517aec2533d526f0a7b600e79390516f37c6123 and reproduce the reported docker run command with mounts for /var/lib/mysql and /usr/share/nginx/www. Check the supervisord output and MySQL stderr around startup; done means the mounted-volume case starts successfully or reports a useful, actionable failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, mysql, nginx, php, shell
Domain
backend, databases, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.