tags:

views:

49

answers:

3

I am dealing with a server on which curl/wget/links/lynx cannot load any sites which are hosted on the server itself. External sites can be loaded/fetched etc just fine.

I want to know the terms I should be using to express this to the sysadmins who insist there is no problem.

Thanks!

David

+2  A: 

If you are talking about looking up host names the term you are looking for might be 'to resolve a hostname'.

davrieb
A: 

tell them they need to check the resolver configuration (resolv.conf) on the server and make sure it can resolve to local sites as well

Sabeen Malik
+1  A: 

What is the result of the curl command? Does DNS resolution fail? Does it time out? Does it return a 4xx or 5xx? Do you have the 'http_proxy' environment variable set? (if so, this would make curl+wget+friends proxy your requests through some other server, and -that- server might be unavailable).

I'd suggest having one of the sysadmins try the curl themselves (use 'curl -v' since this will include additional HTTP-level diagnostics); if they can replicate the problem then they can probably help figure out why it's happening. Cut + paste the commands you're typing and the result you see & send them the results, and ask them to do the same back to you.

There may be legitimate reasons that this doesn't work:

  • The public IP addresses of the sites may not be routeable from the machine itself. This can happen with some methods of load balancing. There are solutions to this but they usually require routing + topology changes, configuring the load balancer to proxy connections, or doing split DNS.

  • The server or a firewall in front of the server may not be configured to allow outbound TCP connections to port 80. This would be rare for a $5.95/mo webhost but not unheard of in a more restrictive/security-conscious environment.

Some things to try:

  • Does DNS resolution work locally? From the server itself, try 'host ' and 'ping ' then try these commands on a machine that can hit your site. (you can use ^C to stop the ping)

If they resolve to different IP addresses, or they don't resolve at all from the server, then ask the admins why :-) There can be legitimate reasons for differing IPs (DNS based load balancing, or split DNS) -- the admins should be able to tell you why this is.

  • Assuming DNS agrees on what your site is named, what does 'curl -v http://yoursite.com' say when you run it from the server itself? If it times out, then it may be due to load balancer or firewall issue. If it says "connection refused" then it may be due to a firewall issue. If you get a 4xx or 5xx response, then you're definitely hitting a server; the response might help track down where the problem is.
jwa
Thanks for your very thorough and helpful response jwa!! When The Planet got paid to migrate the dedicated server from one box on their network to another box on their network we really never expected to have to play detective after like this!Soping: unknown host http://mysite.comHost http://mysite.com not found: 3(NXDOMAIN)curl -v http://mysite.com* About to connect() to mysite.com port 80 (#0)* Trying 209.xx.xx.xxx... The IP is the same as the old server. Have gone back to support with this.Thanks very much for your help!David
jerrygarciuh