Bug 1656646 - rhnreg_ks fails to register when a proxy is configured in up2date: 'HTTPSProxyConnection' object has no attribute '_set_hostport'
Summary: rhnreg_ks fails to register when a proxy is configured in up2date: 'HTTPSProx...
Keywords:
Status: CLOSED DUPLICATE of bug 1652859
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: rhn-client-tools
Version: 8.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: Michael Mráka
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-05 23:11 UTC by John Sefler
Modified: 2018-12-18 14:44 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-12-18 14:44:38 UTC
Type: Bug
Target Upstream Version:


Attachments (Terms of Use)

Description John Sefler 2018-12-05 23:11:10 UTC
Description of problem:
After configuring a valid proxy in /etc/sysconfig/rhn/up2date, rhnreg_ks fails to register with an Attribute error...
<class 'AttributeError'>: 'HTTPSProxyConnection' object has no attribute '_set_hostport'



Version-Release number of selected component (if applicable):
[root@dell-r730-001-guest05 ~]# rpm -qa | grep rhn
python3-rhn-setup-2.8.16-11.module+el8+2180+4b61dcd8.x86_64
python3-rhn-check-2.8.16-11.module+el8+2180+4b61dcd8.x86_64
python3-rhn-client-tools-2.8.16-11.module+el8+2180+4b61dcd8.x86_64
rhn-check-2.8.16-11.module+el8+2180+4b61dcd8.x86_64
rhnlib-2.8.6-5.module+el8+2180+4b61dcd8.noarch
rhnsd-5.0.35-3.module+el8+2180+4b61dcd8.x86_64
python3-rhnlib-2.8.6-5.module+el8+2180+4b61dcd8.noarch
rhn-client-tools-2.8.16-11.module+el8+2180+4b61dcd8.x86_64
rhn-setup-2.8.16-11.module+el8+2180+4b61dcd8.x86_64


How reproducible:


Steps to Reproduce:
[root@dell-r730-001-guest05 ~]# grep -i proxy /etc/sysconfig/rhn/up2date
enableProxy[comment]=Use a HTTP Proxy
enableProxy=1
httpProxy[comment]=HTTP proxy in host:port format, e.g. squid.redhat.com:3128
httpProxy=auto-services.usersys.redhat.com:3128
proxyUser[comment]=The username for an authenticated proxy
proxyUser=redhat
proxyPassword[comment]=The password to use for an authenticated proxy
proxyPassword=redhat
enableProxyAuth[comment]=To use an authenticated proxy or not
enableProxyAuth=1
[root@dell-r730-001-guest05 ~]# 
[root@dell-r730-001-guest05 ~]# rhnreg_ks --serverUrl=https://rhsm-sat58.usersys.redhat.com/XMLRPC --username=rhsm-client --password=REDACTED --profilename=rhsm-automation.dell-r730-001-guest05.dsal.lab.eng.rdu2.redhat.com --force --norhnsd --nohardware --nopackages --novirtinfo
An error has occurred:
<class 'AttributeError'>
See /var/log/up2date for more information
[root@dell-r730-001-guest05 ~]# 
[root@dell-r730-001-guest05 ~]# cat /var/log/up2date
[Wed Dec  5 18:04:44 2018] up2date 
Traceback (most recent call last):
  File "/usr/sbin/rhnreg_ks", line 215, in <module>
    cli.run()
  File "/usr/lib/python3.6/site-packages/up2date_client/rhncli.py", line 94, in run
    sys.exit(self.main() or 0)
  File "/usr/sbin/rhnreg_ks", line 93, in main
    rhnreg.getCaps()
  File "/usr/lib/python3.6/site-packages/up2date_client/rhnreg.py", line 264, in getCaps
    s.capabilities.validate()
  File "/usr/lib/python3.6/site-packages/up2date_client/rhnserver.py", line 67, in __call__
    return rpcServer.doCall(method, *args, **kwargs)
  File "/usr/lib/python3.6/site-packages/up2date_client/rpcServer.py", line 214, in doCall
    ret = method(*args, **kwargs)
  File "/usr/lib64/python3.6/xmlrpc/client.py", line 1112, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python3.6/site-packages/up2date_client/rpcServer.py", line 48, in _request1
    ret = self._request(methodname, params)
  File "/usr/lib/python3.6/site-packages/rhn/rpclib.py", line 394, in _request
    self._handler, request, verbose=self._verbose)
  File "/usr/lib/python3.6/site-packages/rhn/transports.py", line 153, in request
    connection = self.get_connection(host)
  File "/usr/lib/python3.6/site-packages/rhn/transports.py", line 333, in get_connection
    trusted_certs=self.trusted_certs)
  File "/usr/lib/python3.6/site-packages/rhn/connections.py", line 210, in __init__
    password, timeout=timeout)
  File "/usr/lib/python3.6/site-packages/rhn/connections.py", line 128, in __init__
    self._set_hostport(host, port)
<class 'AttributeError'>: 'HTTPSProxyConnection' object has no attribute '_set_hostport'


Actual results:
  above

Expected results:
  successful registration from a RHEL8 system to Sat58

Additional info:
  Without the proxy configuration, I can successfully register as shown here....
[root@dell-r730-001-guest05 ~]# grep -i proxy /etc/sysconfig/rhn/up2date
enableProxy[comment]=Use a HTTP Proxy
enableProxy=0
httpProxy[comment]=HTTP proxy in host:port format, e.g. squid.redhat.com:3128
httpProxy=
proxyUser[comment]=The username for an authenticated proxy
proxyUser=
proxyPassword[comment]=The password to use for an authenticated proxy
proxyPassword=
enableProxyAuth[comment]=To use an authenticated proxy or not
enableProxyAuth=1
[root@dell-r730-001-guest05 ~]# 
[root@dell-r730-001-guest05 ~]# rhnreg_ks --serverUrl=https://rhsm-sat58.usersys.redhat.com/XMLRPC --username=rhsm-client --password=REDACTED --profilename=rhsm-automation.dell-r730-001-guest05.dsal.lab.eng.rdu2.redhat.com --force --norhnsd --nohardware --nopackages --novirtinfo
[root@dell-r730-001-guest05 ~]# 
[root@dell-r730-001-guest05 ~]# rhn-channel --list
rhel-x86_64-baseos-8-htb
[root@dell-r730-001-guest05 ~]#


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