skip to Main Content

I installed Apache Guacamole using Docker on a CentOS 8.1 with Docker 19.03.

I followed the steps described here:

I started the containers like this:

# mysql container
docker run --name guacamole-mysql -e MYSQL_RANDOM_ROOT_PASSWORD=yes -e MYSQL_ONETIME_PASSWORD=yes -d mysql/mysql-server

# guacd container
docker run --name guacamole-guacd -e GUACD_LOG_LEVEL=debug -d guacamole/guacd

# guacamole container
docker run --name guacamole-guacamole --link guacamole-guacd:guacd --link guacamole-mysql:mysql -e MYSQL_DATABASE=guacamole -e MYSQL_USER=guacamole -e MYSQL_PASSWORD=password -d -p 8080:8080 guacamole/guacamole

All went fine and I was able to access the Guacamole web interface on port 8080. I configured one VNC connection to another machine on port 5900. Unfortunately when I try to use that connection I get the following error in the web interface:

“An internal error has occurred within the Guacamole server, and the connection has been terminated…”

I had a look on the logs too and in the guacamole log I found this:

docker logs --tail all -f guacamole-guacamole
...
15:54:06.262 [http-nio-8080-exec-2] ERROR o.a.g.w.GuacamoleWebSocketTunnelEndpoint - Creation of WebSocket tunnel to guacd failed: End of stream while waiting for "args".
15:54:06.685 [http-nio-8080-exec-8] ERROR o.a.g.s.GuacamoleHTTPTunnelServlet - HTTP tunnel request failed: End of stream while waiting for "args".

I’m sure that the target machine (which is running the VNC server) is fine. I’m able to connect to it from both a VNC client and another older Guacamole which I installed previously (not using Docker).

My containers look ok too:

docker container ps

CONTAINER ID        IMAGE                 COMMAND                  CREATED             STATUS                 PORTS                    NAMES
ad62aaca5627        guacamole/guacamole   "/opt/guacamole/bin/…"   About an hour ago   Up About an hour       0.0.0.0:8080->8080/tcp   guacamole-guacamole
a46bd76234ea        guacamole/guacd       "/bin/sh -c '/usr/lo…"   About an hour ago   Up About an hour       4822/tcp                 guacamole-guacd
ed3a590b19d3        mysql/mysql-server    "/entrypoint.sh mysq…"   2 hours ago         Up 2 hours (healthy)   3306/tcp, 33060/tcp      guacamole-mysql

I connected to the guacamole-guacamole container and pinged the other two containers: guacamole-mysql and guacamole-guacd. Both look fine and reachable.

docker exec -it guacamole-guacamole bash

root@ad62aaca5627:/opt/guacamole# ping guacd
PING guacd (172.17.0.2) 56(84) bytes of data.
64 bytes from guacd (172.17.0.2): icmp_seq=1 ttl=64 time=0.191 ms
64 bytes from guacd (172.17.0.2): icmp_seq=2 ttl=64 time=0.091 ms

root@ad62aaca5627:/opt/guacamole# ping mysql
PING mysql (172.17.0.3) 56(84) bytes of data.
64 bytes from mysql (172.17.0.3): icmp_seq=1 ttl=64 time=0.143 ms
64 bytes from mysql (172.17.0.3): icmp_seq=2 ttl=64 time=0.102 ms

Looks like there is a communication issue between the guacamole itself and guacd. And this is where I’m completely stuck.

EDIT

I tried on CentOS 7 and I got the same issues.

I also tried this solution https://github.com/boschkundendienst/guacamole-docker-compose as suggested by @BatchenRegev but I got the same issue again.

2

Answers


  1. I’ve been experiencing the same issues under centos.

    My only difference is that I’m hosting the database on a separate machine as this is all cloud-hosted and I want to be able to destroy/rebuild the guacamole server at will.

    I ended creating a docker-compose.yml file as that seemed to work better.

    Other gotcha’s I came across:

    • make sure the guacd_hostname is the actual machine hostname and not 127.0.0.1
    • setting Selinux to allow httpd.

      sudo setsebool -P httpd_can_network_connect

    My docker-compose.yml is shown below replace all {variables} with your own and update the file if you are using a sql image as well.

    version: "2"
    services:
      guacd:
        image: "guacamole/guacd"
        container_name: guacd
        hostname: guacd
        restart: always
        volumes:
          - "/data/shared/guacamole/guacd/data:/data"
          - "/data/shared/guacamole/guacd/conf:/conf:ro"
        expose:
          - "4822"
        ports:
          - "4822:4822"
        network_mode: bridge
    
      guacamole:
        image: "guacamole/guacamole"
        container_name: guacamole
        hostname: guacamole
        restart: always
        volumes:
          - "/data/shared/guacamole/guacamole/guac-home:/data"
          - "/data/shared/guacamole/guacamole/conf:/conf:ro"
        expose:
          - "8080"
        ports:
          - "8088:8080"
        network_mode: bridge
        environment:
          - "GUACD_HOSTNAME={my_server_hostname}"
          - "GUACD_PORT=4822"
          - "MYSQL_PORT=3306"
          - "MYSQL_DATABASE=guacamole"
          - "GUACAMOLE_HOME=/data"
          - "MYSQL_USER=${my_db_user}"
          - "MYSQL_PASSWORD=${my_db_password}"
          - "MYSQL_HOSTNAME=${my_db_hostname}"
    Login or Signup to reply.
  2. i have the same problem on FreeBSD 12.2 – SOLUTION
    Change "localhost" hostname in

    /usr/local/etc/guacamole-client/guacamole.properties
    

    to "example"

    guacd-hostname: 192.168.10.10
    

    next: /usr/local/etc/guacamole-server/guacd.conf

    [server]
    bind_host = 192.168.10.10
    

    Check /etc/guacamole/guacamole.properties i have link:

    guacd-hostname: 192.168.10.10
    

    Restart:

    /usr/local/etc/rc.d/guacd restart
    /usr/local/etc/rc.d/tomcat9 restart
    

    with name "localhost" i have:
    11:01:48.010 [http-nio-8085-exec-3] DEBUG o.a.g.s.GuacamoleHTTPTunnelServlet - Internal error in HTTP tunnel.
    I hope it will be useful to someone else – it works for me`

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search