Bug 671133
| Summary: | IPv6 support in httplib.py | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 5 | Reporter: | Jan Hutař <jhutar> | ||||
| Component: | python | Assignee: | Dave Malcolm <dmalcolm> | ||||
| Status: | CLOSED WONTFIX | QA Contact: | BaseOS QE - Apps <qe-baseos-apps> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | low | ||||||
| Version: | 5.5 | CC: | bgollahe, cperry, jpazdziora, katzj, msuchy, mzazrivec | ||||
| Target Milestone: | rc | ||||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2013-03-21 04:36:55 UTC | Type: | --- | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Bug Depends On: | |||||||
| Bug Blocks: | 487666, 790326 | ||||||
| Attachments: |
|
||||||
|
Comment 1
Jan Hutař
2011-01-20 14:08:29 UTC
On RHEL6 this was needed:
# diff -u /usr/lib64/python2.6/socket.py.ORIG /usr/lib64/python2.6/socket.py
--- /usr/lib64/python2.6/socket.py.ORIG 2011-01-25 04:34:27.682089250 -0500
+++ /usr/lib64/python2.6/socket.py 2011-01-25 04:34:48.335090298 -0500
@@ -501,7 +501,7 @@
af, socktype, proto, canonname, sa = res
sock = None
try:
- sock = socket(af, socktype, proto)
+ sock = socket(AF_INET6, socktype, proto)
if timeout is not _GLOBAL_DEFAULT_TIMEOUT:
sock.settimeout(timeout)
sock.connect(sa)
and then I ran into bug 665013.
This request was evaluated by Red Hat Product Management for inclusion in the current release of Red Hat Enterprise Linux. Because the affected component is not scheduled to be updated in the current release, Red Hat is unfortunately unable to address this request at this time. Red Hat invites you to ask your support representative to propose this request, if appropriate and relevant, in the next release of Red Hat Enterprise Linux. Removing from space15 as this is RHEL bugzilla. This request was evaluated by Red Hat Product Management for inclusion in the current release of Red Hat Enterprise Linux. Because the affected component is not scheduled to be updated in the current release, Red Hat is unfortunately unable to address this request at this time. Red Hat invites you to ask your support representative to propose this request, if appropriate and relevant, in the next release of Red Hat Enterprise Linux. Note that it is the same symptom as bug 739625 so I would bet that the real problem is in m2crypto, which is for rhel6 tracked as bug 742914. Do things work when you use http instead of https? Making initial comment private. Public version:
Description of problem:
I'm using httplib.py through xmlrpclib.py to communicate with XMLRPC server
(RHN Satellite in this case) through IPv6-only network. I'm getting a
traceback, although when I add IPv4 address to /etc/hosts, it works as
expected.
Version-Release number of selected component (if applicable):
python-2.4.3-27.el5
How reproducible:
always
Steps to Reproduce:
1. # python
Python 2.4.3 (#1, Jun 11 2009, 14:09:37)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import xmlrpclib
>>> client = xmlrpclib.Server('https://<fqdn>/rpc/api', verbose=0)
>>> key = client.auth.login('admin', 'passwd')
2. I'm on system when server is accessible only through IPv6, no IPv4
# ping <fqdn>
ping: unknown host <fqdn>
3. # ping6 -c 1 <fqdn>
PING <fqdn>(<fqdn>) 56 data bytes
64 bytes from <fqdn>: icmp_seq=0 ttl=64 time=0.213 ms
--- <fqdn> ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.213/0.213/0.213/0.000 ms, pipe 2
Actual results:
Traceback (most recent call last):
File "./manage-ak.py", line 64, in ?
key = client.auth.login(USER, PASS)
File "/usr/lib64/python2.4/xmlrpclib.py", line 1096, in __call__
return self.__send(self.__name, args)
File "/usr/lib64/python2.4/xmlrpclib.py", line 1383, in __request
verbose=self.__verbose
File "/usr/lib64/python2.4/xmlrpclib.py", line 1129, in request
self.send_content(h, request_body)
File "/usr/lib64/python2.4/xmlrpclib.py", line 1243, in send_content
connection.endheaders()
File "/usr/lib64/python2.4/httplib.py", line 804, in endheaders
self._send_output()
File "/usr/lib64/python2.4/httplib.py", line 685, in _send_output
self.send(msg)
File "/usr/lib64/python2.4/httplib.py", line 652, in send
self.connect()
File "/usr/lib64/python2.4/httplib.py", line 1084, in connect
sock.connect((self.host, self.port))
File "<string>", line 1, in connect
socket.gaierror: (-2, 'Name or service not known')
Expected results:
Should work
Additional info:
This might be NOTABUG or a duplicate. I'm filling it to be sure this is known
and what I'm doing is correct.
(In reply to comment #9) > Do things work when you use http instead of https? Preparing environment now: https://beaker.engineering.redhat.com/jobs/148593 but from what I recall, you are right, http://... worked as expected. (In reply to comment #8) > Note that it is the same symptom as bug 739625 so I would bet that the real > problem is in m2crypto, which is for rhel6 tracked as bug 742914. The symptoms may be the same here, but the root cause is different. From httplib.py: ... class HTTPSConnection def connect(self): sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.connect((self.host, self.port)) ... (In reply to comment #9) > Do things work when you use http instead of https? Yes, I can log-in (with "client.auth.login('admin', 'password')") when on http instead of https. *** Bug 796076 has been marked as a duplicate of this bug. *** This request was not resolved in time for the current release. Red Hat invites you to ask your support representative to propose this request, if still desired, for consideration in the next release of Red Hat Enterprise Linux. Development Management has reviewed and declined this request. You may appeal this decision by reopening this request. |