You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to setup domjudge using docker. I got the following error when I tried to run dj-setup-database. Database credentials are
$docker-compose run --rm domserver dj-setup-database -r install
Database credentials read from '/opt/domjudge/domserver/etc/dbpasswords.secret'.
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory")
I am sure my database settings are correct because I get the following error when I try to open in the web link:
ERROR
error: SQL error, Error#1146: Table 'domjudge_test.contest' doesn't exist, query: 'SELECT * FROM contest WHERE enabled = 1 AND public = 1 AND activatetime <= UNIX_TIMESTAMP() AND ( deactivatetime IS NULL OR deactivatetime > UNIX_TIMESTAMP() ) ORDER BY activatetime'
What am I missing?
The text was updated successfully, but these errors were encountered:
The problem here is that the dbpasswords.secret file is not correctly generated by the domserver image. The lines to create this file are in the script /bin/entrypoint.sh but need to be executed manually.
Connect to the domserver container using the
docker-compose run --rm domserver bash
command. Then create the correct dbpasswords.secret file by doing a
on this console. This sets up the configuration for the database setup script. On this same console, run
dj-setup-database -r bare-install
and it should update the database and create the required tables.
Please note that this is only a workaround. The real problem is that the image (for reasons not know to me) does not correctly execute the entrypoint script.
The reason I suggest doing a bare install is a bug in the example SQL file of DOMjudge (see https://www.domjudge.org/pipermail/domjudge-devel/2016-August/002070.html). You might still have issues with the domjudge user created by the setup script (at least I did), but I think this is a bit off-topic here.
I was trying to setup domjudge using docker. I got the following error when I tried to run dj-setup-database. Database credentials are
I am sure my database settings are correct because I get the following error when I try to open in the web link:
What am I missing?
The text was updated successfully, but these errors were encountered: