devilbox: MySQL works on first run, then won't connect again

ISSUE TYPE

  • Bug Report

Checklist

  • .env file is attached - my-dot-env.txt - note that I did nothing except what is in the docs and selected MariaDB 5.5 since it matches the production server, otherwise it is same as default-env
  • docker-compose.override.yml is attached (if it exists) - DOES NOT EXIST
  • Custom configs from cfg/ dir are attached (if customized) - NONE
  • docker-compose logs and log/ output is added

my-docker-compose-logs.txt

image

in the mariadb-5.5 folder are 3 files (error.log, query.log, slow.log), all of them are 0 bytes

OS / ENVIRONMENT

  1. Host operating system and version: Mac OS X 10.14.3
  2. (Windows) Native Docker or Docker Toolbox: n/a
  3. Docker version: Docker version 18.09.2, build 6247962
  4. Docker Compose version: 1.23.2

also I am using Mac Docker Desktop, the latest version which is Version 2.0.0.3 (31259)

image
  1. (Linux) Is SELinux enabled?: n/a
  2. What git commit hash are you on?: commit 57b2a5c59992ca5b9603a48465b8fbfa80bdca29 (HEAD -> release/v1.0.0, tag: v1.0.0-alpha1, origin/release/v1.0.0)

SUMMARY

Short summary - Everything works great on first startup, then I shut down as the docs describe, start the box again, and MySQL is dead. Possible same as issue #500 ?

Longer explanation - I installed devilbox following the docs exactly and it worked perfectly first try. Wow! Then I exported a 1.5 GB MySQL db from another server and imported it into the local MariaDB inside of devilbox. No errors and I could use my site locally with the db, everything was perfect.

I shut down (following the steps in the docs) and then started it up again… and now can’t connect to the MySQL server. There are no errors on startup that I notice, but as you can see the server is unhappy:

image

STEPS TO REPRODUCE

  • Install devilbox exactly like it says on the tin, be sure mysql is running fine
  • Import large database (may not be necessary, if #500 is same issue, that user did not)
  • Shut down devilbox correctly
  • Start devilbox again - now MySQL can’t connect
  • Optional: shutdown again, upgrade to 1.0.0 branch, startup again - did not fix the problem

EXPECTED BEHAVIOUR

MySQL can always connect

ACTUAL BEHAVIOUR

MySQL craps out after the 1st run

OTHER INFORMATION

Start command

$ docker-compose up php mysql httpd bind

File and user permissions (Linux & MacOS)

$ id
uid=501(ericmueller) gid=20(staff) groups=20(staff),12(everyone),61(localaccounts),79(_appserverusr),80(admin),81(_appserveradm),98(_lpadmin),33(_appstore),100(_lpoperator),204(_developer),250(_analyticsusers),395(com.apple.access_ftp),398(com.apple.access_screensharing),399(com.apple.access_ssh)

$ ls -la
image
$ ls -la data/www

image

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 24 (24 by maintainers)

Commits related to this issue

Most upvoted comments

In the MySQL container can you check/provide

  • netstat -tulpn
  • Check if it knows itself: ping mysql
  • Check if php container is reachable ping php and ping 172.16.238.10

In the PHP container can you check/provide

  • Check if php can reach the MySQL container via IP address ping 172.16.238.12 and mysql -uroot -h172.16.238.12 -p

Cleanest way is to (Ensure needed data is backed up):

  1. docker-compose stop; docker-compose kill; docker-compose rm -f;
  2. Delete directory
  3. Delete Devilbox volumes
  4. Delete Devilbox network
  5. Clone Devilbox
  6. Checkout release/v1.0.0
  7. Create .env file

How to view/remove volumes

$ docker volume ls
DRIVER              VOLUME NAME
local               devilbox_devilbox-mail
local               devilbox-data-www-sync
local               devilbox-intranet-sync

# Automate deletion
$ docker volume ls | grep devilbox | awk -F' ' '{print $2}' | xargs docker volume rm