前段时间,我在LAMP服务器上安装了Apache Guacamole(Guacd-〉Tomcat 9-〉Apache [作为guac的反向代理以访问vhost]),安装很简单,因为说明清晰易懂,Guacamole的示例无论在RDP、SSH还是VNC上都能完美运行。
昨天我遇到了一个问题与鳄梨酱-从前端开始:
Guacamole服务器发生内部错误,联机已终止。如果问题持续发生,请通知您的系统管理员,或检查您的系统记录档。
因此,该问题表明,Guacamole服务器本身存在问题,阅读Guacamole的状态:
maj 20 10:02:02 mywebsite.here systemd[1]: Starting LSB: Guacamole proxy daemon...
maj 20 10:02:02 mywebsite.here guacd[32305]: Guacamole proxy daemon (guacd) version 1.4.0 started
maj 20 10:02:02 mywebsite.here guacd[32303]: Starting guacd:
maj 20 10:02:02 mywebsite.here guacd[32305]: guacd[32305]: INFO: Guacamole proxy daemon (guacd) version 1.4.0 started
maj 20 10:02:02 mywebsite.here guacd[32307]: Listening on host ::1, port 4822
maj 20 10:02:02 mywebsite.here guacd[32303]: SUCCESS
maj 20 10:02:02 mywebsite.here systemd[1]: Started LSB: Guacamole proxy daemon.
从guacd的当前日志来看,一切似乎都正常,guacd侦听localhost并绑定到4822 -检查netstat以验证服务可用性:
tcp6 0 0 localhost:4822 [::]:* LISTEN 32307/guacd
然后telnet到本地主机:4822:
telnet localhost 4822
Trying ::1...
Connected to localhost.
Escape character is '^]'.
- 按回车键 *
Connection closed by foreign host.
回到鳄梨酱:
guacd[32307]: Guacamole protocol violation. Perhaps the version of guacamole-client is incompatible with this version of guacd?
因此,由于你不能使用telnet与鳄梨酱的连接被终止,但从我可以看到,这是服务是可用的&准备使用。
既然鳄梨酱看起来没问题,那就该用Tomcat 9了:
[2022-05-20 10:20:26] [info] 10:20:26.434 [http-nio-8080-exec-10] ERROR o.a.g.w.GuacamoleWebSocketTunnelEndpoint - Creation of WebSocket tunnel to guacd failed: java.net.ConnectException: Połączenie odrzucone (Connection refused)
[2022-05-20 10:20:26] [info] 10:20:26.682 [http-nio-8080-exec-8] ERROR o.a.g.s.GuacamoleHTTPTunnelServlet - HTTP tunnel request failed: java.net.ConnectException: Połączenie odrzucone (Connection refused)
越来越清楚的是,问题必须在Tomcat 9和Guacamole本身之间,并且来自Tomcat方面--您有什么想法如何调试这个问题吗?
日志级别提高的Tomcat日志:
错误时刻:
[2022-05-24 08:56:11] [info] 08:56:11.135 [http-nio-8080-exec-3] DEBUG o.a.i.d.pooled.PooledDataSource - Testing connection 29049410 ...
[2022-05-24 08:56:11] [info] 08:56:11.139 [http-nio-8080-exec-3] DEBUG o.a.i.d.pooled.PooledDataSource - Connection 29049410 is GOOD!
[2022-05-24 08:56:11] [info] 08:56:11.139 [http-nio-8080-exec-3] DEBUG o.a.i.d.pooled.PooledDataSource - Returned connection 29049410 to pool.
[2022-05-24 08:56:11] [info] 08:56:11.140 [http-nio-8080-exec-3] ERROR o.a.g.w.GuacamoleWebSocketTunnelEndpoint - Creation of WebSocket tunnel to guacd failed: java.net.ConnectException: Połączenie odrzucone (Connection refused)
[2022-05-24 08:56:11] [info] 08:56:11.159 [http-nio-8080-exec-3] DEBUG o.a.g.w.GuacamoleWebSocketTunnelEndpoint - Error connecting WebSocket tunnel.
[2022-05-24 08:56:11] [info] org.apache.guacamole.GuacamoleServerException: java.net.ConnectException: Połączenie odrzucone (Connection refused)
[2022-05-24 08:56:11] [info] #011at org.apache.guacamole.net.InetGuacamoleSocket.<init>(InetGuacamoleSocket.java:114)
[2022-05-24 08:56:11] [info] #011at org.apache.guacamole.auth.jdbc.tunnel.ManagedInetGuacamoleSocket.<init>(ManagedInetGuacamoleSocket.java:56)
[2022-05-24 08:56:11] [info] #011at org.apache.guacamole.auth.jdbc.tunnel.AbstractGuacamoleTunnelService.getUnconfiguredGuacamoleSocket(AbstractGuacamoleTunnelService.java:319)
[2022-05-24 08:56:11] [info] #011at org.apache.guacamole.auth.jdbc.tunnel.AbstractGuacamoleTunnelService.assignGuacamoleTunnel(AbstractGuacamoleTunnelService.java:483)
[2022-05-24 08:56:11] [info] #011at org.apache.guacamole.auth.jdbc.tunnel.AbstractGuacamoleTunnelService.getGuacamoleTunnel(AbstractGuacamoleTunnelService.java:643)
[2022-05-24 08:56:11] [info] #011at org.mybatis.guice.transactional.TransactionalMethodInterceptor.invoke(TransactionalMethodInterceptor.java:96)
[2022-05-24 08:56:11] [info] #011at org.apache.guacamole.auth.jdbc.connection.ConnectionService.connect(ConnectionService.java:548)
[2022-05-24 08:56:11] [info] #011at org.apache.guacamole.auth.jdbc.connection.ModeledConnection.connect(ModeledConnection.java:274)
[2022-05-24 08:56:11] [info] #011at org.apache.guacamole.tunnel.TunnelRequestService.createConnectedTunnel(TunnelRequestService.java:216)
[2022-05-24 08:56:11] [info] #011at org.apache.guacamole.tunnel.TunnelRequestService.createTunnel(TunnelRequestService.java:347)
[2022-05-24 08:56:11] [info] #011at org.apache.guacamole.tunnel.websocket.RestrictedGuacamoleWebSocketTunnelEndpoint.createTunnel(RestrictedGuacamoleWebSocketTunnelEndpoint.java:113)
[2022-05-24 08:56:11] [info] #011at org.apache.guacamole.websocket.GuacamoleWebSocketTunnelEndpoint.onOpen(GuacamoleWebSocketTunnelEndpoint.java:200)
[2022-05-24 08:56:11] [info] #011at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.init(WsHttpUpgradeHandler.java:136)
[2022-05-24 08:56:11] [info] #011at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:934)
[2022-05-24 08:56:11] [info] #011at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1684)
[2022-05-24 08:56:11] [info] #011at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
[2022-05-24 08:56:11] [info] #011at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[2022-05-24 08:56:11] [info] #011at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[2022-05-24 08:56:11] [info] #011at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
[2022-05-24 08:56:11] [info] #011at java.base/java.lang.Thread.run(Thread.java:829)
[2022-05-24 08:56:11] [info] Caused by: java.net.ConnectException: Połączenie odrzucone (Connection refused)
[2022-05-24 08:56:11] [info] #011at java.base/java.net.PlainSocketImpl.socketConnect(Native Method)
[2022-05-24 08:56:11] [info] #011at java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:412)
[2022-05-24 08:56:11] [info] #011at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:255)
[2022-05-24 08:56:11] [info] #011at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:237)
[2022-05-24 08:56:11] [info] #011at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
[2022-05-24 08:56:11] [info] #011at java.base/java.net.Socket.connect(Socket.java:609)
[2022-05-24 08:56:11] [info] #011at org.apache.guacamole.net.InetGuacamoleSocket.<init>(InetGuacamoleSocket.java:100)
[2022-05-24 08:56:11] [info] #011... 19 common frames omitted
我不喜欢Java,但我相信实际的错误原因是在日志的那部分。我将感谢任何与Java相关的人看一看,并提供他们的意见,如果这是相关的。
Guacamole.properties:
MySQL properties
mysql-hostname: 127.0.0.1
mysql-port: 3306
mysql-database: guacamole_db
mysql-username: guacamole_admin
mysql-password: guacamole_******
Hostname and port of guacamole proxy
guacd-hostname: 192.168.1.49
guacd-port: 4822
- 本地主机表示形式(127.0.0.1/::1/localhost/192.168.1.49 [本地静态地址])之间的更改不会产生差异 *
分析Apache日志可能没有意义,因为尝试通过Tomcat 9使用Guacamole只提供了相同的结果。
3条答案
按热度按时间1tu0hz3e1#
我已经设法解决了这个问题-这个示例失败的原因是guacd.conf文件不存在,它应该是基于/etc/guacamole本地化,绑定到::1不工作,无论我如何努力尝试-绑定到IPv4表示[127.0.0.1]工作-检查了所有用户的历史记录,以验证删除的文件,但什么都没有发现。奇怪。
为了避免这种情况再次发生,我的最佳建议是跟踪当前的配置文件,以便根据需要轻松重新配置,并了解配置文件结构的一般知识。
tp5buhyn2#
从/etc/hosts中::1删除本地主机,然后重新启动。工作正常。
7fhtutme3#
默认情况下,在支持IPv6的系统上,guacd监听::1。甚至在/etc/guacamole/guacd.conf上指定localhost也不起作用。下面是起作用的guacd.conf文件。
将其设置为调试显示后台进程在::1上列出。将localhost更改为127.0.0.1,它工作了!
还包括客户端上的错误,以便人们可以得出以下问题/答案:* 一个内部错误已经发生在这鳄梨色拉酱服务器中,并且这连接已经被终止.如果这问题仍然存在,请通知您的系统管理员,或者检查您的系统日志 *
如果您收到此消息,请检查tomcat Catalina .out文件中的问题。以下是我针对此问题所做的工作: