Content view publish task fails with an error Unable to find content with the ID "XXXX".
Environment
- Red Hat Satellite 6.10
- Red Hat Enterprise Linux (RHEL) 7.x
Issue
-
Red Hat Enterprise Linux (RHEL) 7 Extended Update Support (EUS) repository shows no rpms.
-
When publishing new version of the Content View it ends up with error Unable to find content with the ID "XXXX".
-
From the WebUI [Content >> Products >> Red Hat Enterprise Linux 7 Server- Extended Update Support RH Common_RPMs x86_64
7Server] lists no rpms in the repository and results in the following error:Unable to find content with the ID "###", where ### is candlepin id or repository without content.
Resolution
-
Remove orphaned repository from the affected Content View. This orphaned repository can be found executing below command on the Red Hat Satellite server:
# su - postgres -c "psql foreman -c \"SELECT * FROM katello_contents WHERE cp_content_id = 'XXXX';\"" -
Now, delete the repo by following
SatelliteWebUI ->Content->Content Views-> Click on Affected Content View -> Select Orphaned Repository -> Click onRemove Repositories.
You might come across below error while or after deleting the orphaned repo:Required lock is already taken by other running tasks. Please inspect their state, fix their errors and resume them. Conflicts with tasks: https://satellite.example.com/foreman_tasks/tasks/XXXX- In such case, go to the conflicting tasks:
SatelliteWeb UI ->Monitor->Tasks-> Select the Task. - Click on
DynFlow Consoleand checkFinalizesub-tasks. - Skip the
ERRORsub-task &ResumetaskStatusagain.
- In such case, go to the conflicting tasks:
-
There can be another issue observed while deleting an orphaned repository with the error
Katello::Errors::CandlepinError: Unable to find content with the ID XXX. To troubleshoot this issue refer the steps mentioned in article 6654081. -
Another command to find the particular repository:
# su - postgres -c "psql candlepin -c \"select uuid, content_id, contentUrl, label, type, vendor from cp2_content where content_id = '###'\""
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
Root Cause
- Content View (CV) is not in sync with Satellite repository. Therefore, there is nothing available to publish.
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.