Red Hat Satellite 5 migration from RHN to RHSM failed with error "returned status 404"

Solution Verified - Updated -

Issue

  • Can't migrate Red Hat Satellite server from RHN to RHSM.
    Followed correct steps as per KCS
# rhn-migrate-classic-to-rhsm
[...]
Retrieving existing legacy subscription information...

+-----------------------------------------------------+
System is currently subscribed to these legacy channels:
+-----------------------------------------------------+
rhel-x86_64-server-6
rhn-tools-rhel-x86_64-server-6
redhat-rhn-satellite-5.7-server-x86_64-6

+-----------------------------------------------------+
Installing product certificates for these legacy channels:
+-----------------------------------------------------+
rhel-x86_64-server-6
rhn-tools-rhel-x86_64-server-6
redhat-rhn-satellite-5.7-server-x86_64-6


Product certificates installed successfully to /etc/pki/product.

Preparing to unregister system from legacy server...
System successfully unregistered from legacy server.
Stopping and disabling legacy services...

Attempting to register system to destination server...
Registering to: subscription.rhsm.redhat.com:443/subscription
Remote server error. Please check the connection details, or see /var/log/rhsm/rhsm.log for more information.

Unable to register.
For further assistance, please contact Red Hat Global Support Services.

Entries from /var/log/rhsm/rhsm.log:

2017-03-26 19:52:29,927 [INFO] subscription-manager:21465:MainThread @managercli.py:389 - Client Versions: {'python-rhsm': '1.18.6-1.el6', 'subscription-manager': '1.18.10-1.el6'}
2017-03-26 19:52:29,928 [INFO] subscription-manager:21465:MainThread @connection.py:758 - Connection built: host=subscription.rhsm.redhat.com port=443 handler=/subscription auth=identity_cert ca_dir=/etc/rhsm/ca/ insecure=False
2017-03-26 19:52:29,928 [INFO] subscription-manager:21465:MainThread @connection.py:758 - Connection built: host=subscription.rhsm.redhat.com port=443 handler=/subscription auth=none
2017-03-26 19:52:29,929 [INFO] subscription-manager:21465:MainThread @managercli.py:389 - Client Versions: {'python-rhsm': '1.18.6-1.el6', 'subscription-manager': '1.18.10-1.el6'}
2017-03-26 19:52:29,945 [INFO] subscription-manager:21465:MainThread @managercli.py:364 - Consumer Identity name=None uuid=None
2017-03-26 19:52:29,950 [INFO] subscription-manager:21465:MainThread @managercli.py:364 - Consumer Identity name=None uuid=None
2017-03-26 19:52:29,951 [INFO] subscription-manager:21465:MainThread @connection.py:758 - Connection built: host=subscription.rhsm.redhat.com port=443 handler=/subscription auth=basic username=user
2017-03-26 19:52:30,797 [INFO] subscription-manager:21465:MainThread @hwprobe.py:918 - collected virt facts: virt.is_guest=True, virt.host_type=vmware, virt.uuid=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx
2017-03-26 19:52:30,799 [INFO] subscription-manager:21465:MainThread @facts.py:139 - Loading custom facts from: /etc/rhsm/facts/migration.facts
2017-03-26 19:52:32,413 [INFO] subscription-manager:21465:MainThread @connection.py:525 - Response: status=200, request="GET /subscription/"
2017-03-26 19:52:34,310 [INFO] subscription-manager:21465:MainThread @connection.py:525 - Response: status=404, request="POST /subscription/consumers?owner=xxxx"
2017-03-26 19:52:34,311 [ERROR] subscription-manager:21465:MainThread @connection.py:554 - Response: 404
2017-03-26 19:52:34,312 [ERROR] subscription-manager:21465:MainThread @connection.py:555 - JSON parsing error: No JSON object could be decoded
2017-03-26 19:52:34,313 [ERROR] subscription-manager:21465:MainThread @managercli.py:177 - Error during registration: Server error attempting a POST to /subscription/consumers?owner=6074387 returned status 404
2017-03-26 19:52:34,313 [ERROR] subscription-manager:21465:MainThread @managercli.py:178 - Server error attempting a POST to /subscription/consumers?owner=6074387 returned status 404
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 534, in _request
    self.validateResponse(result, request_type, handler)
  File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 593, in validateResponse
    handler=handler)
RemoteServerException: Server error attempting a POST to /subscription/consumers?owner=xxxxx returned status 404
  • Once migration failed, unable to re-execute migration script.
# rhn-migrate-classic-to-rhsm
Could not read legacy system id at /etc/sysconfig/rhn/systemid

Environment

  • Red Hat Satellite 5.6/5.7

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In