Guacamole 1.4: “Creation of WebSocket tunnel to guacd failed”

Problem: Guacamole 1.4 shows “internal error” when making any connection and in /var/log/tomcat9/catalina.out you see something like:

ERROR o.a.g.w.GuacamoleWebSocketTunnelEndpoint - Creation of WebSocket tunnel to guacd failed: java.net.ConnectException: Connection refused (Connection refused)

Possible explanation:

This is due to IPv4 vs. IPv6 differences - depending on the version of Linux, guacd may listen on IPv6 by default, and Tomcat tries to connect on IPv4. Forcing one or the other to use IPv4 or IPv6 usually works - in this case, the change forces guacd to listen on IPv4, and Tomcat can connect to it.
Source

Solution: create /etc/guacamole/guacd.conf with the following contents:

[server]
bind_host = 127.0.0.1
bind_port = 4822

Also make sure your /etc/guacamole/guacamole.properties has client connection info:

guacd-hostname: 127.0.0.1
guacd-port: 4822

Then restart guacd:

systemctl restart guacd
This entry was posted in Solutions and tagged . Bookmark the permalink.

4 Responses to Guacamole 1.4: “Creation of WebSocket tunnel to guacd failed”

  1. Guacamole User says:

    You are my hero!

  2. weeper says:

    Thank you so much!

  3. Niall says:

    You are a gem. Thank you – this sorted out exact issue for me today with 1.5. And thanks for citing your research source mailing list link too. Good work.

  4. Guac User says:

    Many thanks indeed – spot on!!

Leave a Reply

Your email address will not be published. Required fields are marked *