sablierapp / sablier

Start your containers on demand, shut them down automatically when there's no activity. Docker, Docker Swarm Mode and Kubernetes compatible.
https://sablierapp.dev/
GNU Affero General Public License v3.0
1.36k stars 46 forks source link

sablier won't detect guacd container as started #154

Closed xsolinsx closed 1 year ago

xsolinsx commented 1 year ago

Describe the bug I have an Apache Guacamole container (GUI) which depends on another container running Apache Guacd (backend), when I access the GUI through traefik I can see sablier trying to start up both containers, but, even though it correctly starts both, the guacd one will never be detected as started, thus making it impossible to access the GUI with an infinite loop on the sablier middleware screen.

Context

Expected behavior Sablier should be able to detect that guacd was started successfully.

Additional context Traefik Middleware

    sablier_guacamole:
      plugin:
        sablier:
          sablierUrl: http://sablier:10000
          names: guacd,guacamole
          sessionDuration: 15m
          dynamic:
            showDetails: true
            theme: shuffle
acouvreur commented 1 year ago

Sablier actually checks for healthiness of a container, can you provide more details by showing sablier logs and the multiple states of the container guacd using docker ps -a ?

xsolinsx commented 1 year ago

I am sorry I missed that, adding the following healthcheck to my docker compose solved the issue, thank you!

    healthcheck:
      test: ["CMD-SHELL", "nc -z 127.0.0.1 4822", "||", "exit 1"]
      interval: 5s
      timeout: 3s
      start_period: 1m
      retries: 0