Manifest Refresh fails with Invalid credentials or RestClient::BadRequest: 400 Bad Request error in Red Hat Satellite 6

Solution Verified - Updated

Environment

  • Red Hat Satellite 6

Issue

  • The Manifest refresh task is not getting completed successfully and failing with the following error.

    2020-04-10T10:46:41 [I|app|] Current user set to admin (admin)
    2020-04-10T10:46:42 [E|bac|] Invalid credentials. (Katello::Errors::CandlepinError) /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.10.0.59/app/lib/actions/middleware/propagate_candlepin_errors.rb:21:in `rescue in propagate_candlepin_errors'
    /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.10.0.59/app/lib/actions/middleware/propagate_candlepin_errors.rb:18:in `propagate_candlepin_errors'
    /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.10.0.59/app/lib/actions/middleware/propagate_candlepin_errors.rb:9:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.1.6.1/lib/dynflow/middleware/stack.rb:22:in `call'
    /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.1.6.1/lib/dynflow/middleware/stack.rb:26:in `pass'
    /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.1.6.1/lib/dynflow/middleware.rb:18:in `pass'
    
  • In some scenarios, when navigating to GUI --> Content --> Subscriptions or performing Manifest Refresh the following error is being displayed.

    RestClient::BadRequest: 400 Bad Request
    

Resolution

Workaround Solution

  • As a current workaround, follow the steps as mentioned below.

    • Navigate to the This content is not included.Red Hat Customer Portal and download a new zip file for the existing subscription-allocation/manifest of the Red Hat Satellite server. OR

      • Satellite UI -> Content -> Subscriptions -> Manage Manifest -> USMA : (click on the profile hyperlink)
    • Navigate to the following path and upload the new zip file to the Red Hat Satellite server.

    ```
    Satellite GUI -->  Content --> Subscriptions --> Manage Manifest --> Click on "Browse"  or "Choose File" --> Select the newly downloaded zip file for the manifest.
    ```
    
    
    **NOTE:** It should not be attempted to delete the manifest from the Red Hat Satellite GUI by clicking on the `Delete` button on the Manifest page or else the client hosts will get unsubscribed from the Red Hat Satellite server.
    

For more KB articles/solutions related to Red Hat Satellite 6.x Manifest Issues, please refer to the Consolidated Troubleshooting Article for Red Hat Satellite 6.x Manifest Issues

Root Cause

  • The upstream idCert is generated by the Upstream Candlepin (Customer Portal) and attached to the Manifest. The Upstream Candlepin will renew/regenerate the idCert if it is going to expired in 90 days when the Satellite is contacting the Customer Portal, such as refreshing manifest and add/remove subscription through the Satellite Web UI. Therefore, the renewal of the idCert can be missed with any of the following reasons:
    • The Satellite never contact the Customer Portal for more than a year, such as No manifest refresh is performed or add/remove subscriptions
    • The Satellite last contacted with the Customer Portal was more than 90 days before the idCert expired so Upstream Candlepin didn't renew it.

Diagnostic Steps

  • Log in to the Satellite GUI and navigate to Monitor --> Tasks and open the Refresh Manifest task which is stopped with warning.

  • Click on the Dynflow Console button, go to that tab called Run and expand the first action by the name Actions::Candlepin::Owner::UpstreamUpdate and look for the field expiration:.

        serial:
          created: '2019-01-24T12:38:00+0000'
          updated: '2019-06-04T11:17:04+0000'
          id: 4251147710546321896
          serial: 4251147710546321896
         expiration: '2020-01-24T12:38:00+0000'
          collected: false
          revoked: false
    
  • As It can be observed, the expiration date is set to 2020-01-24 in the example output, which means after that date any attempt of refreshing the manifest will fail and that will also affect the repository synchronization tasks as well.

SBR
Product(s)
Components
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.