Bug 730533 - yum/curl/wget curl#6 - "Couldn't resolve host" error with DNS server that doesn't support ipv6
Summary: yum/curl/wget curl#6 - "Couldn't resolve host" error with DNS server that doe...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: yum
Version: 15
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Seth Vidal
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-08-14 08:01 UTC by Koen
Modified: 2014-01-21 23:19 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-08-17 06:54:40 UTC


Attachments (Terms of Use)
as requested : debug output of yum (233.77 KB, text/plain)
2011-08-15 20:46 UTC, Koen
no flags Details

Description Koen 2011-08-14 08:01:37 UTC
Description of problem:


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. My home network works with a (legacy) Speedtouch Home/professional router with built in DNS. No ipv6 support.  The DNS looks up local machine and then forwards to an external DNS of my ISP.
2. Fresh install of Fedora 15. Disable ipv6 (/etc/modprobe.d/dist.conf; Firefox/Thunderbird about:config network.dns.disableIPv6 true; /etc/sysconfig/network-scripts; chkconfig ip6tables off)
3.When using de internal (ipv4) DNS all seems to work (Firefox, Thunderbird, ping, nslookup, ...) except yum/wget/curl.  Using a mirror address with wget en explicitly giving the "-4" option works however (which lead me to believe it's a ipv6 DNS problem).
Switching to an external (ipv6) DNS (such as 8.8.8.8) works for all packages, but obviously prevent lookup of local machines.
  
Actual results:
curl#6 - "Couldn't resolve host"

Expected results:
update of yum packages

Additional info:
Found related bugs 548269 and 548396, but seems to be different because I want my internal network on ipv4 (due to legacy).

Comment 1 Zdeněk Pavlas 2011-08-15 14:19:18 UTC
Hi, thanks for the report!  Yum does not support -4 and -6 in yum.conf.
However, you could manually change the urlgrabber's defaults.

/usr/lib/python2.7/site-packages/urlgrabber/grabber.py
-       self.ip_resolve = None
+       self.ip_resolve = 'ipv4'

But there's something wrong in your setup, as curl should not exit with ERR#6, but fall back IPv4 "A" records.  Could you run

# export URLGRABBER_DEBUG=1,debug.txt
# yum update

and attach the debug file?

Comment 2 Koen 2011-08-15 20:46:50 UTC
Created attachment 518339 [details]
as requested : debug output of yum

As requested, herewith the output of de debug.txt

Comment 3 Koen 2011-08-15 20:54:30 UTC
(In reply to comment #2)
> Created attachment 518339 [details]
> as requested : debug output of yum
> 
> As requested, herewith the output of de debug.txt

Thank you very much for your quick reply.  The trick in /usr/lib/python2.7/site-packages/urlgrabber/grabber.py does indeed solve the initial problem.  I have no idea why curl exits with ERR#6.  If it is of any help, I could attach the new debug file ?

Comment 4 Zdeněk Pavlas 2011-08-17 06:54:40 UTC
The upstream yum now supports 'ip_resolve' option in yum.conf, so just set 'ip_resolve = ipv4' there.  Fixed in upstream, closing.


Note You need to log in before you can comment on or make changes to this bug.