Repository sync or Content-view publish task fails with error 'PulpRpmClient::ApiError: Error message: the server returns an error' in Red Hat Satellite 6.

Solution Verified - Updated

Environment

  • Red Hat Satellite 6.10
  • Red Hat Satellite 6.11
  • Red Hat Satellite 6.12
  • Red Hat Satellite 6.13

Issue

  • While synchronizing one or more large repositories or publishing a content-view that has multiple large repositories, The task fails with following error:

       PulpRpmClient::ApiError
    
       Error message: the server returns an error
    
  • The dynflow console of the concerned task shows that the failure has been noticed on the Actions::Katello::Repository::IndexContent step.

  • Large ContentVeiw version import failing in a disconnected Satellite

Resolution

  • This issue has been reported to the Red Hat Engineering team via This content is not included.Bugzilla 2033853 and the investigation is ongoing.

  • Meanwhile, to work around the problem, adjust the value of the Pulp bulk load size settings from the Satellite UI --> Administer --> Settings --> Content page or via hammer_cli.

    • By default, the value is set to 2000 which could be too much for the Pulp API to handle, and hence try reducing it to 500 or 700.

             ** Check the current value
             # hammer settings list --search "name = bulk_load_size"
      
             ** Update it to recommended value
             # hammer settings set --name bulk_load_size --value 700
      
             ** Check back if the value got updated successfully or not.
             # hammer settings list --search "name = bulk_load_size"
      
    • The minimum value tested to be working is 250.

    • If the error is still there when the value set to 500 or 700, try 250.

  • It is also recommended to increase the value of Polling intervals multiplier so that foreman_tasks will not try to poll the task status from Pulp too frequently and it helps to reduce the stress on API as well.

    • For Red Hat Satellite 6.10 & 6.11:
    Satellite UI --> Administer --> Settings --> ForemanTasks --> Polling intervals multiplier -> Set the value to 10
    
    • For Red Hat Satellite 6.12 & 6.13:
    Satellite UI --> Administer --> Settings --> Tasks --> Polling intervals multiplier -> Set the value to 10
    

 

  • Once done, retry the same repository sync or content-view publish action which was failing earlier and observe the progress.

  • Reach out to the This content is not included.Red Hat Technical Support in case of any further concerns regarding the problem or the resolution proposed.

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

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

Diagnostic Steps

  • The following types of traceback have been logged inside the /var/log/foreman/production.log file of the Red Hat Satellite server.

    • Here the Index operation on Rpms failed directly at the Actions::Katello::Repository::IndexContent step.

      2022-01-25T09:54:32 [I|app|c8f8a253] CONTENT_INDEX type=Katello::Rpm success=false duration=60030.92
      2022-01-25T09:54:32 [E|bac|c8f8a253] Error message: the server returns an error (PulpRpmClient::ApiError)
       c8f8a253 | /opt/theforeman/tfm/root/usr/share/gems/gems/pulp_rpm_client-3.13.3/lib/pulp_rpm_client/api_client.rb:90:in `rescue in call_api'
       c8f8a253 | /opt/theforeman/tfm/root/usr/share/gems/gems/pulp_rpm_client-3.13.3/lib/pulp_rpm_client/api_client.rb:68:in `call_api'
       c8f8a253 | /opt/theforeman/tfm/root/usr/share/gems/gems/pulp_rpm_client-3.13.3/lib/pulp_rpm_client/api/content_packages_api.rb:236:in `list_with_http_info'
       c8f8a253 | /opt/theforeman/tfm/root/usr/share/gems/gems/pulp_rpm_client-3.13.3/lib/pulp_rpm_client/api/content_packages_api.rb:130:in `list'
       c8f8a253 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.1.1.39/app/services/katello/pulp3/pulp_content_unit.rb:93:in `content_unit_list'
       c8f8a253 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.1.1.39/app/services/katello/pulp3/pulp_content_unit.rb:106:in `fetch_content_list'
       c8f8a253 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.1.1.39/app/services/katello/pulp3/pulp_content_unit.rb:75:in `block (2 levels) in pulp_units_batch_for_repo'
       c8f8a253 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.1.1.39/app/services/katello/pulp3/pulp_content_unit.rb:69:in `loop'
       c8f8a253 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.1.1.39/app/services/katello/pulp3/pulp_content_unit.rb:69:in `block in pulp_units_batch_for_repo'
       c8f8a253 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.1.1.39/app/models/katello/concerns/pulp_database_unit.rb:164:in `each'
       c8f8a253 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.1.1.39/app/models/katello/concerns/pulp_database_unit.rb:164:in `import_for_repository'
       c8f8a253 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.1.1.39/app/models/katello/repository.rb:916:in `block (2 levels) in index_content'
       c8f8a253 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.1.1.39/app/lib/katello/logging.rb:8:in `time'
       c8f8a253 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.1.1.39/app/models/katello/repository.rb:915:in `block in index_cont
      
    • Here the Index operation on Rpms was successful but It failed on Module Streams at the Actions::Katello::Repository::IndexContent step

      2021-12-16T11:43:50 [I|app|7d9995b6] CONTENT_INDEX type=Katello::Rpm success=true duration=374868.78
      2021-12-16T11:44:50 [I|app|7d9995b6] CONTENT_INDEX type=Katello::ModuleStream success=false duration=60115.67
      2021-12-16T11:44:50 [E|bac|7d9995b6] Error message: the server returns an error (PulpRpmClient::ApiError)
       7d9995b6 | /opt/theforeman/tfm/root/usr/share/gems/gems/pulp_rpm_client-3.13.3/lib/pulp_rpm_client/api_client.rb:90:in `rescue in call_api'
       7d9995b6 | /opt/theforeman/tfm/root/usr/share/gems/gems/pulp_rpm_client-3.13.3/lib/pulp_rpm_client/api_client.rb:68:in `call_api'
       7d9995b6 | /opt/theforeman/tfm/root/usr/share/gems/gems/pulp_rpm_client-3.13.3/lib/pulp_rpm_client/api/content_modulemds_api.rb:231:in `list_with_http_info'
       7d9995b6 | /opt/theforeman/tfm/root/usr/share/gems/gems/pulp_rpm_client-3.13.3/lib/pulp_rpm_client/api/content_modulemds_api.rb:161:in `list'
       7d9995b6 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.1.1.39/app/services/katello/pulp3/pulp_content_unit.rb:93:in `content_unit_list'
       7d9995b6 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.1.1.39/app/services/katello/pulp3/pulp_content_unit.rb:106:in `fetch_content_list'
       7d9995b6 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.1.1.39/app/services/katello/pulp3/pulp_content_unit.rb:75:in `block (2 levels) in pulp_units_batch_for_repo'
       7d9995b6 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.1.1.39/app/services/katello/pulp3/pulp_content_unit.rb:69:in `loop'
       7d9995b6 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.1.1.39/app/services/katello/pulp3/pulp_content_unit.rb:69:in `block in pulp_units_batch_for_repo'
       7d9995b6 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.1.1.39/app/models/katello/concerns/pulp_database_unit.rb:164:in `each'
       7d9995b6 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.1.1.39/app/models/katello/concerns/pulp_database_unit.rb:164:in `import_for_repository'
       7d9995b6 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.1.1.39/app/models/katello/repository.rb:916:in `block (2 levels) in index_content'
      
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.