wget not resolving domain names

Cameron Beattie kjcsb at orcon.net.nz
Tue Nov 1 18:45:48 UTC 2005


> Cameron Beattie wrote:
>>
>>> Cameron Beattie wrote:
>>>
>>>> I have the following issue where wget won't resolve a domain name the 
>>>> first time I try it. It will only resolve the name once I do an 
>>>> nslookup.
>>>>
>>>
>>> Please post the output of:
>>>
>>> $ grep hosts /etc/nsswitch.conf
>>
>>
>> #hosts:     db files nisplus nis dns
>> hosts:      files dns
>
> That looks OK.
>
>>> Is the nameserver at 192.168.0.253 reliable?
>>>
>>> Try looking up an IP address that you haven't tried recently and see if 
>>> it returns the same results every time, e.g.
>>
>>
>> The results are different the second time, see below:
>>
>>>
>>> $ dig @192.168.0.253 www.uit.no
>>
>>
>> ; <<>> DiG 9.2.5 <<>> @192.168.0.253 www.uit.no
>> ; (1 server found)
>> ;; global options:  printcmd
>> ;; Got answer:
>> ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 44895
>> ;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 3, ADDITIONAL: 3
>>
>> ;; QUESTION SECTION:
>> ;www.uit.no.                    IN      A
>>
>> ;; ANSWER SECTION:
>> www.uit.no.             86400   IN      CNAME   w3s2.uit.no.
>> w3s2.uit.no.            86400   IN      A       129.242.5.89
>>
>> ;; AUTHORITY SECTION:
>> uit.no.                 56830   IN      NS      benoni.uit.no.
>> uit.no.                 56830   IN      NS      nac.no.
>> uit.no.                 56830   IN      NS      lozen.uit.no.
>>
>> ;; ADDITIONAL SECTION:
>> nac.no.                 67455   IN      A       129.240.2.40
>> lozen.uit.no.           71859   IN      A       129.242.5.254
>> benoni.uit.no.          56830   IN      A       129.242.4.254
>>
>> ;; Query time: 768 msec
>> ;; SERVER: 192.168.0.253#53(192.168.0.253)
>> ;; WHEN: Tue Nov  1 18:31:07 2005
>> ;; MSG SIZE  rcvd: 170
>>
>>> $ dig @192.168.0.253 www.uit.no
>>
>> ; <<>> DiG 9.2.5 <<>> @192.168.0.253 www.uit.no
>> ; (1 server found)
>> ;; global options:  printcmd
>> ;; Got answer:
>> ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 39902
>> ;; flags: qr rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
>>
>> ;; QUESTION SECTION:
>> ;www.uit.no.                    IN      A
>>
>> ;; ANSWER SECTION:
>> www.uit.no.             10000   IN      A       129.242.5.89
>>
>> ;; Query time: 4 msec
>> ;; SERVER: 192.168.0.253#53(192.168.0.253)
>> ;; WHEN: Tue Nov  1 18:31:51 2005
>> ;; MSG SIZE  rcvd: 44
>
> Hmm, that's interesting. Your nameserver appears to be returning bad data, 
> though curiously the first answer was the right one in this case.
>
> I wonder if this is a problem with a caching service such as nscd? You 
> could possibly try restarting nscd if you're using that.

service nscd status
nscd is stopped

I'm not really familiar with caching services so I'll read up a bit more 
about them. Maybe there's one running that I don't know about. Or maybe I 
should be running one and I'm not.
>
> Is 192.168.0.253 your machine, or some other machine on the network?
>
192.168.0.253 is a D-Link ADSL router. I'll have a look for a firmware 
upgrade just in case. I have another similarly configured Linux machine 
which doesn't have these problems.

Thanks

Cameron 




More information about the fedora-list mailing list