Skip to content
This repository was archived by the owner on May 18, 2020. It is now read-only.
This repository was archived by the owner on May 18, 2020. It is now read-only.

Increase MySQL Startup timer #1

@kevinfealey

Description

@kevinfealey

This is a duplicate post from: https://hub.docker.com/r/bugzilla/bugzilla-dev/ since I believe the fix is a configuration change in this project...

Update (also on the Docker Hub page):

Trying to investigate a little more, but I'm pretty sure that the issue is due to the 5 second sleep timer in bugzilla_config.sh (line 13). I think that is not always enough time to start up MySQL. I recommend increasing that timer to something like 15 seconds.


I tried to build the image myself and saw some SQL errors during the build process. Further investigation revealed that bugzilla_config.sh either did not run or resulted in a failure, since the "bugs" user had no access to the MySQL database.

I just checked the build output for this image (at https://hub.docker.com/r/bugzilla/bugzilla-dev/builds/bqbnynadqi7gcdzd6bjjw99/) and the following is present:

161101 21:48:30 mysqld_safe Logging to '/var/lib/mysql/mysql-error.log'.
161101 21:48:30 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
�[91mERROR 2002 (HY000)�[0m�[91m: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
�[0m�[91mERROR 2002 (HY000)�[0m�[91m: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

which is a symptom of the same problem.

Further in the build output is:

[91mThere was an error connecting to MySQL:

    Access denied for user 'bugs'@'localhost' (using password: YES)

This might have several reasons:

* MySQL is not running.
* MySQL is running, but there is a problem either in the
  server configuration or the database access rights. Read the Bugzilla
  Guide in the doc directory. The section about database configuration
  should help.
* Your password for the 'bugs' user, specified in $db_pass, is 
  incorrect, in './localconfig'.
* There is a subtle problem with Perl, DBI, or MySQL. Make
  sure all settings in './localconfig' are correct. If all else fails, set
  '$db_check' to 0.

which is also a symptom of the same issue.

As a sanity check, I rebuilt the image:

  docker build --no-cache -t bugzilla/bugzilla-dev .
  docker-compose up -d

and this time I did not see those errors, and Bugzilla was available. Then I started with a clean environment and ran them again - again, with success. I'm not sure what caused the inconsistency, but I suspect it has to do with an existing bugzilla image being on the box doing the building. I think if you don't use the --no-cache flag, and you have done a docker pull bugzilla/bugzilla-dev in the past, the build breaks.

Anyway, I'm up and running from doing my own build, but, please make sure the image hosted by Docker Hub is working - seems like you can't just trust if the build log says "Success".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions