Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
wget name resolution fails, ping and other connections work.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
barfo
Apprentice
Apprentice


Joined: 04 Mar 2006
Posts: 163

PostPosted: Sun Jan 24, 2010 9:24 pm    Post subject: wget name resolution fails, ping and other connections work. Reply with quote

hi all. so i was emerging world and after getting the latest udev i see an error about the x264 package:
Code:
>>> Emerging (1 of 1) media-libs/x264-0.0.20091021
>>> Downloading 'http://distfiles.gentoo.org/distfiles/x264-snapshot-20091021-2245.tar.bz2'
--2010-01-24 15:00:29--  http://distfiles.gentoo.org/distfiles/x264-snapshot-20091021-2245.tar.bz2
Resolving distfiles.gentoo.org... failed: Temporary failure in name resolution.
wget: unable to resolve host address `distfiles.gentoo.org'


so i scratched my head a bit and wondered... then tried:
Code:
[ root@mrblack  3:18PM ]~$ ping distfiles.gentoo.org
PING distfiles.gentoo.org (149.20.20.135) 56(84) bytes of data.
64 bytes from mirrors1.kernel.org (149.20.20.135): icmp_seq=1 ttl=57 time=63.9 ms
64 bytes from mirrors1.kernel.org (149.20.20.135): icmp_seq=2 ttl=57 time=63.4 ms
^C
--- distfiles.gentoo.org ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3002ms
rtt min/avg/max/mdev = 62.930/63.451/63.927/0.353 ms
[ root@mrblack  3:20PM ]~$


now i try running wget again...

Code:
[ root@mrblack  3:20PM ]~$ wget http://distfiles.gentoo.org/distfiles/x264-snapshot-20091021-2245.tar.bz2
--2010-01-24 15:21:39--  http://distfiles.gentoo.org/distfiles/x264-snapshot-20091021-2245.tar.bz2
Resolving distfiles.gentoo.org... failed: Temporary failure in name resolution.
wget: unable to resolve host address `distfiles.gentoo.org'
[ root@mrblack  3:21PM ]~$


relevant info:
Code:
[ root@mrblack  3:21PM ]~$ cat /etc/resolv.conf
# Generated by dhcpcd from eth0
# /etc/resolv.conf.head can replace this line
search pwhitt
nameserver 10.0.0.1
# /etc/resolv.conf.tail can replace this line
[ root@mrblack  3:22PM ]~$


where 10.0.0.1 is my router. i re-ran /etc/init.d/net.eth0 and all is the same after seeing no errors.

obviously firefox and all are working. i tried setting the nameserver in my resolv.conf from 10.0.0.1 directly to my ISP's nameserver addy and that didn't work - it actually broke ping, firefox et al.

so what does this mean???

thanks for any info!

--- edit ---

so after posting this i tried manually adding the IP addys for distfiles.gentoo.org and mirrors.gentoo.org to /etc/hosts and now wget works. but if i remove those lines... back to broken.

i should also point out that according to another similar problem i found elsewhere online i tried an `env-update` and `source etc/profile` with no changes observed. i've restarted net.th0 several times now too...
Back to top
View user's profile Send private message
truc
Advocate
Advocate


Joined: 25 Jul 2005
Posts: 3199

PostPosted: Mon Jan 25, 2010 8:09 am    Post subject: Reply with quote

Just out of curiosity, could you use tcpdump, and see if there are dns queries when using wget?
_________________
The End of the Internet!


Last edited by truc on Mon Jan 25, 2010 2:35 pm; edited 1 time in total
Back to top
View user's profile Send private message
barfo
Apprentice
Apprentice


Joined: 04 Mar 2006
Posts: 163

PostPosted: Mon Jan 25, 2010 12:39 pm    Post subject: Reply with quote

well - it seems that for whatever reason i now have to use `wget -4` in order to force the use of ipv4.

i'm not sure when that borked or how it's related to my update yesterday... but it would have been nice to see a message somewhere near the end of portage's error when the emerge ended.

i still haven't taken the entry out of my hosts file, but wget now works if i use -4. i'll check it later.
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Mon Jan 25, 2010 2:08 pm    Post subject: Reply with quote

Do you use iptables on your box ?
Back to top
View user's profile Send private message
barfo
Apprentice
Apprentice


Joined: 04 Mar 2006
Posts: 163

PostPosted: Mon Jan 25, 2010 2:59 pm    Post subject: Reply with quote

nope - no iptables.

it seems that at some point while updating, the default for wget went from ipv4 to ipv6.

i haven't tried it yet, but i suspect that by adding an entry to define FETCHCOMMAND as wget with the -4 argument, it'll work.

I'll check it out this evening and will post the results...
Back to top
View user's profile Send private message
guldan
Tux's lil' helper
Tux's lil' helper


Joined: 24 May 2004
Posts: 81

PostPosted: Wed Feb 17, 2010 3:14 pm    Post subject: Reply with quote

Could this help, wget might behave the same way as ssh ?

https://forums.gentoo.org/viewtopic-t-810843-highlight-nameserver+resolve+conf.html
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum