vncviewer unable to connect to host: A socket operation was attempted to an unreachable host. (10065) 

Joined:
04/07/2009
Posts:
21

February 07, 2010 23:33:23    Last update: February 08, 2010 03:04:47
I installed vncserver on my Fedora box and tried to connect to it with vncviewer from Windows XP. I got this error:



What could be the problem? These were the steps I took to diagnose it. I just list them here as a reminder.
  1. Is Windows firewall blocking the connection?
    No. It turned out that, unlike ZoneAlarm, the Windows firewall does not block outgoing traffic. It only blocks incoming requests.

  2. Is vncserver listening on the right IP address?
    Yes. netstat showed it's listening on all NICs.
    netstat -a | grep 5901
    tcp       0       0 *:5901         *:*            LISTEN
    

  3. Is VNC port open on the local Fedora box on that IP address?
    Yes, telnet successfully connected:
    [jim@fedora ~] telnet 172.30.33.9 5901
    Trying 172.30.33.9...
    Connected to 172.30.33.9 (172.30.33.9).
    Escape character is '^]'.
    RFB 003.008
    ^]
    
    telnet> quit
    

  4. What does telnet say from the remote XP box?
    C:\> C:\cygwin\bin\telnet fedora 5901
    Trying 172.30.33.9...
    telnet: Unable to connect to remote host: No route to host
    

  5. Is there a route to the destination host?
    Yes. Both computers reside in the same subnet, tracert showed direct access to the Fedora box.
    C:\>tracert fedora
    
    Tracing route to fedora [172.30.33.9]
    over a maximum of 30 hops:
    
      1     1 ms     1 ms     1 ms  fedora [172.30.33.9]
    
    Trace complete.
    


So?

Long story short, it turned out that I had firewall running on the Fedora box, which I completely forgot about!
[ Comment  | Tags ]