Hello dear community.
I will write in English so that it has the best chance to help other people as well. I am a professional Network/Security Engineer, but I am still taking my first steps into Linux & docker currently. This is my first egroupware install, I got it up& running perfectly yesterday but after a reboot, I get the message “502 Bad Gateway” when trying to access the webGUI.
Being a big supporter of RTFM, so I did my homework and looked at various posts that had similar issues. In particular these ones:
However I am still stuck, and am therefore hoping for your help. Please note that this is NOT a production environment (yet) so this is definitely not the kind of “I messed up our mission-critical production system, I know it’s 17H45 on a Friday afternoon and I don’t have paid support but my boss is looking at me and I need it to be solved before 18:00 sharp, so help me pleeeeeease” request! In fact, I’d like to understanding the reason of what’s happening as much as getting the issue fixed.
This is the environment:
Operating System: Ubuntu 20.04.2 LTS
Kernel: Linux 5.4.0-77-generic
version is 21.1
Both the VM and egroupware were installed from scratch, it is not an upgrade from a previous version (I read in one of the posts mentioned above that this does make a difference)
Troubleshooting steps already performed (according to the posts mentioned above). All these outputs have been gathered after the reboot, when I am experiencing the “Bad gateway” message on te browser. However, as this is a VM and I do have a snapshot from just before the reboot when everything worked, I can gather logs from before if needed.
admin@egw:~$ sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
32917ae6da71 nginx:stable-alpine "/docker-entrypoint.…" 2 days ago Up 5 hours 127.0.0.1:8080->80/tcp egroupware-nginx
06bb91fcd480 phpswoole/swoole:4.6-php7.4-alpine "docker-php-entrypoi…" 2 days ago Up 5 hours egroupware-push
51ea288519f5 containrrr/watchtower:latest "/watchtower --sched…" 2 days ago Up 5 hours 8080/tcp egroupware-watchtower
bad0b0857ab0 egroupware/egroupware:21.1 "/entrypoint.sh php-…" 2 days ago Up 9 seconds 9000/tcp egroupware
69cadb8902d9 mariadb:10.4 "docker-entrypoint.s…" 2 days ago Up 5 hours 3306/tcp egroupware-db
24f18aeb4b5f quay.io/egroupware/collabora-key:stable "/bin/sh -c 'bash st…" 2 days ago Up 5 hours 127.0.0.1:9980->9980/tcp collabora-key
=> all containers seem OK (UP)
admin@egw:/etc/egroupware-docker$ systemctl status docker.service
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2021-07-16 09:32:39 UTC; 5h 2min ago
TriggeredBy: ● docker.socket
Main PID: 969 (dockerd)
├─ 969 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
├─1330 /usr/bin/docker-proxy -proto tcp -host-ip 127.0.0.1 -host-port 9980 -container-ip 172.18.0.2 -container-port 9980
└─1358 /usr/bin/docker-proxy -proto tcp -host-ip 127.0.0.1 -host-port 8080 -container-ip 172.19.0.5 -container-port 80
admin@egw:/etc/egroupware-docker$ docker-compose logs -f egoupware
ERROR: Couldn't connect to Docker daemon at http+docker://localhost - is it running?
If it’s at a non-standard location, specify the URL with the DOCKER_HOST environment variable.
=> I don’t think this is the output expected. But this somehow contradicts the docker ps -a output, doesn’t it? if the DOCKER_HOST variable should be set manually, in which file do I have to modify it? (I am asking because some files, for instance docker-compose.yml shall not be modified, but docker-compose.override.yml instead).
sudo docker-compose up
egroupware | /usr/bin/php7.4 -d memory_limit=-1 /usr/share/egroupware/setup/setup-cli.php --update 'all,admin,xxxxxxxxxxxx'
egroupware | EGroupware API version 21.1 found.
egroupware | EGroupware configuration file (header.inc.php) version 1.29 exists and is up to date
egroupware | An error happened: Call to a member function read() on bool
egroupware | Installing of EGroupware failed!
…and here’s where I get lost. The installation of egroupware failed even though we saw earlier that all containers were running… Could you help me investigating from there?