Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

A socket operation was attempted to an unreachable host

One customer reported this error at my WCF client connecting to our server service.

"Message: A socket operation was attempted to an unreachable host Type : System.Net.Sockets.SocketException"

From this link http://msdn.microsoft.com/en-us/library/ms740668%28v=vs.85%29.aspx i see:

WSAEHOSTUNREACH 10065 No route to host. A socket operation was attempted to an unreachable host. See WSAENETUNREACH.

WSAENETUNREACH 10051 Network is unreachable. A socket operation was attempted to an unreachable network. This usually means the local software knows no route to reach the remote host.

Is this a network error on customer network? Is it something we can advise customer to do?

WCF Client was able to connect to the server service before and seems that problem disappeared after reboot of machine (or maybe network problem was fixed in the meantime).

Thank you

Adriana

like image 485
Adrya Avatar asked Mar 02 '11 07:03

Adrya


People also ask

Can't connect socket A socket operation was attempted to an unreachable network?

Getting Error message" A socket operation was attempted to an unreachable network , this usually means the local software knows no route to reach the remot host" when downloading a program. This thread is locked.

What is a socket operation?

Definition: A socket is one endpoint of a two-way communication link between two programs running on the network. A socket is bound to a port number so that the TCP layer can identify the application that data is destined to be sent to. An endpoint is a combination of an IP address and a port number.


2 Answers

This error indicates that the network was not connected or not configured correctly. It is definitely an error on the client machine, not your server.

There isn't much you can do to "solve" the problem. Pretty much all you can do is upgrade the client's network drivers and check for connection problems (maybe they're barely within wireless range, or the Ethernet cable is missing its locking tab).

like image 63
Stephen Cleary Avatar answered Oct 21 '22 08:10

Stephen Cleary


You can help your customers or FAEs to develop an SOP for identifying connectivity issues. Say, pinging the server IP from client machine, do an ipconfig and see if the machine's network adapter is up or not.

like image 29
Peon the Great Avatar answered Oct 21 '22 08:10

Peon the Great