Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem when mounting dirs #1

Closed
TeePaps opened this issue May 24, 2014 · 4 comments
Closed

Problem when mounting dirs #1

TeePaps opened this issue May 24, 2014 · 4 comments

Comments

@TeePaps
Copy link

TeePaps commented May 24, 2014

My container fails when I mount directories, but works fine when I don't mount any. When I try to access phabricator, it fails to connect to mysql and I get this error:

Attempt to connect to root@localhost failed with error #2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111).

Any ideas of how to fix this? Below is the output of running my container.

core@core-01 ~/share/docker-phabricator $ sudo docker run -p 80:80 -v $PWD/mysql:/var/lib/mysql -v $PWD/repo:/var/repo test-phab
/usr/lib/python2.6/site-packages/supervisor/options.py:295: 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 '
2014-05-24 14:27:05,434 CRIT Supervisor running as root (no user in config file)
2014-05-24 14:27:05,469 INFO RPC interface 'supervisor' initialized
2014-05-24 14:27:05,469 CRIT Server 'inet_http_server' running without any HTTP authentication checking
2014-05-24 14:27:05,470 INFO supervisord started with pid 1
2014-05-24 14:27:06,473 INFO spawned: 'check_db' with pid 15
2014-05-24 14:27:06,477 INFO spawned: 'sshd' with pid 16
2014-05-24 14:27:06,482 INFO spawned: 'mysql' with pid 17
2014-05-24 14:27:06,489 INFO spawned: 'phd_daemons' with pid 18
2014-05-24 14:27:06,494 INFO spawned: 'httpd' with pid 19
2014-05-24 14:27:07,286 INFO exited: check_db (exit status 1; not expected)
2014-05-24 14:27:07,298 INFO exited: phd_daemons (exit status 255; not expected)
2014-05-24 14:27:07,601 INFO success: sshd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2014-05-24 14:27:07,602 INFO success: mysql entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2014-05-24 14:27:07,604 INFO success: httpd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2014-05-24 14:27:07,607 INFO exited: mysql (exit status 0; expected)
2014-05-24 14:27:08,610 INFO spawned: 'check_db' with pid 127
2014-05-24 14:27:08,613 INFO spawned: 'phd_daemons' with pid 128
2014-05-24 14:27:08,874 INFO exited: check_db (exit status 1; not expected)
2014-05-24 14:27:08,880 INFO exited: phd_daemons (exit status 255; not expected)
2014-05-24 14:27:10,886 INFO spawned: 'check_db' with pid 130
2014-05-24 14:27:10,888 INFO spawned: 'phd_daemons' with pid 131
2014-05-24 14:27:11,129 INFO exited: phd_daemons (exit status 255; not expected)
2014-05-24 14:27:11,134 INFO exited: check_db (exit status 1; not expected)
2014-05-24 14:27:14,141 INFO spawned: 'check_db' with pid 133
2014-05-24 14:27:14,145 INFO spawned: 'phd_daemons' with pid 134
2014-05-24 14:27:14,385 INFO exited: check_db (exit status 1; not expected)
2014-05-24 14:27:14,388 INFO gave up: check_db entered FATAL state, too many start retries too quickly
2014-05-24 14:27:14,388 INFO exited: phd_daemons (exit status 255; not expected)
2014-05-24 14:27:15,391 INFO gave up: phd_daemons entered FATAL state, too many start retries too quickly
^C2014-05-24 14:28:46,333 WARN received SIGINT indicating exit request
2014-05-24 14:28:46,373 INFO waiting for sshd, httpd to die
2014-05-24 14:28:46,438 INFO stopped: httpd (exit status 0)
2014-05-24 14:28:48,446 INFO stopped: sshd (exit status 255)
@spidfire
Copy link

Same here, something doesn't seem right with the database or the order of execution

@zackbraksa
Copy link

I had the same problem too!

@fredericlb
Copy link
Owner

Hi,
sorry for the (too long) answer, i did not notice this issue. I'll try to have a look at this issue this week.

@fredericlb
Copy link
Owner

I've changed the image so that it uses an external mysql instance, since it should be easier to maintain (doing everything in the same container is pretty difficult). You just need to pass three env vars to configure the db.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants