Jump to content

wget resolve host address issue? [solved]


Penguin Geek
 Share

Recommended Posts

I'm pretty smart when it comes to networking, and DNS. But I can't figure this one out. Why is it my machine has issues resolving addresses with wget, but everything else works fine?

 

[jbess@Scooter ~]$ wget www.google.com
--2009-12-22 14:02:47--  http://www.google.com/
Resolving www.google.com... failed: Name or service not known.
wget: unable to resolve host address “www.google.comâ€

[jbess@Scooter ~]$ host www.google.com
www.google.com is an alias for www.l.google.com.
www.l.google.com has address 74.125.65.99
www.l.google.com has address 74.125.65.105
www.l.google.com has address 74.125.65.103
www.l.google.com has address 74.125.65.106
www.l.google.com has address 74.125.65.147
www.l.google.com has address 74.125.65.104

[jbess@Scooter ~]$ wget 74.125.65.99
--2009-12-22 14:05:04--  http://74.125.65.99/
Connecting to 74.125.65.99:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: “index.html.1â€

   [ <=>                                   ] 5,418       --.-K/s   in 0.03s

2009-12-22 14:05:04 (201 KB/s) - “index.html.1†saved [5418]

 

I've tried wget with the --no-proxy (I'm not using a proxy though), --no-dns-cache, and nothing works. Any ideas? I am running wget version 1.12 on Mandriva 2010. Here is my /etc/resolv.conf:

 

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 10.0.0.1

Edited by Penguin Geek
Link to comment
Share on other sites

So, you are using NAT?

What nameservers are assigned to your router?

 

Yes it's NAT'd. I have two Qwest nameservers. I put those in my local box, and it works. So it looks like my router doesn't like wget. The router config hasn't changed, and I have another Mandriva box (2009 Spring) on the network that wget works just fine.

 

I dug a bit deeper, and found a resolution on http://serverfault.com/questions/76421/wget-cant-resolve-host. Basically, the /etc/nsswitch.conf file needed the host line reconfigured to:

 

hosts:           files dns mdns4_minimal [NOTFOUND=return] mdns4

I had to do a "sudo service network restart" for it to take effect, but I'm back to normal.

Edited by Penguin Geek
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...