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.

Bug 1374460

Summary: sometimes stage candlepin does not return any error message; appears as a BadStatusLine
Product: Red Hat Enterprise Linux 7 Reporter: John Sefler <jsefler>
Component: subscription-managerAssignee: candlepin-bugs
Status: CLOSED WONTFIX QA Contact: John Sefler <jsefler>
Severity: low Docs Contact:
Priority: low    
Version: 7.3CC: csnyder, it-eng-bz, jsefler, ktordeur, redakkan, skallesh, wpoteat
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-12-15 07:45:38 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 John Sefler 2016-09-08 17:34:25 UTC
Description of problem:
Encountered this error against stage candlepin during an automated test run.  Don't really know how to interpret it since there is no exception message...

Version-Release number of selected component (if applicable):
  subscription.rhn.stage.redhat.com
  subscription management server: 0.9.51.15-1

How reproducible:
  is not easy to reproducible

Steps to Reproduce:
2016-09-08 06:14:00.215  FINE: ssh root.eng.bos.redhat.com subscription-manager subscribe --pool=8a99f9815582f734015585f99973509a
2016-09-08 06:16:53.512  FINE: Stdout: 
2016-09-08 06:16:53.512  FINE: Stderr: ''

2016-09-08 06:16:53.512  FINE: ExitCode: 70
2016-09-08 06:16:53.512  FINE: ssh root.eng.bos.redhat.com LINE_NUMBER=$(grep --line-number 'Making request:' /var/log/rhsm/rhsm.log | tail --lines=1 | cut --delimiter=':' --field=1); if [ -n "$LINE_NUMBER" ]; then tail -n +$LINE_NUMBER /var/log/rhsm/rhsm.log; fi;
2016-09-08 06:16:54.358  WARNING: Last request from /var/log/rhsm/rhsm.log:
2016-09-08 06:14:16,544 [DEBUG] subscription-manager:3495:MainThread @connection.py:573 - Making request: POST /subscription/consumers/ec27ba92-b7e5-4f97-8872-d9a3de796bcb/entitlements?pool=8a99f9815582f734015585f99973509a
2016-09-08 06:16:51,800 [ERROR] subscription-manager:3495:MainThread @managercli.py:174 - Unable to attach: ''
2016-09-08 06:16:51,800 [ERROR] subscription-manager:3495:MainThread @managercli.py:175 - ''
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/subscription_manager/managercli.py", line 1560, in _do_command
    ents = self.cp.bindByEntitlementPool(self.identity.uuid, pool, self.options.quantity)
  File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 1169, in bindByEntitlementPool
    return self.conn.request_post(method)
  File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 697, in request_post
    return self._request("POST", method, params)
  File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 591, in _request
    response = conn.getresponse()
  File "/usr/lib64/python2.7/httplib.py", line 1089, in getresponse
    response.begin()
  File "/usr/lib64/python2.7/httplib.py", line 444, in begin
    version, status, reason = self._read_status()
  File "/usr/lib64/python2.7/httplib.py", line 408, in _read_status
    raise BadStatusLine(line)
BadStatusLine: ''

Actual results:


Expected results:


Additional info:

Comment 2 vritant 2016-09-22 14:03:55 UTC
John,
could you provide more details around subman version etc please?

Comment 3 Chris Snyder 2016-09-26 14:19:25 UTC
This was encountered with subman 1.17.X. The fix is likely to be better reporting of the error (no traceback in stdout and a more user-friendly message).

Comment 5 John Sefler 2017-02-27 21:25:47 UTC
Here's another occurrence of this bug against a RHEL6 build...
2017-02-24 19:14:03.858  FINE: ssh root.lab.eng.bos.redhat.com subscription-manager version
2017-02-24 19:14:05.699  FINE: Stdout:
server type: Red Hat Subscription Management
subscription management server: 0.9.51.21-1
subscription management rules: 5.15.1
subscription-manager: 1.18.10-1.el6
python-rhsm: 1.18.6-1.el6



2017-02-24 22:10:28.427  FINE: ssh root.lab.eng.bos.redhat.com subscription-manager register --username=stage_auto_testuser1 --password=redhat --autosubscribe --servicelevel=stAndarD --force
2017-02-24 22:13:10.090  FINE: Stdout:
The system with UUID 032c087d-0c70-48a2-96b3-3db2233d7628 has been unregistered
Registering to: subscription.rhsm.stage.redhat.com:443/subscription

2017-02-24 22:13:10.091  FINE: Stderr: Remote server error. Please check the connection details, or see /var/log/rhsm/rhsm.log for more information.

2017-02-24 22:13:10.091  FINE: ExitCode: 70
2017-02-24 22:13:10.091  FINE: ssh root.lab.eng.bos.redhat.com LINE_NUMBER=$(grep --line-number 'Making request:' /var/log/rhsm/rhsm.log | tail --lines=1 | cut --delimiter=':' --field=1); if [ -n "$LINE_NUMBER" ]; then tail -n +$LINE_NUMBER /var/log/rhsm/rhsm.log; fi;
2017-02-24 22:13:10.359  WARNING: Last request from /var/log/rhsm/rhsm.log:
2017-02-24 22:10:38,227 [DEBUG] subscription-manager:6475:MainThread @connection.py:490 - Making request: POST /subscription/consumers?owner=7964055
2017-02-24 22:13:16,278 [ERROR] subscription-manager:6475:MainThread @managercli.py:177 - Error during registration:
2017-02-24 22:13:16,279 [ERROR] subscription-manager:6475:MainThread @managercli.py:178 -
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/subscription_manager/managercli.py", line 1149, in _do_command
    content_tags=self.installed_mgr.tags)
  File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 856, in registerConsumer
    return self.conn.request_post(url, params)
  File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 626, in request_post
    return self._request("POST", method, params)
  File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 512, in _request
    response = conn.getresponse()
  File "/usr/lib64/python2.6/site-packages/rhsm/m2cryptohttp.py", line 182, in getresponse
    return self._connection.getresponse(*args, **kwargs)
  File "/usr/lib64/python2.6/httplib.py", line 1049, in getresponse
    response.begin()
  File "/usr/lib64/python2.6/httplib.py", line 433, in begin
    version, status, reason = self._read_status()
  File "/usr/lib64/python2.6/httplib.py", line 397, in _read_status
    raise BadStatusLine(line)
BadStatusLine

Comment 7 RHEL Program Management 2020-12-15 07:45:38 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.