abesnier / docker-guacamole

A self-contained guacamole docker container for x64. Remotely connect over SSH, RDP or VNC using HTML5.
https://hub.docker.com/r/abesnier/guacamole
GNU General Public License v3.0
78 stars 14 forks source link

new config won't start up (postgresql.conf not found) #3

Closed quorn23 closed 2 years ago

quorn23 commented 2 years ago

Describe The Bug: Fresh installation of the container won't start up properly

To Reproduce:

    image: abesnier/guacamole
    container_name: guacamole
    hostname: guacamole
    environment:
     - EXTENSIONS=auth-totp
    volumes:
     - ${DOCKERCONFDIR}/guacamole:/config
    ports:
      - 9010:8080

Expected behavior: First start creates all files

Logs:

today at 19:29:22postgres: could not access the server configuration file "/config/postgres/postgresql.conf": No such file or directory
today at 19:29:22/var/run/postgresql:5432 - no response
today at 19:29:22Waiting for postgres to come up...

Screenshots:

Environment:

abesnier commented 2 years ago

Hello quorn23

Sorry to see that, and sorry for the delayed reply. What is the expected value of ${DOCKERCONFDIR}? What happens if you replace ${DOCKERCONFDIR}/config with another path? Can you start the container with a command line, for example docker run -d -v "config:/config" --name testguac abesnier/guacamole? For all I have tested, the issue would be that there is an issue with access right to the host folder. If the config directory does not exist, start the container as root (add user: root in docker-compose.yml, or use -u root for docker run). This will make sure the configuration from the image is created in the host.

I will update the readme to reflect this.

abesnier commented 2 years ago

Hello @quorn23 Did you give a try with -u root? May I close the issue?

doodie commented 2 years ago

RH 8.5 Docker version 20.10.12, build e91ed57

I am having the same issue. Ran as root, both manually and as a stack.

`docker run \

-p 8080:8080 \ -u root \ -v /opt/guacamole:/config \ abesnier/guacamole`

` version: "3" services: guacamole: image: abesnier/guacamole container_name: guacamole user: root volumes:

i tried fixing ownership to root adjusting permissions, but after a restart, it reverts back root@elder:/opt/guacamolell total 0 drwxr-xr-x 6 root root 105 Feb 11 22:08 guacamole drwx------ 2 103 105 6 Feb 11 22:08 postgres

test container came back with same issue

abesnier commented 2 years ago

Hi @doodie

Really sorry to see that. After some investigation, I believe the root cause is an issue with s6 overlay. The script that is supposed to check if postgres is setup or not does not run. I have a few ways to bypass this issue, I will let you know. If that does not work, I will revert to s6 overlay 2.2.0.3, as the issue is with the way s6 overlay 3 handles the init scripts.

abesnier commented 2 years ago

I confirm I cannot make it work with the current release of S6 overlay. I already had issues that were fixed, and obviously the fix does not work anymore with the latest release. I am quite disappointed.

I will revert to s6 overlay 2.2.03, and notify you when the image is pushed.

abesnier commented 2 years ago

@doodie @quorn23 Image reverted to s6 overlay v2.2.0.3, you can try again (images abesnier/guacamole:1.4.0 or abesnier/guacamole:latest)

doodie commented 2 years ago

@abesnier confirmed that container is able to startup now. Thanks for fixing.

quorn23 commented 2 years ago

Hello @quorn23 Did you give a try with -u root? May I close the issue?

Apologizes for my late answer, life was busy.

I can confirm the reported behavior of doodie and that your updated image is working now.

Thanks for looking into it.

I will close the issue as it's solved :)