No route to host

10 posts / 0 new
Last post
#1 Thu, 02/11/2010 - 18:54
MitchEssex

No route to host

Hi,

I have a small site that has a simple search script on it from a site called sphider http://www.sphider.eu/ This site had this script on when it was hosted on a previous server and it was able to crawl the site.

When I try to crawl the site now I get a No route to host error in the script.

If I try to wget the home page of the site on the host server I get

[root@host1 tmp]# wget http://sitename.au --2010-02-12 11:25:09-- http://sitename.au/ Resolving sitename.au... 203.xx.xx.xx Connecting to sitename.au|203.xx.xx.xx|:80... failed: Connection timed out.

However if I try from another server

[root@host2 tmp]# wget http://sitename.au --2010-02-12 11:38:04-- http://sitename.au/ Resolving sitename.au... 203.xx.xx.xx Connecting to sitename.au|203.xx.xx.xx|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 16473 (16K) [text/html] Saving to: `index.html'

100%[======================================>] 16,473 --.-K/s in 0.1s

2010-02-12 11:38:05 (121 KB/s) - `index.html' saved [16473/16473]

So I gather there is something wrong in local dns settings

localhost 127.0.0.1 is in the Hostname and DNS Client

DNS settings have the localhost.sitename.au 127.0.0.1

The host addresses doesn't contain the specific domain name but has localhost would this be the cause.

Mitch

Thu, 02/11/2010 - 19:14
andreychek

Well, what I'd do is try to figure out if your server is resolving "sitename.au" to the correct IP address.

When you type "host sitename.au", does the IP address it gives you point to the server you'd expect it to?

Also, is your server by chance running behind a NAT router?

-Eric

Thu, 02/11/2010 - 19:40 (Reply to #2)
MitchEssex

Hi Eric,

Yes the site is resolving properly from outside which is why I am able to wget the home page from a different server.

Yes the IP address is correct

I think the site maybe NAT'd

The server is remote so I can't hop on and try to open the home page of the site from that machine

Mitch

Thu, 02/11/2010 - 22:37 (Reply to #3)
andreychek

You may want to check if that IP address is the address on the server itself, or for a NAT router in front of the server.

If your server is using an internal LAN IP address, you may need to access it by the internal IP rather than the external IP.

-Eric

Mon, 12/02/2013 - 07:34
vijayr

I have this same issue. I am trying to download a file from another website of mine which is in different VPS. I get the same error above. But when i try to download it from my home computer, it works fine.

How do i rectify this?

Error:

[user@server ~]$ wget http://example.com/file.zip --2013-12-02 11:13:52-- http://example.com/file.zip Resolving example.com... 2xx.xxx.xxx.xx Connecting to example.com|2xx.xxx.xxx.xx|:80... failed: Connection timed out.

**/etc/resolv.conf

nameserver 8.8.8.8 nameserver 8.8.4.4 nameserver 127.0.0.1

Mon, 12/02/2013 - 07:52
Locutus

@vijayr: Can you resolve the hostname on the erroneous server? dig hostname.domain.tld Can you ping the hostname and/or the IP address?

Mon, 12/02/2013 - 08:20
vijayr

Hi @Locutus,

EDIT: I am unable to ping the website, when trying to ping it just stops there. But dig is working. i replaced the original domain with example.com

[user@server ~]# dig ns1.example.com

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.17.rc1.el6_4.6 <<>> ns1.example.com ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 8728 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION: ;ns1.example.com. IN A

;; ANSWER SECTION: ns1.example.com. 21600 IN A 2xx.xxx.xx.xx

;; Query time: 136 msec ;; SERVER: 8.8.8.8#53(8.8.8.8) ;; WHEN: Mon Dec 2 16:55:39 2013 ;; MSG SIZE rcvd: 52

Mon, 12/02/2013 - 09:16
Locutus

Try mtr 2xx.xxx.xx.xx to see if there's an intermittent network issue. Otherwise I'd need to know the exact domain names and IP address in question to venture a guess.

Tue, 12/03/2013 - 14:20
vijayr

I raised a ticket with my host and they said, there is an issue with routing with my IP and they are working on it. It is only happening withing their VPS network. I am able to ping and download from my VPS Server from outside.

Thank you for your time in helping out. :)

Tue, 12/03/2013 - 15:43
Locutus

You're welcome! Indeed, not all problems are the admin's fault, sometimes it's the hoster who made a boo-boo. :)

Topic locked