VNC connection closed after log in

Help
2013-07-23
2013-10-03
  • Hi

    I have installed guacamole 0.8.2 from source on debian 7.1 and I've encountered some strange behaviour when I try to use VNC or SSH connection.

    Everything seems to be OK.
    I see login screen on remote machine but when I try to type the access information after a while I see only black screen followed by error message "Connection closed".

    /var/log/syslog
    Jul 23 17:39:14 brqb022x guacd[9867]: Protocol "vnc" selected
    Jul 23 17:39:14 brqb022x guacd[9867]: VNC server supports protocol version 3.7 (viewer 3.8)
    Jul 23 17:39:14 brqb022x guacd[9867]: We have 2 security types to read
    Jul 23 17:39:14 brqb022x guacd[9867]: 0) Received security type 1
    Jul 23 17:39:14 brqb022x guacd[9867]: Selecting security type 1 (0/2 in the list)
    Jul 23 17:39:14 brqb022x guacd[9867]: 1) Received security type 16
    Jul 23 17:39:14 brqb022x guacd[9867]: Selected Security Scheme 1
    Jul 23 17:39:14 brqb022x guacd[9867]: No authentication needed
    Jul 23 17:39:15 brqb022x guacd[9867]: Desktop name "nobody's x11 desktop (xxxxxxx:1)"
    Jul 23 17:39:15 brqb022x guacd[9867]: Connected to VNC server, using protocol version 3.7
    Jul 23 17:39:15 brqb022x guacd[9867]: VNC server default format:
    Jul 23 17:39:15 brqb022x guacd[9867]: 16 bits per pixel.
    Jul 23 17:39:15 brqb022x guacd[9867]: Least significant byte first in each pixel.
    Jul 23 17:39:15 brqb022x guacd[9867]: TRUE colour: max red 31 green 63 blue 31, shift red 11 green 5 blue 0
    Jul 23 17:39:15 brqb022x guacd[9867]: Starting client
    Jul 23 17:39:37 brqb022x guacd[9867]: VNC server closed connection
    Jul 23 17:39:37 brqb022x guacd[9867]: Error handling VNC server message
    Jul 23 17:39:37 brqb022x guacd[9867]: Error handling server messages: UNKNOWN STATUS CODE: <A9>m#001
    Jul 23 17:39:39 brqb022x guacd[9867]: Client finished normally

    for ssh then

    Jul 23 17:49:59 brqb022x guacd[10665]: Protocol "ssh" selected
    Jul 23 17:49:59 brqb022x guacd[10665]: Starting client
    Jul 23 17:50:07 brqb022x guacd[10665]: Client instruction handler error: Success
    Jul 23 17:50:07 brqb022x guacd[10665]: Failing instruction handler in client was "disconnect"
    Jul 23 17:50:08 brqb022x guacd[10665]: Client finished normally

    Any ideas on how to debug this issue? Your help is greatly appreciated.
    Thanks.

     
  • Michael Jumper
    Michael Jumper
    2013-07-23

    The message "VNC server closed connection" is coming from libvncclient directly (the library libguac-client-vnc uses for VNC), and likely means exactly what it says. Do you see anything in your VNC server's logs?

    As for SSH, the "Failing instruction handler in client was 'disconnect'" message is misleading, but just indicates that the connection was explicitly closed by a "disconnect" instruction. This happens when the browser tab or window is closed.

     
  • Hi

    VNC issue is solved, there was a incorrect login. Thank you for your explanation and prompt reply.

    Regarding SSH - it's working only on localhost. When I use remote machine the following message were written on the screen - "SSH auth failed" and of course connection was closed. Can I use ssh key ?

    One more thing:
    Is there a way how to keep actual vnc session when window is closed ?

    Thank you once again

     
  • Hi

    Just for information

    I found that there is one way how to keep open vnc session after window is closed. In my case (Xvnc) have to be started without xinetd daemon, I've written a simple script for this purpose. (separately persist session for x users)

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    #!/bin/sh
    ### BEGIN INIT INFO
    # Provides:          vncserver
    # Required-Start:    network
    # Default-Start:     3 4 5
    # Default-Stop:      0 6
    ### END INIT INFO
    
    PATH="$PATH:/usr/X11R6/bin/"
    
    # The Username:Group that will run VNC
    export USER="nobody"
    #${RUNAS}
    
    # The configuration file
    CONF=/etc/vncserver.conf
    
    # Color depth (between 8 and 32)
    DEPTH="24"
    
    # The Desktop geometry to use.
    #GEOMETRY="<WIDTH>x<HEIGHT>"
    #GEOMETRY="800x600"
    GEOMETRY="1024x768"
    #GEOMETRY="1280x1024"
    
    #contact named host for XDMCP
    QUERY="localhost"
    
    OPTIONS="-query ${QUERY} -depth ${DEPTH}"
    
    . /lib/lsb/init-functions
    
    case "$1" in
            start)
            echo -n "Starting vncserver for on localhost:${DISPLAY}"
            cat ${CONF} | while read DISPLAY GEOMETRY USER
            do
              startproc -u ${USER} -f /usr/X11R6/bin/Xvnc :${DISPLAY} ${OPTIONS}     -geometry ${GEOMETRY}
            done
            # Remember status and be verbose
            rc_status -v
            ;;
    
            stop)
            echo -n "Stoping vncserver on localhost:${DISPLAY}"
            killproc -TERM /usr/X11R6/bin/Xvnc
            # Remember status and be verbose
            rc_status -v
            ;;
    
            status)
            echo -n "Checking for Xvnc"
            checkproc /usr/X11R6/bin/Xvnc
    

    And conf.file looks like

    21 1280x1024 user1
    22 1024x768 user2