Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: VNC Server Error: Unable to connect to server  (Read 2618 times)

0 Members and 1 Guest are viewing this topic.

jominj

  • Guest
VNC Server Error: Unable to connect to server
« on: February 21, 2014, 01:17:22 pm »
When connecting to VNC server we may get the error "Unable to connect to server" in the client side.

When try to restart the VNC service from the server will get the following error:

[myuser@xxxxxx tmp]# service vncserver restart
Shutting down VNC server: 3:myuser                         [FAILED]
Starting VNC server: 3:myuser
Warning: xxx.xxx.xxx:3 is taken because of /tmp/.X3-lock
Remove this file if there is no X server xxx.xxx.xxx.xxx:3
A VNC server is already running as :3                         [FAILED]


As we can see there is problem with the lock file and socket file.

1. Remove lock file and socket
[myuser@xxxxxx tmp]# rm -rf /tmp/.X3-lock
[myuser@xxxxxx tmp]# rm -rf /tmp/.X11-unix/X3

2. Restart vnc service
[myuser@xxxxxx tmp]# service vncserver restart