Jump to content
  • Announcements

    • spinynorman

      Mandriva Official Documentation

      Official documentation for extant versions of Mandriva can be found at doc.mandriva.com.   Documentation for the latest release may take some time to appear there. You can install all the manuals from the main repository if you have Mandriva installed - files are prefixed mandriva-doc.
    • paul

      Forum software upgrade   10/29/17

      So you may have noticed the forum software has upgraded !!!
      A few things that have changed. We no longer have community blogs (was never really used) We no longer have a portal page.
      We can discuss this, and decide whether it is needed (It costs money) See this thread: Here
Sign in to follow this  
Penguin Geek

wget resolve host address issue? [solved]

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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×