jwetzell / docker-guacamole

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

Freshly setup with podman shutsdown automatically when there's no login/activity for some time. #39

Open RustyRaptor opened 8 months ago

RustyRaptor commented 8 months ago

Describe The Bug: Freshly setup with rootless podman shuts down automatically when there's no login/activity for some time.

To Reproduce: Use this docker-compose.yaml file with podman-compose on Fedora 39 in rootless mode.

version: '3 '
services:
  guacamole:
    image: jwetzell/guacamole
    container_name: guacamole
    volumes:
      - ./postgres:/config
    ports:
      - 8080:8080
    restart: always
volumes:
  postgres:
    driver: local

Expected behavior: Should stay runnning even when there is no activity.

Logs:

guacd[1911]: INFO:      Internal VNC client disconnected
guacd[266]: INFO:       Connection "$0a0e9b7c-3510-467b-b491-7fb0f7d54cd9" removed.
guacd[266]: INFO:       Creating new client for protocol "vnc"
guacd[266]: INFO:       Connection ID is "$7b33e5c8-006f-4db6-8ed4-45a07d51e6f5"
guacd[2380]: INFO:      Cursor rendering: local
guacd[2380]: INFO:      User "@5445b174-0a82-4168-b23c-b12a18396e7b" joined connection "$7b33e5c8-006f-4db6-8ed4-45a07d51e6f5" (1 users now present)
06:33:37.859 [http-nio-8080-exec-4] INFO  o.a.g.tunnel.TunnelRequestService - User "ziadarafat" connected to connection "3".
guacd[2380]: INFO:      User "@5445b174-0a82-4168-b23c-b12a18396e7b" disconnected (0 users remain)
guacd[2380]: INFO:      Last user of connection "$7b33e5c8-006f-4db6-8ed4-45a07d51e6f5" disconnected
Exception in thread "Thread-29" java.lang.IllegalStateException: Message will not be sent because the WebSocket session has been closed
        at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.writeMessagePart(WsRemoteEndpointImplBase.java:442)
        at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:314)
        at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:254)
        at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendString(WsRemoteEndpointImplBase.java:195)
        at org.apache.tomcat.websocket.WsRemoteEndpointBasic.sendText(WsRemoteEndpointBasic.java:37)
        at org.apache.guacamole.websocket.GuacamoleWebSocketTunnelEndpoint.sendInstruction(GuacamoleWebSocketTunnelEndpoint.java:152)
        at org.apache.guacamole.websocket.GuacamoleWebSocketTunnelEndpoint.access$200(GuacamoleWebSocketTunnelEndpoint.java:53)
        at org.apache.guacamole.websocket.GuacamoleWebSocketTunnelEndpoint$2.run(GuacamoleWebSocketTunnelEndpoint.java:253)
06:33:58.998 [http-nio-8080-exec-10] INFO  o.a.g.tunnel.TunnelRequestService - User "ziadarafat" disconnected from connection "3". Duration: 21138 milliseconds
guacd[266]: INFO:       Creating new client for protocol "vnc"
guacd[266]: INFO:       Connection ID is "$adcb203e-d51c-4df4-90ad-5edf7c381afc"
guacd[2479]: INFO:      Cursor rendering: local
guacd[2479]: INFO:      User "@5965ef7b-1e1b-47d3-941a-b269b5594239" joined connection "$adcb203e-d51c-4df4-90ad-5edf7c381afc" (1 users now present)
06:33:59.567 [http-nio-8080-exec-2] INFO  o.a.g.tunnel.TunnelRequestService - User "ziadarafat" connected to connection "3".
guacd[2380]: INFO:      Internal VNC client disconnected
guacd[266]: INFO:       Connection "$7b33e5c8-006f-4db6-8ed4-45a07d51e6f5" removed.
07:25:01.783 [http-nio-8080-exec-9] INFO  o.a.g.tunnel.TunnelRequestService - User "ziadarafat" disconnected from connection "3". Duration: 3062215 milliseconds
guacd[2479]: ERROR:     User is not responding.
guacd[2479]: INFO:      User "@5965ef7b-1e1b-47d3-941a-b269b5594239" disconnected (0 users remain)
guacd[2479]: INFO:      Last user of connection "$adcb203e-d51c-4df4-90ad-5edf7c381afc" disconnected
guacd[2479]: INFO:      Internal VNC client disconnected
guacd[266]: INFO:       Connection "$adcb203e-d51c-4df4-90ad-5edf7c381afc" removed.
LOG:  autovacuum launcher shutting down
LOG:  received smart shutdown request
FATAL:  terminating connection due to administrator command
FATAL:  terminating connection due to administrator command
FATAL:  terminating connection due to administrator command
LOG:  shutting down
08-Feb-2024 07:41:10.568 INFO [Thread-2] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8080"]
08-Feb-2024 07:41:10.583 INFO [Thread-2] org.apache.catalina.core.StandardService.stopInternal Stopping service [Catalina]
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
08-Feb-2024 07:41:10.618 INFO [Thread-2] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-8080"]
LOG:  database system is shut down
08-Feb-2024 07:41:10.625 INFO [Thread-2] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-8080"]
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.

Screenshots: N/A

Environment:

podman-compose version: 1.0.6
['podman', '--version', '']
using podman version: 4.9.0
podman-compose version 1.0.6
podman --version 
podman version 4.9.0
RustyRaptor commented 8 months ago

Apparently this isn't specific to this guacamole container. Also happening on this one.

https://github.com/flcontainers/guacamole/issues/111

jwetzell commented 4 months ago

Is this still an issue with the 1.5.5 image? If so, I might have to get a test environment setup to try and reproduce.