RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1394351 - 'module' object has no attribute 'PROXY_AUTHENTICATION_REQUIRED'
Summary: 'module' object has no attribute 'PROXY_AUTHENTICATION_REQUIRED'
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager
Version: 6.9
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: rc
: ---
Assignee: Kevin Howell
QA Contact: John Sefler
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-11 19:21 UTC by John Sefler
Modified: 2017-03-21 10:57 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-03-21 10:57:06 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github candlepin python-rhsm pull 188 0 None None None 2016-11-11 21:28:23 UTC
Red Hat Product Errata RHSA-2017:0698 0 normal SHIPPED_LIVE Moderate: subscription-manager security, bug fix, and enhancement update 2017-03-21 12:39:12 UTC

Description John Sefler 2016-11-11 19:21:39 UTC
Description of problem:
I suspect that the attempt to fix bug 1390688 is insufficient and is causing this new traceback.  This blocks system registration. 


Version-Release number of selected component (if applicable):
[root@jsefler-rhel6server ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: Unknown
subscription management rules: Unknown
subscription-manager: 1.18.4-1.git.0.ce8212e.el6
python-rhsm: 1.18.4-1.git.2.07e5af7.el6


How reproducible:


Steps to Reproduce:
[root@jsefler-rhel6server ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: Unknown
subscription management rules: Unknown
subscription-manager: 1.18.4-1.git.0.ce8212e.el6
python-rhsm: 1.18.4-1.git.2.07e5af7.el6

[root@jsefler-rhel6server ~]# tail -f /var/log/rhsm/rhsm.log
2016-11-11 14:05:50,731 [DEBUG] subscription-manager:19698:MainThread @https.py:59 - Using m2crypto wrappers to provide httplib and ssl
2016-11-11 14:05:50,870 [DEBUG] subscription-manager:19698:MainThread @ga_loader.py:89 - ga_loader GaImporterGtk2
2016-11-11 14:05:50,875 [DEBUG] subscription-manager:19698:MainThread @plugins.py:569 - loaded plugin modules: []
2016-11-11 14:05:50,875 [DEBUG] subscription-manager:19698:MainThread @plugins.py:570 - loaded plugins: {}
2016-11-11 14:05:50,875 [DEBUG] subscription-manager:19698:MainThread @identity.py:131 - Loading consumer info from identity certificates.
2016-11-11 14:05:50,875 [DEBUG] subscription-manager:19698:MainThread @identity.py:146 - Reload of consumer identity cert /etc/pki/consumer/cert.pem raised an exception with msg: [Errno 2] No such file or directory: '/etc/pki/consumer/key.pem'
2016-11-11 14:05:50,921 [INFO] subscription-manager:19698:MainThread @managercli.py:388 - Client Versions: {'python-rhsm': '1.18.4-1.git.2.07e5af7.el6', 'subscription-manager': '1.18.4-1.git.0.ce8212e.el6'}
2016-11-11 14:05:50,922 [INFO] subscription-manager:19698:MainThread @connection.py:755 - Connection built: host=jsefler-candlepin6.usersys.redhat.com port=8443 handler=/candlepin auth=identity_cert ca_dir=/etc/rhsm/ca/ verify=False
2016-11-11 14:05:50,922 [INFO] subscription-manager:19698:MainThread @connection.py:755 - Connection built: host=jsefler-candlepin6.usersys.redhat.com port=8443 handler=/candlepin auth=none
2016-11-11 14:05:50,941 [DEBUG] subscription-manager:19698:MainThread @connection.py:445 - Loaded CA certificates from /etc/rhsm/ca/: jsefler-candlepin6.pem, timeout_listener.pem, redhat-uep.pem
2016-11-11 14:05:50,941 [DEBUG] subscription-manager:19698:MainThread @connection.py:489 - Making request: GET /candlepin/
2016-11-11 14:05:50,981 [ERROR] subscription-manager:19698:MainThread @utils.py:273 - Error while checking server version: 'module' object has no attribute 'PROXY_AUTHENTICATION_REQUIRED'
2016-11-11 14:05:50,981 [ERROR] subscription-manager:19698:MainThread @utils.py:275 - 'module' object has no attribute 'PROXY_AUTHENTICATION_REQUIRED'
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/subscription_manager/utils.py", line 253, in get_server_versions
    if cp.supports_resource("status"):
  File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 781, in supports_resource
    self._load_supported_resources()
  File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 768, in _load_supported_resources
    resources_list = self.conn.request_get("/")
  File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 620, in request_get
    return self._request("GET", method)
  File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 508, in _request
    if str(e)[-3:] == str(httplib.PROXY_AUTHENTICATION_REQUIRED):
AttributeError: 'module' object has no attribute 'PROXY_AUTHENTICATION_REQUIRED'
2016-11-11 14:05:50,982 [INFO] subscription-manager:19698:MainThread @managercli.py:399 - Server Versions: {'rules-version': 'Unknown', 'candlepin': 'Unknown', 'server-type': 'This system is currently not registered.'}


Actual results:


Expected results:


Additional info:
[root@jsefler-rhel6server ~]# subscription-manager config 
[server]
   hostname = jsefler-candlepin6.usersys.redhat.com
   insecure = [0]
   port = 8443
   prefix = /candlepin
   proxy_hostname = []
   proxy_password = []
   proxy_port = []
   proxy_user = []
   server_timeout = [180]
   ssl_verify_depth = [3]

[rhsm]
   baseurl = [https://cdn.redhat.com]
   ca_cert_dir = [/etc/rhsm/ca/]
   consumercertdir = [/etc/pki/consumer]
   entitlementcertdir = [/etc/pki/entitlement]
   full_refresh_on_yum = [0]
   manage_repos = [1]
   pluginconfdir = [/etc/rhsm/pluginconf.d]
   plugindir = [/usr/share/rhsm-plugins]
   productcertdir = [/etc/pki/product]
   repo_ca_cert = /etc/rhsm/ca/redhat-uep.pem
   report_package_profile = [1]

[rhsmcertd]
   autoattachinterval = [1440]
   certcheckinterval = [240]

[logging]
   default_log_level = DEBUG

[] - Default value in use


[root@jsefler-rhel6server ~]#

Comment 3 Chris Snyder 2016-11-14 18:38:19 UTC
The fix is merged upstream. Moving to POST.

Comment 5 Rehana 2016-12-12 11:27:03 UTC
Retested on ;
python-rhsm-certificates-1.18.6-1.el6.x86_64
python-rhsm-1.18.6-1.el6.x86_64
subscription-manager-migration-1.18.6-1.el6.x86_64
subscription-manager-firstboot-1.18.6-1.el6.x86_64
subscription-manager-1.18.6-1.el6.x86_64
subscription-manager-gui-1.18.6-1.el6.x86_64
subscription-manager-migration-data-2.0.32-1.el6.noarch

Observed that now `subscription-manager version` command works and no error was observed in the rhsm.log 


# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 2.0.21-1
subscription management rules: 5.20
subscription-manager: 1.18.6-1.el6
python-rhsm: 1.18.6-1.el6


rhsm.log :
============

2016-12-12 06:22:09,557 [INFO] subscription-manager:28456:MainThread @managercli.py:389 - Client Versions: {'python-rhsm': '1.18.6-1.el6', 'subscription-manager': '1.18.6-1.el6'}
2016-12-12 06:22:09,557 [INFO] subscription-manager:28456:MainThread @connection.py:758 - Connection built: host=F21-candlepin.usersys.redhat.com port=8443 handler=/candlepin auth=identity_cert ca_dir=/etc/rhsm/ca/ insecure=False
2016-12-12 06:22:09,557 [INFO] subscription-manager:28456:MainThread @connection.py:758 - Connection built: host=F21-candlepin.usersys.redhat.com port=8443 handler=/candlepin auth=none
2016-12-12 06:22:11,127 [INFO] subscription-manager:28456:MainThread @connection.py:525 - Response: status=200, requestUuid=41206213-6518-49c2-8aa8-6282c2d5f54b, request="GET /candlepin/"
2016-12-12 06:22:12,425 [INFO] subscription-manager:28456:MainThread @connection.py:525 - Response: status=200, requestUuid=dca5a5a4-5b70-4dfe-b2d1-b003fbcc833b, request="GET /candlepin/status"
2016-12-12 06:22:12,428 [INFO] subscription-manager:28456:MainThread @managercli.py:400 - Server Versions: {'rules-version': '5.20', 'candlepin': '2.0.21-1', 'server-type': 'Red Hat Subscription Management'}


Above retest steps demonstrates that the issue is now resolved, hence marking as Verified!!!

Additional details on system configuration:
========================================
# subscription-manager config --list
[server]
   hostname = F21-candlepin.usersys.redhat.com
   insecure = [0]
   port = 8443
   prefix = /candlepin
   proxy_hostname = []
   proxy_password = []
   proxy_port = []
   proxy_user = []
   server_timeout = [180]
   ssl_verify_depth = [3]

[rhsm]
   baseurl = [https://cdn.redhat.com]
   ca_cert_dir = [/etc/rhsm/ca/]
   consumercertdir = [/etc/pki/consumer]
   entitlementcertdir = [/etc/pki/entitlement]
   full_refresh_on_yum = [0]
   manage_repos = [1]
   pluginconfdir = [/etc/rhsm/pluginconf.d]
   plugindir = [/usr/share/rhsm-plugins]
   productcertdir = [/etc/pki/product]
   repo_ca_cert = /etc/rhsm/ca/redhat-uep.pem
   report_package_profile = [1]

[rhsmcertd]
   autoattachinterval = [1440]
   certcheckinterval = [240]

[logging]
   default_log_level = [INFO]

[] - Default value in use

Comment 7 errata-xmlrpc 2017-03-21 10:57:06 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2017-0698.html


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