From 8dd64882c767db03f102a3129d7f72f905f6bea1 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 17 Sep 2019 16:34:22 +0200 Subject: [PATCH] EGroupware container can not access MariaDB/MySQL --- Update-recommendations-and-troubleshooting.md | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/Update-recommendations-and-troubleshooting.md b/Update-recommendations-and-troubleshooting.md index 9882baa..385f6e9 100644 --- a/Update-recommendations-and-troubleshooting.md +++ b/Update-recommendations-and-troubleshooting.md @@ -100,6 +100,38 @@ Transfer-Encoding: chunked ``` If you can see the correct output of 3., but not the above one, something is wrong with your proxy configuration on the host. +# EGroupware container can not access MariaDB/MySQL +``` +egroupware | /usr/bin/php7.3 -d memory_limit=-1 /usr/share/egroupware/setup/setup-cli.php --update 'all,admin,HU4M0zQixh5:fda!' +egroupware | EGroupware API version 19.1 found. +egroupware | EGroupware configuration file (header.inc.php) version 1.29 exists and is up to date +egroupware | Your database is not working! mysqli://egroupware:*********@localhost/egroupware: +egroupware | +egroupware | Installation failed --> exiting! +egroupware | +egroupware | Retrying EGroupware installation in 3 seconds ... +``` +That situation can happen in a couple of different ways: +* RHEL/CentOS does not start or enable the DB by default, you have to do so explicitly! +* DB was shut down manually or also updated at the same time as EGroupware + +The [MariaDB/MySQL socket is bind-mounted into the egroupware container](https://github.com/EGroupware/build.opensuse.org/blob/master/server:eGroupWare/egroupware-docker-19.1/egroupware-docker/docker-compose.yml#L41) so db_host="localhost" continues to work. + +> If the DB is not running and therefore the socket is not there when EGroupware container starts, Docker creates a directory with the same name on the host AND inside the container. + +> Neither of them does recover automatically from that situation! + +You have to manually fix it: +``` +cd /etc/egroupware-docker +docker-compose stop egroupware +docker-compose rm -f egroupware +rm -rf /var/{run,lib}/mysql*/mysql*.sock +systemctl start mariadb # or mysqld +systemctl enable mariadb # only necessary for RHEL/CentOS not doing so by installing the DB +systemctl status mariadb +docker-compose up -d +``` # How to get help EGroupware GmbH - the developers of EGroupware - offer the following support options, if you can not figure it out by yourself: