Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Description of problem:
Automated test runs are occasionally hitting failing subscription-manager command line calls with an unexpected exit code and a traceback in the rhsm.log that raises a BadStatusLine. Here's an example...
Notice the time stamp difference in the log between the POST and the WARNING. That's over two minutes. Maybe something is really timing out? and if so, why? But first, can sub-man handle the failure better?
Last request from /var/log/rhsm/rhsm.log:
2016-12-01 22:12:52,968 [DEBUG] subscription-manager:12469:MainThread @connection.py:490 - Making request: POST /subscription/consumers/8c99e4a4-2e74-4af4-b6d5-197160624e3e/entitlements
2016-12-01 22:15:20,488 [WARNING] subscription-manager:12469:MainThread @managercli.py:204 - Error during auto-attach.
2016-12-01 22:15:20,488 [ERROR] subscription-manager:12469:MainThread @managercli.py:205 -
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/subscription_manager/managercli.py", line 200, in autosubscribe
ents = cp.bind(consumer_uuid) # new style
File "/usr/lib/python2.6/site-packages/rhsm/connection.py", line 1123, in bind
return self.conn.request_post(method)
File "/usr/lib/python2.6/site-packages/rhsm/connection.py", line 626, in request_post
return self._request("POST", method, params)
File "/usr/lib/python2.6/site-packages/rhsm/connection.py", line 512, in _request
response = conn.getresponse()
File "/usr/lib/python2.6/site-packages/rhsm/m2cryptohttp.py", line 166, in getresponse
return self._connection.getresponse(*args, **kwargs)
File "/usr/lib/python2.6/httplib.py", line 1049, in getresponse
response.begin()
File "/usr/lib/python2.6/httplib.py", line 433, in begin
version, status, reason = self._read_status()
File "/usr/lib/python2.6/httplib.py", line 397, in _read_status
raise BadStatusLine(line)
BadStatusLine
2016-12-01 22:15:20,504 [ERROR] subscription-manager:12469:MainThread @managercli.py:177 - Unable to attach:
2016-12-01 22:15:20,504 [ERROR] subscription-manager:12469:MainThread @managercli.py:178 -
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/subscription_manager/managercli.py", line 1621, in _do_command
service_level=self.options.service_level)
File "/usr/lib/python2.6/site-packages/subscription_manager/managercli.py", line 200, in autosubscribe
ents = cp.bind(consumer_uuid) # new style
File "/usr/lib/python2.6/site-packages/rhsm/connection.py", line 1123, in bind
return self.conn.request_post(method)
File "/usr/lib/python2.6/site-packages/rhsm/connection.py", line 626, in request_post
return self._request("POST", method, params)
File "/usr/lib/python2.6/site-packages/rhsm/connection.py", line 512, in _request
response = conn.getresponse()
File "/usr/lib/python2.6/site-packages/rhsm/m2cryptohttp.py", line 166, in getresponse
return self._connection.getresponse(*args, **kwargs)
File "/usr/lib/python2.6/httplib.py", line 1049, in getresponse
response.begin()
File "/usr/lib/python2.6/httplib.py", line 433, in begin
version, status, reason = self._read_status()
File "/usr/lib/python2.6/httplib.py", line 397, in _read_status
raise BadStatusLine(line)
BadStatusLine
Version-Release number of selected component (if applicable):
Installed versions...
Client1 'kvm-guest-05.rhts.eng.bos.redhat.com' is running version:
subscription-manager-firstboot-1.18.5-1.el6.i686
subscription-manager-gui-1.18.5-1.el6.i686
subscription-manager-1.18.5-1.el6.i686
subscription-manager-migration-1.18.5-1.el6.i686
subscription-manager-migration-data-2.0.32-1.el6.noarch
python-rhsm-certificates-1.18.5-1.el6.i686
python-rhsm-1.18.5-1.el6.i686
How reproducible:
Steps to Reproduce:
The traceback above came from an automated test that was doing this on the command line...
ssh root.eng.bos.redhat.com subscription-manager subscribe --auto --servicelevel=SeLf-supPOrt
Stdout:
Service level set to: SeLf-supPOrt
Stderr:
ExitCode: 70
Actual results:
above
Expected results:
did not expect an exit code of 70 The problem has nothing to do with the --servicelevel=SeLf-supPOrt. That just happened to be the automated test case that hit this BadStatusLine response from the server.
Additional info:
The expected behaviour is to print out (to stderr) something to the effect "problem communicating with subscription management service, please try again later.". We likely already have a string that is suitable for this purpose. If not this needs to be fixed before string freeze.
As indicated in the bug description, the offending "BadStatusLine" was unrepeatedly encountered by automated testruns. Hence I have no way to reliably verify a fix manually. However, automated testruns since the fix was integrated into subscription-manager-1.18.6-1, have no longer encountered a "BadStatusLine". If I interpreted the developer's committed fix correctly, the offending situation should now give rise to a "Remote server error. Please check the connection details, or see /var/log/rhsm/rhsm.log for more information." which is a satisfactory way for subscription-manager to handle this issue.
For now I will mark this bug as VERIFIED and continue monitoring automated testruns. If the "BadStatusLine" reoccurs, I will re-open this bug.
Reference sub-man commit bc6c652c005b28b3b4cf9272e961465877edcad5 1401078: "Remote server error" on BadStatusLine
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
Description of problem: Automated test runs are occasionally hitting failing subscription-manager command line calls with an unexpected exit code and a traceback in the rhsm.log that raises a BadStatusLine. Here's an example... Notice the time stamp difference in the log between the POST and the WARNING. That's over two minutes. Maybe something is really timing out? and if so, why? But first, can sub-man handle the failure better? Last request from /var/log/rhsm/rhsm.log: 2016-12-01 22:12:52,968 [DEBUG] subscription-manager:12469:MainThread @connection.py:490 - Making request: POST /subscription/consumers/8c99e4a4-2e74-4af4-b6d5-197160624e3e/entitlements 2016-12-01 22:15:20,488 [WARNING] subscription-manager:12469:MainThread @managercli.py:204 - Error during auto-attach. 2016-12-01 22:15:20,488 [ERROR] subscription-manager:12469:MainThread @managercli.py:205 - Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/subscription_manager/managercli.py", line 200, in autosubscribe ents = cp.bind(consumer_uuid) # new style File "/usr/lib/python2.6/site-packages/rhsm/connection.py", line 1123, in bind return self.conn.request_post(method) File "/usr/lib/python2.6/site-packages/rhsm/connection.py", line 626, in request_post return self._request("POST", method, params) File "/usr/lib/python2.6/site-packages/rhsm/connection.py", line 512, in _request response = conn.getresponse() File "/usr/lib/python2.6/site-packages/rhsm/m2cryptohttp.py", line 166, in getresponse return self._connection.getresponse(*args, **kwargs) File "/usr/lib/python2.6/httplib.py", line 1049, in getresponse response.begin() File "/usr/lib/python2.6/httplib.py", line 433, in begin version, status, reason = self._read_status() File "/usr/lib/python2.6/httplib.py", line 397, in _read_status raise BadStatusLine(line) BadStatusLine 2016-12-01 22:15:20,504 [ERROR] subscription-manager:12469:MainThread @managercli.py:177 - Unable to attach: 2016-12-01 22:15:20,504 [ERROR] subscription-manager:12469:MainThread @managercli.py:178 - Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/subscription_manager/managercli.py", line 1621, in _do_command service_level=self.options.service_level) File "/usr/lib/python2.6/site-packages/subscription_manager/managercli.py", line 200, in autosubscribe ents = cp.bind(consumer_uuid) # new style File "/usr/lib/python2.6/site-packages/rhsm/connection.py", line 1123, in bind return self.conn.request_post(method) File "/usr/lib/python2.6/site-packages/rhsm/connection.py", line 626, in request_post return self._request("POST", method, params) File "/usr/lib/python2.6/site-packages/rhsm/connection.py", line 512, in _request response = conn.getresponse() File "/usr/lib/python2.6/site-packages/rhsm/m2cryptohttp.py", line 166, in getresponse return self._connection.getresponse(*args, **kwargs) File "/usr/lib/python2.6/httplib.py", line 1049, in getresponse response.begin() File "/usr/lib/python2.6/httplib.py", line 433, in begin version, status, reason = self._read_status() File "/usr/lib/python2.6/httplib.py", line 397, in _read_status raise BadStatusLine(line) BadStatusLine Version-Release number of selected component (if applicable): Installed versions... Client1 'kvm-guest-05.rhts.eng.bos.redhat.com' is running version: subscription-manager-firstboot-1.18.5-1.el6.i686 subscription-manager-gui-1.18.5-1.el6.i686 subscription-manager-1.18.5-1.el6.i686 subscription-manager-migration-1.18.5-1.el6.i686 subscription-manager-migration-data-2.0.32-1.el6.noarch python-rhsm-certificates-1.18.5-1.el6.i686 python-rhsm-1.18.5-1.el6.i686 How reproducible: Steps to Reproduce: The traceback above came from an automated test that was doing this on the command line... ssh root.eng.bos.redhat.com subscription-manager subscribe --auto --servicelevel=SeLf-supPOrt Stdout: Service level set to: SeLf-supPOrt Stderr: ExitCode: 70 Actual results: above Expected results: did not expect an exit code of 70 The problem has nothing to do with the --servicelevel=SeLf-supPOrt. That just happened to be the automated test case that hit this BadStatusLine response from the server. Additional info: