Bug 1402220

Summary: Failed to run "subscription-manager refresh", return 'module' object has no attribute 'BadStatusLine'
Product: Red Hat Enterprise Linux 6 Reporter: Eko <hsun>
Component: subscription-managerAssignee: candlepin-bugs
Status: CLOSED DUPLICATE QA Contact: John Sefler <jsefler>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.9CC: khowell, redakkan, sgao, shihliu, skallesh, yuefliu
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-12-08 16:02:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Eko 2016-12-07 05:23:23 UTC
Description of problem:
register host to satellite-6.1.11, and then run "subscription-manager refresh", will return error message:
'module' object has no attribute 'BadStatusLine'

Version-Release number of selected component (if applicable):
subscription-manager-1.18.5-1.el6.x86_64
python-rhsm-1.18.5-1.el6.x86_64


How reproducible:
always

Steps to Reproduce:
1. register host to satellite-6.1.11
# subscription-manager register
Registering to: bootp-73-3-199.eng.pek2.redhat.com:443/rhsm
Username: admin
Password: 
The system has been registered with ID: f655bd9d-cae9-409d-b3ce-dd1ef54e6da0

2. run refresh
# subscription-manager refresh
'module' object has no attribute 'BadStatusLine'


3. check rhsm.log
2016-12-07 00:21:59,631 [INFO] subscription-manager:7737:MainThread @managercli.py:389 - Client Versions: {'python-rhsm': '1.18.5-1.el6', 'subscription-manager': '1.18.5-1.el6'}
2016-12-07 00:21:59,631 [INFO] subscription-manager:7737:MainThread @connection.py:758 - Connection built: host=bootp-73-3-199.eng.pek2.redhat.com port=443 handler=/rhsm auth=identity_cert ca_dir=/etc/rhsm/ca/ insecure=False
2016-12-07 00:21:59,632 [INFO] subscription-manager:7737:MainThread @connection.py:758 - Connection built: host=bootp-73-3-199.eng.pek2.redhat.com port=443 handler=/rhsm auth=none
2016-12-07 00:21:59,632 [INFO] subscription-manager:7737:MainThread @managercli.py:364 - Consumer Identity name=hp-z220-07.qe.lab.eng.nay.redhat.com uuid=f655bd9d-cae9-409d-b3ce-dd1ef54e6da0
2016-12-07 00:21:59,693 [INFO] subscription-manager:7737:MainThread @connection.py:525 - Response: status=404, request="PUT /rhsm/consumers/f655bd9d-cae9-409d-b3ce-dd1ef54e6da0/certificates?lazy_regen=true"
2016-12-07 00:21:59,693 [ERROR] subscription-manager:7737:MainThread @connection.py:554 - Response: 404
2016-12-07 00:21:59,694 [ERROR] subscription-manager:7737:MainThread @connection.py:555 - JSON parsing error: No JSON object could be decoded
2016-12-07 00:21:59,694 [ERROR] subscription-manager:7737:MainThread @managercli.py:177 - Unable to perform refresh due to the following exception: 'module' object has no attribute 'BadStatusLine'
2016-12-07 00:21:59,694 [ERROR] subscription-manager:7737:MainThread @managercli.py:178 - 'module' object has no attribute 'BadStatusLine'
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/subscription_manager/managercli.py", line 664, in _do_command
    if not self.cp.regenEntitlementCertificates(identity.uuid, True):
  File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 1290, in regenEntitlementCertificates
    except (RemoteServerException, httplib.BadStatusLine, RestlibException) as e:
AttributeError: 'module' object has no attribute 'BadStatusLine'


Actual results:
subscription-manager refresh failed

Comment 3 John Sefler 2016-12-07 12:42:35 UTC
Duplicate of Bug 1397201

Comment 4 Kevin Howell 2016-12-08 16:02:54 UTC

*** This bug has been marked as a duplicate of bug 1397201 ***