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 1066593

Summary: rhsm-debug system hits a 500 error getting the subscriptions.json against stage candlepin
Product: Red Hat Enterprise Linux 7 Reporter: John Sefler <jsefler>
Component: subscription-managerAssignee: William Poteat <wpoteat>
Status: CLOSED CURRENTRELEASE QA Contact: John Sefler <jsefler>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: wpoteat
Target Milestone: rc   
Target Release: 7.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-05-01 19:36:28 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:
Bug Depends On:    
Bug Blocks: 1005618    

Description John Sefler 2014-02-18 16:55:47 UTC
Description of problem:
When running the rhsm-debug system tool, one of the debugging files collected is subscriptions.json which is retrieved from a candlepin API call to /subscription/owners/{owner}/subscriptions

When run against stage (and probably production), rhsm.log reports a 500 error followed by a WARNING that Server does not allow retrieval of subscriptions by owner.

Version-Release number of selected component (if applicable):
[root@jsefler-7 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: Unknown
subscription-manager: 1.10.14-1.git.5.aba8a66.el7
python-rhsm: 1.10.12-1.git.1.c60e119.el7


How reproducible:


Steps to Reproduce:
[root@jsefler-7 ~]# subscription-manager register --serverurl=subscription.rhn.stage.redhat.com:443/subscriptionUsername: rhel7beta
Password: 
The system has been registered with ID: 1f747171-c029-4d71-a378-8900bd1e95e6 
[root@jsefler-7 ~]# rhsm-debug system --no-archive --sos 
Wrote: /tmp/rhsm-debug-system-20140218-884751
[root@jsefler-7 ~]# ls -l /tmp/rhsm-debug-system-20140218-884751/
total 112
-rw-r--r--. 1 root root 10040 Feb 18 11:49 compliance.json
-rw-r--r--. 1 root root 25019 Feb 18 11:49 consumer.json
-rw-r--r--. 1 root root     2 Feb 18 11:49 entitlements.json
-rw-r--r--. 1 root root 62758 Feb 18 11:49 pools.json
-rw-r--r--. 1 root root   214 Feb 18 11:49 version.json
[root@jsefler-7 ~]# 

^^^
EXPECTED: the list of rhsm-debug json files should include subscriptions.json



[root@jsefler-7 ~]# tail -f /var/log/rhsm/rhsm.log
2014-02-18 11:49:53,501 [DEBUG] rhsm-debug @connection.py:450 - Making request: GET /subscription/owners/7074055/subscriptions
2014-02-18 11:49:54,018 [DEBUG] rhsm-debug @connection.py:473 - Response: status=500
2014-02-18 11:49:54,020 [ERROR] rhsm-debug @connection.py:502 - Response: 500
2014-02-18 11:49:54,021 [ERROR] rhsm-debug @connection.py:503 - JSON parsing error: Expecting value: line 1 column 1 (char 0)
2014-02-18 11:49:54,021 [WARNING] rhsm-debug @debug_commands.py:97 - Server does not allow retrieval of subscriptions by owner.

Comment 1 John Sefler 2014-02-18 16:59:56 UTC
This scenario is actually handled gracefully and is probably working as designed. Seeking confirmation from the dev team.  If true, move bug to CLOSED NOTABUG

Comment 2 Bryan Kearney 2014-03-19 20:52:59 UTC
Moving bugs from 7.0 to 7.1

Comment 4 William Poteat 2014-05-01 19:36:28 UTC
Whitelist added for stage.

Proper handling of system that blocks subscription query access.