Common issues with RHN Classic Hosted to RHSM migration of Satellite v 5.6 and v 5.7

Updated

How to Migrate Satellite from RHN to RHSM?

Refer steps from the migration article which contain pre-requisites and steps to migrate.

How to verify whether Red Hat Satellite v 5.x server is successfully migrated from RHN Hosted to RHSM?

Refer article for more details.

Network Ports need to be open to use Red Hat Subscription Manager (RHSM) through a firewall or proxy

Refer How to access Red Hat Subscription Manager (RHSM) through a firewall or proxy

Common Issues

  1. Red Hat Satellite subscription is not available/free or it is not attached to Satellite system.
  • All below issues are due to the fact that Satellite subscription is not free to be attached to Satellite system profile during migration. While Satellite is registered with RHN Hosted, Red Hat Satellite subscription is attached to the Satellite certificate profile. This is not the case with RHSM, so remove the Satellite subscription from Satellite profile under This content is not included.Subscription Management Applications before running rhn-migrate-classic-to-rhsm command.

    If `rhn-migrate-classic-to-rhsm` command completed with below message, then satellite subscription status is **Not Subscribed**:
    
    ```
     Product Name: Red Hat Satellite
     Status:       Not Subscribed
    ```
    
  • Certificate activation failed with below error message:

     ```
     [root@satellite ~]# rhn-satellite-activate -vvv --rhn-cert=satellite.certificate.xml
     RHN_PARENT: satellite.rhn.redhat.com
     HTTP_PROXY: None
     HTTP_PROXY_USERNAME: None
     HTTP_PROXY_PASSWORD: <password>
     CA_CERT: /usr/share/rhn/RHNS-CA-CERT
     Checking cert XML sanity and GPG signature: '/usr/bin/validate-sat-cert.pl --keyring /etc/webapp-keyring.gpg /etc/sysconfig/rhn/rhn-entitlement-cert.xml-ZQIufW'
     Database connection initialized: refer to /etc/rhn/rhn.conf
     Attempting local RHN Certificate push (and therefore activation)
     Enabling of Satellite repository failed.
     Return value: 1
     Standard-out: Error: 'rhel-6-server-satellite-5.7-rpms' does not match a valid repository ID. Use "subscription-manager repos --list" to see valid repositories.
     ```
    
  • Cannot enable Satellite repository on the Satellite system during migration:

     ```
     [root@satellite ~]# subscription-manager repos --enable rhel-*-server-rpms --enable rhel-*-server-satellite-5.*-rpms 
     Error: 'rhel-*-server-satellite-5.*-rpms' does not match a valid repository ID. Use "subscription-manager repos --list" to see valid repositories.
     Repository 'rhel-6-server-rpms' is enabled for this system.
     ```
    

    Resolution: In all above 3 cases, we need to confirm that Red Hat Satellite subscription is available in the account and it is not consumed by any other system profile.

  • Confirm whether Red Hat Satellite subscription is attached to the satellite profile using below commands:

     ```
     # subscription-manager list --consumed 
     +-------------------------------------------+
        Consumed Subscriptions
     +-------------------------------------------+
     Subscription Name:   Red Hat Satellite 
     Provides:            Red Hat Satellite
     .
     .
     ```
    
  • Confirm whether the RHEL Base and Satellite repository is enabled or not

     ```
     # yum repolist 
     Loaded plugins: product-id, search-disabled-repos, security, subscription-manager
     rhel-6-server-rpms                                                                                                                                    | 3.5 kB     00:00     
     rhel-6-server-satellite-5.7-rpms                                                                                                                      | 3.4 kB     00:00     
     repo id                                                                    repo name                                                                                   status
     rhel-6-server-rpms                                                         Red Hat Enterprise Linux 6 Server (RPMs)                                                    19,577
     rhel-6-server-satellite-5.7-rpms                                           Red Hat Satellite 5.7 (for RHEL 6 Server) (RPMs)                                               623
     ```
    
  • If the required Red Hat Satellite subscription is not attached and repositories are not enabled then follow below steps:

     ```
     a. Open [systems](https://access.redhat.com/management/consumers?type=system) profiles on the customer  portal
     b. Find the Satellite system profile here, click to open the profile details
     c. Click on `Attach a subscription`. (If there is any other subscriptions attached remove it)
     d. Select `Satellite subscription` and click on 'ATTACH SELECTED' button.   
     ```
    
  • Try to enable RHEL base and satellite repository:

     **For RHEL 6 + Satellite v 5.6**
    
    
     ```
     # subscription-manager repos --enable rhel-6-server-rpms --enable rhel-6-server-satellite-5.6-rpms 
     ```
    
    
     **For RHEL 6 + Satellite v 5.7**
    
    
     ```
     # subscription-manager repos --enable rhel-6-server-rpms --enable rhel-6-server-satellite-5.7-rpms 
     ```
    
  1. Certificate activation failed with error after migration from RHN to RHSM:
  • Certificate activation error:

     ```
     [root@satellite ~]# rhn-satellite-activate -vvv --rhn-cert=satellite.certificate.xml
     RHN_PARENT: satellite.rhn.redhat.com
     HTTP_PROXY: None
     HTTP_PROXY_USERNAME: None
     HTTP_PROXY_PASSWORD: <password>
     CA_CERT: /usr/share/rhn/RHNS-CA-CERT
     Checking cert XML sanity and GPG signature: '/usr/bin/validate-sat-cert.pl --keyring /etc/webapp-keyring.gpg /etc/sysconfig/rhn/rhn-entitlement-cert.xml-JmfFI0'
     Database connection initialized: refer to /etc/rhn/rhn.conf
     Attempting local RHN Certificate push (and therefore activation)
     ERROR: Server not registered? No systemid: /etc/sysconfig/rhn/systemid
     ```
    
     OR 
    
     ```
     # rhn-satellite-activate --rhn-cert=/path/to/cert.xml -vvv
     RHN_PARENT: satellite.rhn.redhat.com
     HTTP_PROXY: proxy.example.com
     HTTP_PROXY_USERNAME: username
     HTTP_PROXY_PASSWORD: password
     CA_CERT: /usr/share/rhn/RHNS-CA-CERT
     Checking cert XML sanity and GPG signature: '/usr/bin/validate-sat-cert.pl --keyring /etc/webapp-keyring.gpg /etc/sysconfig/rhn/rhn-entitlement-cert.xml'
     Database connectioned initialized: refer to /etc/rhn/rhn.conf
     Attempting local RHN Certificate push (and therefore activation)
     ERROR: Server not registered to RHSM? No identity found.
     ```
    

    Resolution: Lower version of spacewalk-backend packages causes this issue. Upgrade the satellite server to latest version and try again.
    * For Satellite 5.7 users, required version is:

     ```
     [root@satellite ~]# rpm -q spacewalk-backend
     spacewalk-backend-2.3.3-46.el6sat.noarch
     ```
    
    
     *  For Satellite 5.6 users:
    
    
     ```
     [root@satellite ~]# rpm -q spacewalk-backend
     spacewalk-backend-2.0.3-42.el6sat.noarch
     ```
    
    
     Follow the instructions from article [ Preparing Satellite 5 systems for Red Hat Network's End of Life](https://access.redhat.com/articles/2884191). For more details refer [Satellite 5.x Certificate Activation Fails with ERROR: Server not registered to RHSM? No identity found.](https://access.redhat.com/solutions/2962051)
    
  1. satellite-sync fails with Error Class Code: 31 after migrating Satellite server from RHN Classic to RHSM:

    • Certificate activation error:
    ERROR: there was a problem synchronizing the information.
          Error message: ERROR: this server must be registered with RHN.
    

    or

    # satellite-sync -l
    21:50:08 Red Hat Satellite - live synchronization
    21:50:08    url: https://satellite.rhn.redhat.com
    21:50:08    debug/output level: 1
    ERROR: there was a problem synchronizing the information.
           Error message:
    Error Message:
        Service not enabled for system profile: "satellite.example.com"
    Error Class Code: 31
    Error Class Info:
         This system does not have a valid entitlement for Red Hat Network.
         Please visit https://rhn.redhat.com/rhn/systems/SystemEntitlements.do
         or login at https://rhn.redhat.com, and from the "Your RHN" tab,
         select "Subscription Management" to enable RHN service for this system.
    

Resolution: Need to confirm whether satellite server profile is properly migrated to RHSM and satellite certificate is activated successfully. For more details refer Satellite Sync Fails after Recently Migrating Satellite System from RHN to RHSM

  1. Registering System to RHSM or Migrating System from RHN to RHSM Gives Error System certificates corrupted. Please reregister.
  1. While activating satellite certificate after RHN to RHSM migration, it fails with error Error Class Code: 2 Error Class Info: Invalid username and password combination
  • Error while running rhn-satellite-activate --rhn-cert=/path/to/cert.xml command:

     ```
     RHN_PARENT: satellite.rhn.redhat.com
     HTTP_PROXY: None
     HTTP_PROXY_USERNAME: None
     HTTP_PROXY_PASSWORD: <password>
     CA_CERT: /usr/share/rhn/RHNS-CA-CERT
     Checking cert XML sanity and GPG signature: '/usr/bin/validate-sat-cert.pl --keyring /etc/webapp-keyring.gpg /etc/sysconfig/rhn/rhn-entitlement-cert.xml-TyPUGN'
     Database connectioned initialized: refer to /etc/rhn/rhn.conf
     Attempting local RHN Certificate push (and therefore activation)
     Executing: remote XMLRPC activation call.
     Error reported from RHN: <Fault -2: 'unhandled internal exception: \nError Message:\n    Invalid username provided when registering system\nError Class Code: 2\nError Class Info:
     Invalid                      
     username and password combination.\n\n     If you are using email address as a login, try using your associated\n     login name instead.\nExplanation: \n     An error has occurred
     while processing your request. If this problem\n     persists please enter a bug report at bugzilla.redhat.com.\n     If you choose to submit the bug report, please be sure to include\n 
     details of what you were trying        to do when this error occurred and\n     details on how to reproduce this problem.\n'>
     ```
    

    Resolution: Need to unregister and register the system again to the customer portal with user login name instead of email address. Refer below article for more details: While activating satellite certificate after RHN to RHSM migration, it fails with error Error Class Code: 2 Error Class Info: Invalid username and password combination

  1. Migration fails with SSL certificate verify failed error in /var/log/rhsm/rhsm.log file.
  • Error while running rhn-migrate-classic-to-rhsm command:

     ```
     2017-03-24 19:37:47,782 [ERROR] rhn-migrate-classic-to-rhsm @migrate.py:367 - Traceback (most recent call last):
       File "/usr/share/rhsm/subscription_manager/migrate/migrate.py", line 364, in connect_to_rhn
         sk = sc.auth.login(credentials.username, credentials.password)
       File "/usr/lib/python2.4/site-packages/rhn/rpclib.py", line 654, in __call__
         return self._send(self._name, args)
       File "/usr/lib/python2.4/site-packages/rhn/rpclib.py", line 386, in _request
         self._handler, request, verbose=self._verbose)
       File "/usr/lib/python2.4/site-packages/rhn/transports.py", line 175, in request
         headers, fd = req.send_http(host, handler)
       File "/usr/lib/python2.4/site-packages/rhn/transports.py", line 727, in send_http
         headers=self.headers)
       File "/usr/lib64/python2.4/httplib.py", line 810, in request
         self._send_request(method, url, body, headers)
       File "/usr/lib64/python2.4/httplib.py", line 833, in _send_request
         self.endheaders()
       File "/usr/lib64/python2.4/httplib.py", line 804, in endheaders
         self._send_output()
       File "/usr/lib64/python2.4/httplib.py", line 685, in _send_output
         self.send(msg)
       File "/usr/lib64/python2.4/httplib.py", line 664, in send
         self.sock.sendall(str)
       File "/usr/lib/python2.4/site-packages/rhn/SSL.py", line 217, in write
         sent = self._connection.send(data)
     Error: [('SSL routines', 'SSL3_GET_SERVER_CERTIFICATE', 'certificate verify failed')]
     ```
    

    Resolution: Update the up2date configuration file with correct SSL certificate path, if satellite is registered with RHN Classic then make sure the sslCACert path in /etc/sysconfig/rhn/up2date file is:

     ```
     sslCACert=/usr/share/rhn/RHNS-CA-CERT
     ```
    
  1. *** Red Hat Satellite 5 migration from RHN to RHSM failed with error: "returned status 404" ***
  • Error in the /var/log/rhsm/rhsm.log file:

     ```
     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
     ```
    

    Resolution: Need to follow steps from the article Red Hat Satellite 5 migration from RHN to RHSM failed with error "returned status 404"

Category
Article Type