Guacamole WebSocket报错java.lang.IllegalStateException排查求助
Guacamole 1.5.0 连接周期性断开报错排查请求
环境信息
原Guacamole 1.4.0服务器故障后,新搭建服务器配置:
- 操作系统:Ubuntu 22.04
- Guacamole版本:1.5.0
- Tomcat版本:9.0.73(曾尝试更换为9.0.71、9.0.21)
- 反向代理:Nginx
- JDK版本:openjdk 11.0.18 2023-01-17(曾升级至openjdk 19)
- 认证方式:LDAP + TOTP
故障现象
用户可正常登录并建立远程桌面连接,但每分钟会弹出红色错误提示:
The remote desktop server encountered an error and has closed the connection. Please try again or contact your system administrator.
查看Tomcat的catalina.out日志,每次报错对应如下异常栈:
Exception in thread "Thread-4" 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)
已执行排查动作
- 确认未修改RDP/VNC服务器配置及网络防火墙规则
- 验证服务器已安装所有必要依赖模块(含libwebsockets)
- 尝试禁用系统IPv6
- 尝试回退安装Guacamole 1.4.0,因代码弃用导致安装失败
- 修改
guacd.conf配置,将guacd绑定至127.0.0.1
以上操作后问题仍未解决,恳请提供排查方向。
内容的提问来源于stack exchange,提问作者s3rvant
相关产品推荐
相关产品推荐

