boschkundendienst / guacamole-docker-compose

Guacamole with docker-compose using PostgreSQL, nginx with SSL (self-signed)
GNU General Public License v3.0
983 stars 410 forks source link

Malformed VNC packet when connecting to docker-selenium browser. #57

Closed gbajson closed 1 year ago

gbajson commented 1 year ago

Hi, I experience issue with VNC connection from guacd_compose.

I can manually connect to VNC server from within guacd_compose container, but I see the errors in logs:

Steps to reproduce:

  1. Start selenium browser
    docker run -d -p 4444:4444 -p 5910:5900 --shm-size="2g" selenium/standalone-firefox:latest
  2. Setup connection in Guacamole
  3. Try to connect from Guacamole (default password is: secret)

Investigation:

$ docker exec -ti -u0 guacd_compose nc 10.144.107.99 5910
RFB 003.008
^C$ 

Logs:

guacd[1]: INFO: Connection "$3e281595-953d-4586-9e2b-d4b97dace24a" removed.
guacd[1]: INFO: Creating new client for protocol "vnc"
guacd[1]: INFO: Connection ID is "$10f8c948-cd3d-4550-8f37-ad39d3d2a946"
guacd[1451]: INFO:      Cursor rendering: local
guacd[1451]: INFO:      User "@56aafbd5-f035-4791-adf8-e23280170878" joined connection "$10f8c948-cd3d-4550-8f37-ad39d3d2a946" (1 users now present)
guacd[1451]: ERROR:     Unable to connect to VNC server.
guacd[1451]: INFO:      User "@56aafbd5-f035-4791-adf8-e23280170878" disconnected (0 users remain)
guacd[1451]: INFO:      Last user of connection "$10f8c948-cd3d-4550-8f37-ad39d3d2a946" disconnected
guacd[1]: INFO: Connection "$10f8c948-cd3d-4550-8f37-ad39d3d2a946" removed.

I use Ubuntu 22.04 with standard docker-ce network configuration.

Regards, Grzegorz

gbajson commented 1 year ago

I also dumped traffic in guacd_compose container and learnt that there is a malformed VNC packet. I am trying to connect to VNC provided by docker-selenium. I have no problem with connection using e.g. Remmina.

In the guacd troubleshooting guide I found information that:

Error instantiating client After the client plugin is loaded, an initialization function provided by the client plugin is invoked. If this function fails, then the client itself cannot be created, and this error will be logged. Usually this indicates that one or more of the parameters given to the client plugin are incorrect or malformed. Check the configuration of the connection in use at the time.

My connection doesn't seem to have any complex options.

I increased log level in guacd:

gbajson@zauek:~$ docker logs guacd_compose 
guacd[1]: INFO: Guacamole proxy daemon (guacd) version 1.5.0 started
guacd[1]: DEBUG:        Successfully bound AF_INET socket to host 0.0.0.0, port 4822
guacd[1]: INFO: Listening on host 0.0.0.0, port 4822
guacd[1]: INFO: Creating new client for protocol "vnc"
guacd[1]: INFO: Connection ID is "$b3677b21-abf8-4f52-8542-80ce392de117"
guacd[8]: DEBUG:        Processing instruction: size
guacd[8]: DEBUG:        Processing instruction: audio
guacd[8]: DEBUG:        Processing instruction: video
guacd[8]: DEBUG:        Processing instruction: image
guacd[8]: DEBUG:        Processing instruction: timezone
guacd[8]: DEBUG:        Processing instruction: name
guacd[8]: INFO: Cursor rendering: local
guacd[8]: DEBUG:        Parameter "swap-red-blue" omitted. Using default value of 0.
guacd[8]: DEBUG:        Parameter "color-depth" omitted. Using default value of 0.
guacd[8]: DEBUG:        Parameter "force-lossless" omitted. Using default value of 0.
guacd[8]: DEBUG:        Parameter "dest-port" omitted. Using default value of 0.
guacd[8]: DEBUG:        Parameter "encodings" omitted. Using default value of "zrle ultra copyrect hextile zlib corre rre raw".
guacd[8]: DEBUG:        Parameter "autoretry" omitted. Using default value of 0.
guacd[8]: DEBUG:        Parameter "reverse-connect" omitted. Using default value of 0.
guacd[8]: DEBUG:        Parameter "listen-timeout" omitted. Using default value of 5000.
guacd[8]: DEBUG:        Parameter "sftp-hostname" omitted. Using default value of "10.144.107.99".
guacd[8]: DEBUG:        Parameter "sftp-port" omitted. Using default value of "22".
guacd[8]: DEBUG:        Parameter "sftp-username" omitted. Using default value of "".
guacd[8]: DEBUG:        Parameter "sftp-password" omitted. Using default value of "".
guacd[8]: DEBUG:        Parameter "sftp-passphrase" omitted. Using default value of "".
guacd[8]: DEBUG:        Parameter "sftp-root-directory" omitted. Using default value of "/".
guacd[8]: DEBUG:        Parameter "sftp-server-alive-interval" omitted. Using default value of 0.
guacd[8]: DEBUG:        Parameter "sftp-disable-download" omitted. Using default value of 0.
guacd[8]: DEBUG:        Parameter "sftp-disable-upload" omitted. Using default value of 0.
guacd[8]: DEBUG:        Parameter "recording-name" omitted. Using default value of "recording".
guacd[8]: DEBUG:        Parameter "recording-exclude-output" omitted. Using default value of 0.
guacd[8]: DEBUG:        Parameter "recording-exclude-mouse" omitted. Using default value of 0.
guacd[8]: DEBUG:        Parameter "recording-include-keys" omitted. Using default value of 0.
guacd[8]: DEBUG:        Parameter "create-recording-path" omitted. Using default value of 0.
guacd[8]: DEBUG:        Parameter "wol-send-packet" omitted. Using default value of 0.
guacd[8]: INFO: User "@35d92de1-727b-47b3-8f36-41e90737855a" joined connection "$b3677b21-abf8-4f52-8542-80ce392de117" (1 users now present)
guacd[8]: DEBUG:        Client is using protocol version "VERSION_1_5_0"
guacd[8]: ERROR:        Unable to connect to VNC server.
guacd[8]: INFO: User "@35d92de1-727b-47b3-8f36-41e90737855a" disconnected (0 users remain)
guacd[8]: INFO: Last user of connection "$b3677b21-abf8-4f52-8542-80ce392de117" disconnected
guacd[8]: DEBUG:        Requesting termination of client...
guacd[8]: DEBUG:        Client terminated successfully.
guacd[1]: INFO: Connection "$b3677b21-abf8-4f52-8542-80ce392de117" removed.
gbajson commented 1 year ago

This might be the following issue.

EDIT I confirm, this is a problem, it all works fine with guacamole/guacd:1.4.0:

services:
  # guacd
  guacd:
    container_name: guacd_compose
    image: guacamole/guacd:1.4.0
    networks:
      guacnetwork_compose:
    environment:
      # trace, debug, info, warning, and error
      GUACD_LOG_LEVEL: trace
    restart: always
    volumes:
    - ./drive:/drive:rw
    - ./record:/record:rw
boschkundendienst commented 1 year ago

issue related to official guacamole project. Post your information at their issues at https://issues.apache.org/jira/projects/GUACAMOLE/issues/