# name resolution, OK except for wget

## another_lobster

Hello,

I've just installed Gentoo 2006.1 in a VMWare virtual machine. Everithing seems OK except for the name resolution in wget.

If I ping www.gentoo.org I get a good reply, the name is resolved, the IP is shown and replies from gentoo.org are there as you would expect.

If I make a "wget www.gentoo.org" after a few seconds I get an error message saying "temporary failure in name resolution".

Any idea?

Bye,

Lobster

----------

## tam

Check your /etc/wgetrc or ~/.wgetrc, maybe there is a wrong proxy or something like that.

----------

## another_lobster

 *tam wrote:*   

> Check your /etc/wgetrc or ~/.wgetrc, maybe there is a wrong proxy or something like that.

 

I don't have neither /etc/wgetrc nor ~/.wgetrc, I only have /etc/wget/wgetrc with all lines commented except

```

passive_ftp = on

waitretry = 10
```

I also tried to change the first one to 'off' but nothing changed.

Bye,

Lobster

----------

## bunder

how is the vmware host?  if the host lags too much it could potientally have problems with the virtual networks.  just a thought   :Wink: 

----------

## another_lobster

 *bunder wrote:*   

> how is the vmware host?

 

It's fine, thank you!

Amilo Laptop (Fujitsu-Siemens), 1 GB RAM (512 MB for the VM), CPU "x86 Family 15 Model 76 Stepping 2 AuthenticAMD ~1595 Mhz". I've never noticed any delay in the host PC.

Maybe I should install wget in WinXP also and see what happens...

Bye,

Max

----------

## another_lobster

Things are getting worse... I realized that also emerge has problems in name resolution.

I tried to emerge gpm and it stuck on "Resolving www.die.unipd.it" (one of the gentoo mirrors), after some seconds it said "failed: Temporary Failure in name resolution". All other mirrors failed with the same error.

If I ping www.die.unipd.it I everything works, I get their IP: 146.162.218.5

What could be wrong?

Bye,

Lobster

----------

## Aurisor

Try disabling wget's dns cache.

wget http://www.whatever.com/ --no-dns-cache -v

----------

## another_lobster

 *Aurisor wrote:*   

> Try disabling wget's dns cache.
> 
> wget http://www.whatever.com/ --no-dns-cache -v

 

I'v just tried with

wget http://www.google.com/ --no-dns-cache -v

Exactly the same thing... it hangs for some seconds and then it says "Temporary failure in name resolution". If I ping to the same domain I get the correct IP, 72.14.207.99.

This is getting a huge problem as I'm completely stuck, I can suffer living without wget but using Gentoo without emerge is quite impossibile.

Bye,

Lobster

----------

## another_lobster

I modified the /etc/resolv.conf from

nameserver 192.168.1.254

to

nameserver 208.67.222.222

nameserver 208.67.220.220

I can't understand why but if I use my router as a nameserver ping work but wget and emerge doesn't, if I use nameserver provided by OpenDNS (http://www.opendns.com) everything seems to work properly.

If anyone can help to understand I'd really appreciate it.

Bye,

Lobster

----------

## roadrunner_gs

Here to:

If I have my DSL-router in the resolv.conf than everything (emerge, wget, internet-browsing) works only if pinged before.

If I replace the IP of my router with the one of my DSL-Provider everything works even without being pinged.

Weird thing...   :Rolling Eyes: 

----------

## uprooter

This issue is old but ... damn! im getting exactly this error.

wget is working manually but not from emerge.

???

----------

## thecooptoo

im getting a similar problem with just one linux client behind a hardware router/firewall. /etc/resolv.conf is the same in the clients that work and the ones that dont. no idea why or how to try and fix it

----------

## uprooter

What i was trying to do is to preserve etc from an old installation. so after extracting the stage3 i replaced /etc with the old one.

Maybe this is what causes problems. permissions problems with portage or other inconsistency.

Since it was a new installation i simply reinstalled without copying the old /etc and it fixed the problem.

hope it helps someone.

----------

## d2_racing

First time that I see this one actually.

It's a weird dns problem.

----------

## krinn

Glibc could do that (a bad glibc or a buggy version), take more care of your TC to not face strangeness

----------

## linuxbruiser

Changing my nameserver to this DNS worked great for me. Just some FYI, Google's DNS 8.8.8.8 and 8.8.4.4 did not work for me as far as 

```
#emerge gentoo-source
```

for some reason it just wouldn't resolve.  :Confused:   Anyways thank you again.

----------

## fugue88

 *uprooter wrote:*   

> This issue is old but ... damn! im getting exactly this error.
> 
> wget is working manually but not from emerge.
> 
> ???

 

I just had this problem.  I had setup a chroot based on a stage3.  I copied the host's /etc/resolv.conf over, but my root user had a bad umask, so the resolv.conf as it landed in the chroot wasn't o=r.

This meant that root user could ping or wget just fine, but portage user (which emerge runs as) could not.

chmod 644 fixed the perms, and wget-from-emerge started working.

----------

