Closed ghost closed 7 years ago
My initial guess is that this has something to do with the MySQL instance you are connecting to.
The stack trace looks like a bug in upstream code. This Docker container doesn't change how Phabricator itself connects to MySQL, we just configure it based on environment variables. The docker run command looks fine to me.
Note that when you report this issue upstream to Phabricator, they'll likely want you to go through their tediously long and complicated setup process which you can find here: https://secure.phabricator.com/book/phabricator/article/installation_guide/.
You should try to replicate the environment as close as possible, including getting the Phabricator you set up manually to connect to the same MySQL instance that you are trying to connect this container to.
Once you can replicate it on the upstream guide, you can report the issue here: https://secure.phabricator.com/maniphest/task/edit/form/3/
Outside of that, my suggestion would be to try using the mysql image that our Docker compose file uses, as that is known to work.
I have the same. To fix this, you can:
1) Set up mysql container to expose the ports on the outside:
docker run -p 93306:3306 --name some-mysql -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mysql
and set phabricator container to use it:
docker run --rm -p 80:80 -p 443:443 --env PHABRICATOR_HOST=localhost --env MYSQL_HOST=localhost --env MYSQL_USER=root --env MYSQL_PASS=my-secret-pw --env MYSQL_PORT=93306 --env PHABRICATOR_REPOSITORY_PATH=/repos -v /host/repo/path:/repos \ hachque/phabricator
or 2) use docker-compose with https://github.com/hach-que-docker/phabricator/blob/master/DOCKER-COMPOSE.md - it work for me.
I just ran into this during testing. It's because --link mysql
causes MYSQL_PORT
to be set to something silly like tcp://...:3306/
, because of the link name.
We expect MYSQL_PORT
to either empty or to have an integer (like 3306
) in it. I'm going to add a startup check to make this failure more clear as to the issue it causes.
Hi,
(DAU question incoming, I'm new to docker)
I have a mysql db running on docker (name: mysql). When I try to start the phabricator container with:
docker run \ --rm -p 80:80 -p 443:443 -p 3306:3306 \ --env PHABRICATOR_HOST=localhost \ --env MYSQL_HOST=mysql \ --env MYSQL_USER=phabricator \ --env MYSQL_PASS=secretpassword \ --link mysql:mysql \ --env PHABRICATOR_REPOSITORY_PATH=/repos \ -v /host/repo/path:/repos \ hachque/phabricator
I receive the following error: