title: vnc-server installed and running but not visible over the network
body: <p>Unable to connect on LAN using VNCViewer to a TigerVNC-Server on Centos</p>
  
  <p>My Centos 6 installation of Vino or more accurately tigervnc-server is set up and starts successfully as defined by the procedure here:</p>
  
  <p><a href="http://wiki.centos.org/HowTos/VNC-Server" rel="nofollow">http://wiki.centos.org/HowTos/VNC-Server</a></p>
  
  <p>I am however unable to connect to the server using the vnc-client on a W7 machine or using a java enabled browser.</p>
  
  <p>I have configured a user, namely '1:mark'</p>
  
  <p>After running "ss -l" to determine the port (thanks to arcyqwerty for the netstat suggestion), I determined the correct port is  5901 or 5902.</p>
  
  <p>ss -l output</p>
  
  <pre><code>State      Recv-Q Send-Q     Local Address:Port       Peer Address:Port   
  LISTEN     0      50                     *:mysql                 *:*       
  LISTEN     0      5                     :::vnc-server           :::*       
  LISTEN     0      5                      *:5901                  *:*       
  LISTEN     0      128                   :::41485                :::*       
  LISTEN     0      5                     :::5902                 :::*
  </code></pre>
  
  <p>Below is the output of my /home/mark/.vnc/log after service start</p>
  
  <pre><code>Thu Dec  5 12:09:58 2013
  vncext:      VNC extension running!
  vncext:      Listening for VNC connections on all interface(s), port 5901
  vncext:      created VNC server for screen 0
  GNOME_KEYRING_SOCKET=/tmp/keyring-icjZAi/socket
  SSH_AUTH_SOCK=/tmp/keyring-icjZAi/socket.ssh
  GNOME_KEYRING_PID=7644
  Failed to play sound: File or data not found
  An instance of nm-applet is already running.
  ** Message: adding killswitch idx 2 state KILLSWITCH_STATE_SOFT_BLOCKED
  ** Message: killswitch 2 is KILLSWITCH_STATE_SOFT_BLOCKED
  ** Message: killswitches state KILLSWITCH_STATE_SOFT_BLOCKED
  05/12/2013 12:10:02 PM Autoprobing TCP port in (all) network interface
  05/12/2013 12:10:02 PM Listening IPv{4,6}://*:5900
  05/12/2013 12:10:02 PM Listening IPv4://0.0.0.0:5900
  05/12/2013 12:10:02 PM Problems in NewSocketListenTCP(), sock=-1
  05/12/2013 12:10:02 PM Listening IPv{4,6}://*:5901
  05/12/2013 12:10:02 PM Listening IPv4://0.0.0.0:5901
  05/12/2013 12:10:02 PM Problems in NewSocketListenTCP(), sock=-1
  05/12/2013 12:10:02 PM Listening IPv{4,6}://*:5902
  05/12/2013 12:10:02 PM Autoprobing selected port 5902
  05/12/2013 12:10:02 PM Advertising authentication type: 'VNC Authentication' (2)
  05/12/2013 12:10:02 PM Advertising security type: 'VNC Authentication' (2)
  ** Message: killswitch 2 is KILLSWITCH_STATE_SOFT_BLOCKED
  ** Message: killswitches state KILLSWITCH_STATE_SOFT_BLOCKED
  
  (polkit-gnome-authentication-agent-1:7711): GLib-GObject-WARNING **: cannot register     
  existing type `_PolkitError'
  
  (polkit-gnome-authentication-agent-1:7711): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0' failed
  Initializing nautilus-gdu extension
  Initializing nautilus-open-terminal extension
  (null):  Warning no default label for /home/mark/.gvfs`
  </code></pre>
  
  <p>My /etc/sysconfig/vncservers contains</p>
  
  <pre><code>VNCSERVERS="1:mark"
  VNCSERVERARGS[1]="-geometry 800x600"
  </code></pre>
  
  <p>However from the netstat it appears that ports 5900, 5901 and 5902 are involved.
  Here are the results of my tests:</p>
  
  <ol>
  <li>browsed on the host using 'localhost:5900' Result: RFB 003.007</li>
  <li>browsed on the host using 'localhost:5901' Result: RFB 003.008. (note: user:mark) </li>
  <li>browsed on the host using 'localhost:5902' Result: RFB 003.007</li>
  <li>VNC'd on the host using 'localhost:5901' Result: worked.</li>
  </ol>
  
  <p>Note: From <a href="http://www.realvnc.com/docs/rfbproto.pdf" rel="nofollow">http://www.realvnc.com/docs/rfbproto.pdf</a> RFB represents the Remote Frame Buffer required protocol version numbers.</p>
  
  <p>I tried 1,2,3 and 4 from above substituting localhost:port for the 'hosts ip':port on a network client machine and all timed-out.</p>
  
  <p>The following extra steps have been taken</p>
  
  <ul>
  <li>Turned off the firewall</li>
  <li>Temporarily disabled SeLinux</li>
  <li>Successfully pinged host from client on LAN.</li>
  </ul>
  
  <p>I am also successfully running a visible httpd service from the offending host </p>
  
  <p>Any pointers would be appreciated.</p>