Introduction
For security reasons, VNC Servers limit the amount of information returned to VNC Viewers when a connection attempt fails. Hence, the error message Connection closed unexpectedly does not provide enough information to diagnose your problem. Before submitting a support request, you should first check the VNC Server's error log to find out what caused the problem.
The sections below describe how to find the VNC Server's error log on various platforms. Once you have located the log, look for messages logged at the time of the error that begin with the text Connections: closed:. In some cases, the information will be sufficient for you to solve the problem without submitting a support request; if not, then please include this information when submitting a support request.
Windows
On Windows, VNC Server logs error messages to the Application Event Log. This is located under Administrative Tools in Control Panel:
You should look for error messages logged by WinVNC4.
UNIX
If you have started a VNC desktop with the vncserver command then the location of the VNC Server error log is printed out when your desktop is started:
VNC Server Enterprise Edition E4.2 - built Dec 22 2005 11:36:21
Copyright (C) 2002-2005 RealVNC Ltd.
See http://www.realvnc.com for information on VNC.
Running applications in /home/user/.vnc/xstartup
Log file is /home/user/.vnc/host:10.log
New desktop is host:10
If you are using the vnc.so
module, then the server log will be in your X Server log file. The location of this varies between platforms and X Server versions, but is often /var/log/gdm/:0.log
or something similar.
If you have started a VNC desktop using xinetd then the location of the VNC Server error log is determined by the InetdLogFile
parameter. By default, this is /tmp/Xvnc-inetd-DISPLAYNUM-USER.log
, where DISPLAYNUM
is the display number assigned to the connection and USER
is the username of the user who owns the VNC desktop.