Bug 1394776 - Registration fails with RemoteServerException: Server error attempting a GET to /subscription/users/stage_test_rhel69/owners returned status 404
Summary: Registration fails with RemoteServerException: Server error attempting a GET ...
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager
Version: 6.9
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Chris Snyder
QA Contact: John Sefler
Depends On:
TreeView+ depends on / blocked
Reported: 2016-11-14 12:38 UTC by Rehana
Modified: 2019-08-16 14:46 UTC (History)
3 users (show)

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

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Github candlepin python-rhsm pull 189 'None' closed 1394776: Fix port, insecure, and handler options on M2Crypto wrapper 2020-06-29 06:08:00 UTC
Red Hat Product Errata RHSA-2017:0698 normal SHIPPED_LIVE Moderate: subscription-manager security, bug fix, and enhancement update 2017-03-21 12:39:12 UTC

Description Rehana 2016-11-14 12:38:51 UTC
Description of problem:
Observed that subscription-manager register fails with error "RemoteServerException: Server error attempting a GET to /subscription/users/stage_test_rhel69/owners returned status 404" after upgrading the packages to the versions 'python-rhsm': '1.18.4-1.git.2.07e5af7.el6', 'subscription-manager': '1.18.4-1.git.0.ce8212e.el6' from jenkins build

Version-Release number of selected component (if applicable):
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:
1.Install latest build from master
2.Try to register system 
# subscription-manager  register --username=stage_test_rhel69 --password=**
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
Remote server error. Please check the connection details, or see /var/log/rhsm/rhsm.log for more information.

2016-11-14 07:28:30,254 [ERROR] subscription-manager:27514:MainThread @managercli.py:176 - Error during registration: Server error attempting a GET to /subscription/users/stage_test_rhel69/owners returned status 404
2016-11-14 07:28:30,255 [ERROR] subscription-manager:27514:MainThread @managercli.py:177 - Server error attempting a GET to /subscription/users/stage_test_rhel69/owners returned status 404
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/subscription_manager/managercli.py", line 1138, in _do_command
    owner_key = self._determine_owner_key(admin_cp)
  File "/usr/lib/python2.6/site-packages/subscription_manager/managercli.py", line 1285, in _determine_owner_key
    owners = cp.getOwnerList(self.username)
  File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 1051, in getOwnerList
    return self.conn.request_get(method)
  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 531, in _request
    self.validateResponse(result, request_type, handler)
  File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 590, in validateResponse
Remote server error. Please check the connection details, or see /var/log/rhsm/rhsm.log for more information.    handler=handler)

RemoteServerException: Server error attempting a GET to /subscription/users/stage_test_rhel69/owners returned status 404

Actual results:
Register fails with above message

Expected results:
Register should successfully completed

Additional info:
I could successfully register the client to stage server using the same account from a subscripition-manager brew build python-rhsm': '1.18.4-1.el6', 'subscription-manager': '1.18.4-1.el6 ; Hence adding the keyword "Regression"to te bug

Comment 3 Chris Snyder 2016-11-15 16:19:16 UTC
Moving to POST as the fix has been merged upstream.

Comment 5 Shwetha Kallesh 2016-11-28 07:27:27 UTC
[root@dhcp35-179 ~]# subscription-manager version
server type: RHN Classic and Red Hat Subscription Management
subscription management server:
subscription management rules: 5.15.1
subscription-manager: 1.18.5-1.el6
python-rhsm: 1.18.5-1.el6

[root@dhcp35-179 ~]# subscription-manager register --force 
Registering to: subscription.rhn.stage.redhat.com:443/subscription
Username: qa@redhat.com
The system has been registered with ID: d2537655-ec4b-46d3-b574-2e167a7011d0 

[root@dhcp35-179 ~]# tail -f /var/log/rhsm/rhsm.log
2016-11-28 02:24:56,494 [INFO] subscription-manager:18055:MainThread @managerlib.py:77 - Consumer created: {'consumer_name': 'dhcp35-179.lab.eng.blr.redhat.com', 'uuid': 'd2537655-ec4b-46d3-b574-2e167a7011d0'}
2016-11-28 02:24:56,500 [INFO] subscription-manager:18055:MainThread @connection.py:758 - Connection built: host=subscription.rhn.stage.redhat.com port=443 handler=/subscription auth=identity_cert ca_dir=/etc/rhsm/ca/ insecure=False
2016-11-28 02:24:57,912 [INFO] subscription-manager:18055:MainThread @connection.py:525 - Response: status=200, requestUuid=0a30a161-ef86-409b-a0d3-226cad831e4f, request="GET /subscription/"
2016-11-28 02:24:59,363 [INFO] subscription-manager:18055:MainThread @connection.py:525 - Response: status=200, requestUuid=f044809c-c50b-4852-9064-2602b75e1d2a, request="GET /subscription/status"
2016-11-28 02:24:59,364 [INFO] subscription-manager:18055:MainThread @managercli.py:400 - Server Versions: {'rules-version': '5.15.1', 'candlepin': '', 'server-type': 'RHN Classic and Red Hat Subscription Management'}
2016-11-28 02:25:00,794 [INFO] subscription-manager:18055:MainThread @connection.py:525 - Response: status=200, requestUuid=6feda1a2-4935-4248-87d2-4a82b7f40b80, request="GET /subscription/"
2016-11-28 02:25:00,796 [INFO] subscription-manager:18055:MainThread @cache.py:398 - Server does not support packages, skipping profile upload.
2016-11-28 02:25:02,308 [INFO] subscription-manager:18055:MainThread @connection.py:525 - Response: status=200, requestUuid=b92da3d6-dae9-4b65-bfee-4492598a0548, request="GET /subscription/consumers/d2537655-ec4b-46d3-b574-2e167a7011d0/compliance"
2016-11-28 02:25:02,309 [INFO] subscription-manager:18055:MainThread @cert_sorter.py:205 - Product status: valid_products= partial_products= expired_products= unentitled_producs=69 future_products= valid_until=None
2016-11-28 02:25:02,479 [INFO] rhsmd:18127:MainThread @rhsmd:261 - rhsmd started

Comment 7 errata-xmlrpc 2017-03-21 10:57:11 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.


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