Hello,

I am running Guacamole in Kubernetes (using this helm chart 
https://github.com/Just-Insane/apache-guacamole-helm-chart). I am using the 
nginx ingress for ingress into the Guacamole frontend. Which uses Guacamole 
1.0.0 docker container.

I am getting some websocket timeout errors:

01:11:08.155 [http-nio-8080-exec-10] INFO o.a.g.tunnel.TunnelRequestService - 
User "justin" connected to connection "2".
01:11:08.234 [http-nio-8080-exec-1] INFO o.a.g.tunnel.TunnelRequestService - 
User "justin" disconnected from connection "2". Duration: 78 milliseconds
Exception in thread "Thread-166" java.lang.IllegalStateException: Message will 
not be sent because the WebSocket session has been closed
at 
org.apache.tomcat.websocket.WsRemoteEndpointImplBase.writeMessagePart(WsRemoteEndpointImplBase.java:424)
at 
org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:309)
at 
org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:250)
at 
org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendString(WsRemoteEndpointImplBase.java:191)
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)

The nginx ingress does support websockets by default, but their timeouts are 
set to 60 seconds. 
https://kubernetes.github.io/ingress-nginx/user-guide/miscellaneous/#websockets 
which I have resolved, by setting the timeouts on both suggested options to 
3600.

There does not seem to be any specific reason (or time duration) after which 
the connection is closed, and there is nothing that would cause the connection 
between the guacamole frontend and guacd to close prematurely.

When the connection fails, clicking the reconnect button on the prompt 
sometimes succeeds, however it usually fails. I have noticed that doing a hard 
reload of the tab seems to fix the issue for a little while.

Experience tells me that this is likely going to be an issue with the nginx 
setup, but if anyone else has other suggestions, I am interested in hearing 
them.

Thanks,

Justin

Reply via email to