0

i have this problem connection:

Unable to complete network request to host "xx.xxx.xx.xxx". Failed to establish a connection. No route to host could not connect to DB

can you tell me how to resolve this? i'm using linux and try to make some connection to another PC. any advance will be appreciate.

klox
  • 197
  • 1
  • 2
  • 7

3 Answers3

1

First, start by trying to ping the device. "No Route to Host" can be deceiving, as a port blocked by a firewall (iptables on Linux) on the remote box could be blocking your connection attempt in such a way that it looks like there's no route to host.

From a command line, type ping 192.168.2.3 (replacing that with the IP address of the box you're trying to connect to). If you get a successful ping response, then the network layer is working, and you can work your way up the stack. The next thing I would do is try telneting to the port on the remote box, and seeing what error, if any, I get there. From a command line, you can type telnet 192.168.2.3 1234, replacing the IP and port, respectively, with their values for your environment. If the telnet command succeeds, then you've established a valid network connection, and the problem is at the application layer. If the telnet command fails, then my experience suggests the problem is probably with a firewall blocking the traffic.

If you get an error or ping failure there, then you can concentrate at the network layer. Either the device is not routable, or your source host doesn't have the right routes added, or there is a firewall that is blocking the traffic.

This is also where packet sniffer software, such as the tcpdump or tshark/wireshark (both are frequently included on Linux) can be useful, too. Monitoring the actual network packets as you attempt the connection can tell you whether you are sending packets into a blackhole, or if something is responding telling you that there is a network/route problem, and if so, what is responding in that way?

Christopher Cashell
  • 9,128
  • 2
  • 32
  • 44
0

to start with: there is no route to the desination.

do a "netstat -rn" and "ifconfig" first I would suggest and paste the output

tw79
  • 31
  • 1
  • 4
0

In general terms, check that you've configured the correct IP(s), as and where you need to configure IPs. Similarly for hostnames.

The specific error just means there's no route from A to B. This could be an issue somewhere between A and B or it could be that you actually meant to specify C instead of B.

Vatine
  • 5,440
  • 25
  • 24
  • i'm use the correct IP, but the problem is the administrator just give me a phisycal file location. is there any way to search file location(path) use linux terminal? – klox Nov 10 '10 at 02:16
  • That Depends... What's the other end running? What protocol are you using? If it's HTTP, what you can or cannot search for depends on the installed web server. If it's Windows file-sharing, you'll need to look into the Samba suite. But, the error message you're getting looks to be network-related, so that needs to be resolved. It could just be an error message indicating that whatever you're expecting to be running on the remote end isn't. – Vatine Nov 10 '10 at 14:47