When connecting to a VNC Server (applies to both RealVNC and TightVNC), the VNC client (applies to both RealVNC and TightVNC) is unable to connect, and shows this message, “Connection closed unexpectedly”.
The followings settings are properly configured and they are not the issues:-
- VNC server and client is allowed by firewall; and
- VNC port is correct;
- VNC password is correct.
However, the log file of TightVNC server shows:-
[ 2132/ 4332] 2016-06-15 13:23:30 ! write() function stopped because transport has not been initialized yet.
[ 2132/ 4332] 2016-06-15 13:23:32 ! AnonymousPipe::read() failed (m_hRead = 000000000000030C)
[ 2132/ 4332] 2016-06-15 13:23:32 ! The Pipe's read function failed after ReadFile calling (The pipe has been ended. (109))
[ 2132/ 4332] 2016-06-15 13:23:32 ! Exception during DesktopClientImpl creaion:
[ 2132/ 4332] 2016-06-15 13:23:32 ! Error during RFB initialization:
[ 2132/ 4332] 2016-06-15 13:23:32 ! Connection will be closed:
[ 4500/ 4420] 2016-06-15 13:23:42 ! Desktop server application failed with error: The desktop server time out expired
The root caused is “RFB” on the VNC server.
Solution:-
- uninstalll “DisplayLink” driver from server and VNC client is able to connect to VNC server;
- uninstall any display driver that is incompatible with VNC server.
Another reason for “Connection closed unexpectedly” is that RealVNC version 4.x does not work in Windows 7. For Windows 7, it requires Real VNC version 5 and above.