Search code examples
redhatvnc-server

Vncserver on RHEL6 will not start, cannot establish any listening sockets


I have installed vncserver on my RHEL6 before, and possibly left some services running. I then re-installed it, but had trouble starting the service. There were apparently some views already running, but it created a view :6 and I was able to connect to my RHEL machine from Windows7.

To fix my above problem I stopped the vncserver service, went to my /tmp/.X11-unit/ directory and deleted all files from there (X0-X6)

I now try to start vncserver but I get the error below. I can successfully start it with parameters "-nolisten tcp -localhost", but when I try to connect from Windows7 with my VNC client then it just gives a black screen.

"WARNING: The first attempt to start Xvnc failed, possibly because the font catalog is not properly configured. Attempting to determine an appropriate font path for this system and restart Xvnc using that font path ... Could not start Xvnc.

_XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed _XSERVTransMakeAllCOTSServerListeners: server already running Warning: Xalloc: requesting unpleasantly large amount of memory: 0 bytes.

Fatal server error: Cannot establish any listening sockets - Make sure an X server isn't already running _XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed _XSERVTransMakeAllCOTSServerListeners: server already running Warning: Xalloc: requesting unpleasantly large amount of memory: 0 bytes.

Fatal server error: Cannot establish any listening sockets - Make sure an X server isn't already running"

Any ideas on how to fix this? :) I already re-installed vncserver again, and used "ps -ef | grep vnc" to check that no other vnc services were running.


Solution

  • You can remove those sockets and locks if their session (or owner) is no longer present, normally they have a valid user, deleted users might have leftovers (ls -l will show a uid instead of a name)

    It seems there is an iteration over numbered candidates for the DISPLAY variable at play.

    Also verify presence of this rpm: xorg-x11-fonts-misc https://bugzilla.redhat.com/show_bug.cgi?id=498507