Saturday, November 1, 2008

A socket operation was attempted to an unreachable host

Problem:

After joining a newly loaded domain, I received the following error when trying to use Remote Desktop: "A socket operation was attempted to an unreachable host"


Cause:

After playing around I found that my routing entries did not have a gateway added. This was because I had recently loaded a Windows Server 2003 Domain Controller and had just setup DHCP.


Solution:

Add a gateway.


I did it manually, though I wouldn't recommend it. In this case, I was loading a temporary network on a 192.168.3.x network where my router was 192.168.3.1 and my domain controller was 192.168.3.5.

When I ran (from the command prompt) : c:\route print

I noticed no line existed for 0.0.0.0 (no gateway). So I added the router as a gateway as follows:

c:\route add 0.0.0.0 mask 0.0.0.0 192.168.3.1

This is, however, a temporary route and will be removed when the machine reboots. I could have used the '-P' flag to make it permanent, but in this case, this was all temporary.

I should add, that I also got an error TFS Error TF50621 which also had to do with me messing around with the domain controller.

The problem was that I started with one IP Address, 192.168.1.X and setup the domain controller. Then I changed the IP to 192.168.3.X and I got the error mentioned above.

The fix was to go in to the Domain Controller, goto DHCP settings, and add 192.168.3.x to the Reverse Lookup Zones.

No comments: