-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
SQLSTATE[HY000] [2002] Connection refused #3406
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
Comments
Can't replicate it nor have I seen this anywhere. You should check the whole stack for inconsistency and debug Docker. Don't know about your system, you deleted most of the issue template. :) It is necessary to check your system. This does not look too good. Try the support channels. I cannot think of a general bug, tbh. What do you think, @mkuron? |
Is there anything in the mysql container's log? |
docker-compose logs --tail=200 mysql-mailcow
|
No idea. I‘ve never seen mysqld segfault upon startup. Are you by chance out of memory and have no swap? Otherwise, my only suggestion is to delete the mysql Docker volume and restore the database from backup. |
I'd need to see it on the machine. Cannot advise. If it is business critical, consider support. If not, try to restore from a backup. Or stop mailcow, delete all images (not volumes) and pull them again. Try a mariabackup and boot it outside mailcow in a separated mariadb instance to see if it works. |
I have a backup of the MySQL database from yesterday. This seems to have solved the problem. But I don't know why the error was in the database, because I don't know enough about it and I certainly don't play around with it. As far as I have seen, everything is working again. Thanks for the help. The BACKUP - Script helped me... |
Description of the bug:
The system no longer starts after an update.
System information:
docker-compose logs --tail=200 php-fpm-mailcow
Attaching to mailcowdockerized_php-fpm-mailcow_1
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Waiting for SQL...
mphp-fpm-mailcow_1 | Uptime: 1 Threads: 8 Questions: 1 Slow queries: 0 Opens: 17 Flush tables: 1 Open tables: 11 Queries per second avg: 1.000
mphp-fpm-mailcow_1 | We are master, preparing...
mphp-fpm-mailcow_1 | MySQL @ 8e1cb5c0ec328fe922c23b489e7eb4a6183587385852f3f402a7103979b5778a
mphp-fpm-mailcow_1 | SQL upgrade iteration #1
mphp-fpm-mailcow_1 | No valid reponse for mysql_upgrade was received, debug output:
mphp-fpm-mailcow_1 | {"msg":"409 Client Error: Conflict ("Container 8e1cb5c0ec328fe922c23b489e7eb4a6183587385852f3f402a7103979b5778a is restarting, wait until the container is running")","type":"danger"}
mphp-fpm-mailcow_1 | SQL upgrade iteration #2
mphp-fpm-mailcow_1 | No valid reponse for mysql_upgrade was received, debug output:
mphp-fpm-mailcow_1 | {"msg":"409 Client Error: Conflict ("Container 8e1cb5c0ec328fe922c23b489e7eb4a6183587385852f3f402a7103979b5778a is restarting, wait until the container is running")","type":"danger"}
mphp-fpm-mailcow_1 | SQL upgrade iteration #3
mphp-fpm-mailcow_1 | No valid reponse for mysql_upgrade was received, debug output:
mphp-fpm-mailcow_1 | {"msg":"409 Client Error: Conflict ("Container 8e1cb5c0ec328fe922c23b489e7eb4a6183587385852f3f402a7103979b5778a is restarting, wait until the container is running")","type":"danger"}
mphp-fpm-mailcow_1 | SQL upgrade iteration #4
mphp-fpm-mailcow_1 | No valid reponse for mysql_upgrade was received, debug output:
mphp-fpm-mailcow_1 | {"msg":"409 Client Error: Conflict ("Container 8e1cb5c0ec328fe922c23b489e7eb4a6183587385852f3f402a7103979b5778a is restarting, wait until the container is running")","type":"danger"}
mphp-fpm-mailcow_1 | SQL upgrade iteration #5
mphp-fpm-mailcow_1 | No valid reponse for mysql_upgrade was received, debug output:
mphp-fpm-mailcow_1 | {"msg":"409 Client Error: Conflict ("Container 8e1cb5c0ec328fe922c23b489e7eb4a6183587385852f3f402a7103979b5778a is restarting, wait until the container is running")","type":"danger"}
mphp-fpm-mailcow_1 | Tried to upgrade MySQL and failed, giving up after 5 retries and starting container (oops, not good)
mphp-fpm-mailcow_1 | MySQL mysql_tzinfo_to_sql - debug output:
mphp-fpm-mailcow_1 | {"msg":"409 Client Error: Conflict ("Container 8e1cb5c0ec328fe922c23b489e7eb4a6183587385852f3f402a7103979b5778a is restarting, wait until the container is running")","type":"danger"}
mphp-fpm-mailcow_1 | Running DB init...
mphp-fpm-mailcow_1 |
mphp-fpm-mailcow_1 | Fatal error: Uncaught PDOException: SQLSTATE[HY000] [2002] Connection refused in /web/inc/init_db.inc.php:1175
mphp-fpm-mailcow_1 | Stack trace:
mphp-fpm-mailcow_1 | #0 /web/inc/init_db.inc.php(1175): PDO->__construct('mysql:unix_sock...', 'mailcow', 'McCR4s6Vjybo32Y...', Array)
mphp-fpm-mailcow_1 | #1 {main}
mphp-fpm-mailcow_1 | thrown in /web/inc/init_db.inc.php on line 1175
mphp-fpm-mailcow_1 | Rebuilding domain map in Redis...
mphp-fpm-mailcow_1 | ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
mphp-fpm-mailcow_1 | ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
mphp-fpm-mailcow_1 | ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
mphp-fpm-mailcow_1 | [11-Mar-2020 13:34:25] NOTICE: fpm is running, pid 1
mphp-fpm-mailcow_1 | [11-Mar-2020 13:34:25] NOTICE: ready to handle connections
mphp-fpm-mailcow_1 | 172.22.1.12 - 11/Mar/2020:13:34:39 +0100 "HEAD /settings.php" 200
mphp-fpm-mailcow_1 | fd4d:6169:6c63:6f77::10 - 11/Mar/2020:13:34:39 +0100 "GET /settings.php" 200
mphp-fpm-mailcow_1 | 172.22.1.12 - 11/Mar/2020:13:34:40 +0100 "HEAD /forwardinghosts.php" 200
mphp-fpm-mailcow_1 | fd4d:6169:6c63:6f77::10 - 11/Mar/2020:13:34:40 +0100 "GET /forwardinghosts.php" 200
mphp-fpm-mailcow_1 | 172.22.1.12 - 11/Mar/2020:13:35:26 +0100 "HEAD /settings.php" 200
mphp-fpm-mailcow_1 | fd4d:6169:6c63:6f77::10 - 11/Mar/2020:13:35:26 +0100 "GET /settings.php" 200
mphp-fpm-mailcow_1 | 172.22.1.12 - 11/Mar/2020:13:35:36 +0100 "HEAD /forwardinghosts.php" 200
mphp-fpm-mailcow_1 | fd4d:6169:6c63:6f77::10 - 11/Mar/2020:13:35:36 +0100 "GET /forwardinghosts.php" 200
mphp-fpm-mailcow_1 | 172.22.1.12 - 11/Mar/2020:13:36:13 +0100 "HEAD /forwardinghosts.php" 200
mphp-fpm-mailcow_1 | fd4d:6169:6c63:6f77::10 - 11/Mar/2020:13:36:13 +0100 "GET /forwardinghosts.php" 200
mphp-fpm-mailcow_1 | 172.22.1.12 - 11/Mar/2020:13:36:24 +0100 "HEAD /settings.php" 200
mphp-fpm-mailcow_1 | fd4d:6169:6c63:6f77::10 - 11/Mar/2020:13:36:24 +0100 "GET /settings.php" 200
mphp-fpm-mailcow_1 | 172.22.1.12 - 11/Mar/2020:13:36:57 +0100 "HEAD /settings.php" 200
mphp-fpm-mailcow_1 | fd4d:6169:6c63:6f77::10 - 11/Mar/2020:13:36:57 +0100 "GET /settings.php" 200
mphp-fpm-mailcow_1 | 172.22.1.12 - 11/Mar/2020:13:37:08 +0100 "HEAD /forwardinghosts.php" 200
mphp-fpm-mailcow_1 | 172.22.1.12 - 11/Mar/2020:13:37:08 +0100 "GET /forwardinghosts.php" 200
mphp-fpm-mailcow_1 | fd4d:6169:6c63:6f77::10 - 11/Mar/2020:13:37:39 +0100 "HEAD /settings.php" 200
mphp-fpm-mailcow_1 | 172.22.1.12 - 11/Mar/2020:13:37:39 +0100 "GET /settings.php" 200
mphp-fpm-mailcow_1 | fd4d:6169:6c63:6f77::10 - 11/Mar/2020:13:37:43 +0100 "HEAD /forwardinghosts.php" 200
mphp-fpm-mailcow_1 | 172.22.1.12 - 11/Mar/2020:13:37:43 +0100 "GET /forwardinghosts.php" 200
mphp-fpm-mailcow_1 | fd4d:6169:6c63:6f77::10 - 11/Mar/2020:13:38:13 +0100 "HEAD /settings.php" 200
mphp-fpm-mailcow_1 | 172.22.1.12 - 11/Mar/2020:13:38:13 +0100 "GET /settings.php" 200
mphp-fpm-mailcow_1 | fd4d:6169:6c63:6f77::10 - 11/Mar/2020:13:38:42 +0100 "HEAD /forwardinghosts.php" 200
mphp-fpm-mailcow_1 | 172.22.1.12 - 11/Mar/2020:13:38:42 +0100 "GET /forwardinghosts.php" 200
mphp-fpm-mailcow_1 | fd4d:6169:6c63:6f77::10 - 11/Mar/2020:13:38:55 +0100 "HEAD /settings.php" 200
mphp-fpm-mailcow_1 | 172.22.1.12 - 11/Mar/2020:13:38:55 +0100 "GET /settings.php" 200
mphp-fpm-mailcow_1 | fd4d:6169:6c63:6f77::10 - 11/Mar/2020:13:39:18 +0100 "HEAD /forwardinghosts.php" 200
mphp-fpm-mailcow_1 | 172.22.1.12 - 11/Mar/2020:13:39:18 +0100 "GET /forwardinghosts.php" 200
mphp-fpm-mailcow_1 | 172.22.1.12 - [email protected] 11/Mar/2020:13:39:34 +0100 "GET /sogo-auth.php" 200
mphp-fpm-mailcow_1 | fd4d:6169:6c63:6f77::10 - 11/Mar/2020:13:39:54 +0100 "HEAD /settings.php" 200
mphp-fpm-mailcow_1 | 172.22.1.12 - 11/Mar/2020:13:39:54 +0100 "GET /settings.php" 200
mphp-fpm-mailcow_1 | fd4d:6169:6c63:6f77::10 - 11/Mar/2020:13:39:54 +0100 "HEAD /forwardinghosts.php" 200
mphp-fpm-mailcow_1 | 172.22.1.12 - 11/Mar/2020:13:39:54 +0100 "GET /forwardinghosts.php" 200
php-fpm-mailcow_1 | fd4d:6169:6c63:6f77::10 - 11/Mar/2020:13:40:10 +0100 "GET /index.php" 200
php-fpm-mailcow_1 | fd4d:6169:6c63:6f77::10 - 11/Mar/2020:13:40:14 +0100 "GET /index.php" 200
php-fpm-mailcow_1 | 172.22.1.12 - 11/Mar/2020:13:40:15 +0100 "GET /index.php" 200
php-fpm-mailcow_1 | fd4d:6169:6c63:6f77::10 - 11/Mar/2020:13:40:35 +0100 "HEAD /settings.php" 200
php-fpm-mailcow_1 | 172.22.1.12 - 11/Mar/2020:13:40:35 +0100 "GET /settings.php" 200
php-fpm-mailcow_1 | fd4d:6169:6c63:6f77::10 - 11/Mar/2020:13:40:52 +0100 "HEAD /forwardinghosts.php" 200
php-fpm-mailcow_1 | 172.22.1.12 - 11/Mar/2020:13:40:52 +0100 "GET /forwardinghosts.php" 200
php-fpm-mailcow_1 | fd4d:6169:6c63:6f77::10 - 11/Mar/2020:13:40:58 +0100 "GET /index.php" 200
php-fpm-mailcow_1 | 172.22.1.12 - 11/Mar/2020:13:41:00 +0100 "GET /index.php" 200
php-fpm-mailcow_1 | fd4d:6169:6c63:6f77::10 - 11/Mar/2020:13:41:01 +0100 "GET /index.php" 200
php-fpm-mailcow_1 | 172.22.1.12 - 11/Mar/2020:13:41:02 +0100 "GET /index.php" 200
php-fpm-mailcow_1 | fd4d:6169:6c63:6f77::10 - 11/Mar/2020:13:41:03 +0100 "GET /index.php" 200
php-fpm-mailcow_1 | 172.22.1.12 - 11/Mar/2020:13:41:07 +0100 "GET /index.php" 200
php-fpm-mailcow_1 | fd4d:6169:6c63:6f77::10 - 11/Mar/2020:13:41:22 +0100 "HEAD /settings.php" 200
php-fpm-mailcow_1 | 172.22.1.12 - 11/Mar/2020:13:41:22 +0100 "GET /settings.php" 200
php-fpm-mailcow_1 | [11-Mar-2020 13:41:22] NOTICE: Finishing ...
php-fpm-mailcow_1 | [11-Mar-2020 13:41:22] NOTICE: exiting, bye-bye!
php-fpm-mailcow_1 | Waiting for SQL...
php-fpm-mailcow_1 | Waiting for SQL...
php-fpm-mailcow_1 | Waiting for SQL...
php-fpm-mailcow_1 | Waiting for SQL...
php-fpm-mailcow_1 | Waiting for SQL...
php-fpm-mailcow_1 | Waiting for SQL...
php-fpm-mailcow_1 | Uptime: 1 Threads: 8 Questions: 1 Slow queries: 0 Opens: 17 Flush tables: 1 Open tables: 11 Queries per second avg: 1.000
php-fpm-mailcow_1 | We are master, preparing...
php-fpm-mailcow_1 | MySQL @ 8e1cb5c0ec328fe922c23b489e7eb4a6183587385852f3f402a7103979b5778a
php-fpm-mailcow_1 | SQL upgrade iteration #1
php-fpm-mailcow_1 | No valid reponse for mysql_upgrade was received, debug output:
php-fpm-mailcow_1 | {"msg":"mysql_upgrade: error running command","text":"OCI runtime exec failed: exec failed: cannot exec a container that has stopped: unknown\r\n","type":"error"}
php-fpm-mailcow_1 | SQL upgrade iteration #2
php-fpm-mailcow_1 | No valid reponse for mysql_upgrade was received, debug output:
php-fpm-mailcow_1 | {"msg":"mysql_upgrade: error running command","text":"Version check failed. Got the following error when calling the 'mysql' command line client\nERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)\nFATAL ERROR: Upgrade failed\n","type":"error"}
php-fpm-mailcow_1 | SQL upgrade iteration #3
php-fpm-mailcow_1 | No valid reponse for mysql_upgrade was received, debug output:
php-fpm-mailcow_1 | {"msg":"mysql_upgrade: error running command","text":"Version check failed. Got the following error when calling the 'mysql' command line client\nERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)\nFATAL ERROR: Upgrade failed\n","type":"error"}
php-fpm-mailcow_1 | SQL upgrade iteration #4
php-fpm-mailcow_1 | No valid reponse for mysql_upgrade was received, debug output:
php-fpm-mailcow_1 | {"msg":"mysql_upgrade: error running command","text":"Version check failed. Got the following error when calling the 'mysql' command line client\nERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)\nFATAL ERROR: Upgrade failed\n","type":"error"}
php-fpm-mailcow_1 | SQL upgrade iteration #5
php-fpm-mailcow_1 | No valid reponse for mysql_upgrade was received, debug output:
php-fpm-mailcow_1 | {"msg":"mysql_upgrade: error running command","text":"Version check failed. Got the following error when calling the 'mysql' command line client\nERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)\nFATAL ERROR: Upgrade failed\n","type":"error"}
php-fpm-mailcow_1 | Tried to upgrade MySQL and failed, giving up after 5 retries and starting container (oops, not good)
php-fpm-mailcow_1 | MySQL mysql_tzinfo_to_sql - debug output:
php-fpm-mailcow_1 | {"msg":"409 Client Error: Conflict ("Container 8e1cb5c0ec328fe922c23b489e7eb4a6183587385852f3f402a7103979b5778a is restarting, wait until the container is running")","type":"danger"}
php-fpm-mailcow_1 | Running DB init...
php-fpm-mailcow_1 |
php-fpm-mailcow_1 | Fatal error: Uncaught PDOException: SQLSTATE[HY000] [2002] Connection refused in /web/inc/init_db.inc.php:1175
php-fpm-mailcow_1 | Stack trace:
php-fpm-mailcow_1 | #0 /web/inc/init_db.inc.php(1175): PDO->__construct('mysql:unix_sock...', 'mailcow', 'McCR4s6Vjybo32Y...', Array)
php-fpm-mailcow_1 | #1 {main}
php-fpm-mailcow_1 | thrown in /web/inc/init_db.inc.php on line 1175
php-fpm-mailcow_1 | Rebuilding domain map in Redis...
php-fpm-mailcow_1 | ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
php-fpm-mailcow_1 | ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
php-fpm-mailcow_1 | ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
php-fpm-mailcow_1 | [11-Mar-2020 13:42:26] NOTICE: fpm is running, pid 1
php-fpm-mailcow_1 | [11-Mar-2020 13:42:26] NOTICE: ready to handle connections
php-fpm-mailcow_1 | 172.22.1.5 - 11/Mar/2020:13:42:37 +0100 "HEAD /forwardinghosts.php" 200
php-fpm-mailcow_1 | fd4d:6169:6c63:6f77::5 - 11/Mar/2020:13:42:37 +0100 "GET /forwardinghosts.php" 200
php-fpm-mailcow_1 | 172.22.1.5 - 11/Mar/2020:13:42:39 +0100 "HEAD /settings.php" 200
php-fpm-mailcow_1 | 172.22.1.5 - 11/Mar/2020:13:42:39 +0100 "GET /settings.php" 200
php-fpm-mailcow_1 | fd4d:6169:6c63:6f77::5 - 11/Mar/2020:13:43:15 +0100 "HEAD /forwardinghosts.php" 200
php-fpm-mailcow_1 | 172.22.1.5 - 11/Mar/2020:13:43:15 +0100 "GET /forwardinghosts.php" 200
php-fpm-mailcow_1 | fd4d:6169:6c63:6f77::5 - 11/Mar/2020:13:43:20 +0100 "HEAD /settings.php" 200
php-fpm-mailcow_1 | 172.22.1.5 - 11/Mar/2020:13:43:20 +0100 "GET /settings.php" 200
Reproduction of said bug:
The messages appear after each restart.
System information:
The following message is in the top center of the web page:
Connection to database failed.
The following error was reported:
SQLSTATE[HY000] [2002] Connection refused
The text was updated successfully, but these errors were encountered: