Bug 1379161 - HTTP proxy connection Error _set_hostport httplib - python 2.7
Summary: HTTP proxy connection Error _set_hostport httplib - python 2.7
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Clients
Version: 2.5
Hardware: All
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Michael Mráka
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-09-25 14:21 UTC by girolamo.piccinni
Modified: 2019-07-12 11:33 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-07-12 11:33:03 UTC


Attachments (Terms of Use)

Description girolamo.piccinni 2016-09-25 14:21:09 UTC
Description of problem:

When using a HTTP proxy to connect from spacewalk client to spacewalk server I got an error stating that instance has no attribute '_set_hostport'.
This seems to be related to a python httplib change as the '_set_hostport' method has been removed.

The file on the client using this method is spacewalk/client/rhel/rhnlib/rhn/connections.py.


Version-Release number of selected component (if applicable):
Spacewalk client version RHEL 2.5 - python 2.7

How reproducible:
Set a HTTP proxy between your client and the spacewalk server.

Steps to Reproduce:
1. Setup the HTTP proxy 
2. Register the client using: rhnreg_ks --proxy http://myproxy:proxy_port/ 

Actual results:
Error in the log stating instance has no attribute '_set_hostport'.

Expected results:
Client correctly registered to the spacewalk server without connection errors.

Additional info:
I'm registering an AmazonLinux client to a spacewalk server. As AmazonLinux uses python2.7 I'm using spacewalk client from RHEL 7.

It would be sufficient to remove _set_hostport and replace the connection using _set_tunnel as follows:
con = httplib.HTTPConnection(proxyHost, proxyPort)
con.set_tunnel("spacewalkServer", spacewalkServerport)

I've modified rhel/rhnlib/rhn/connections.py on my client and the connection works.

Comment 1 Michael Mráka 2019-07-12 11:33:03 UTC
This issue seems to be same we fixed in bug 1652859.


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