[Satellite 6] Manifest refresh/import fails with 'Entity version collision detected'
Environment
- Satellite 6
Issue
- Unable to import/refresh Satellite manifest, the action fails with the following error:
Entity version collision detected
Error:
Katello::Errors::CandlepinError
org.candlepin.async.JobExecutionException: Unexpected exception occured while executing transactional block
Resolution
- This issue has been fixed in Red Hat Satellite 6.12 based on This content is not included.Bug 2122945.
- The following workaround applies to
Red Hat Satellite6.10 and 6.11. Before proceeding further make sure that you have a working Satellite backup/snapshot:
1) Stop all services but postgresql:
# satellite-maintain service stop --exclude postgresql
2) Execute the following commands on your Satellite:
# echo "UPDATE cp2_products SET entity_version = NULL;" | su - postgres -c "psql candlepin"
# echo "UPDATE cp2_content SET entity_version = NULL;" | su - postgres -c "psql candlepin"
3) Restart Satellite services:
# satellite-maintain service restart
4) Start new manifest refresh/import.
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
- This specific error can happen for more than one reason.
- One of the reasons causing this error has been fixed by This content is not included.Bug 2086683 - Actions::Candlepin::Owner::Import failing with "Entity version collision detected"
- This content is not included.Bug 2122945 - Satellite manifest upload/import error: Unexpected exception occurred while executing transactional block addressed the rest of the reasons behind this specific error.
Diagnostic Steps
- Following errors can be found in
/var/log/candlepin/error.log:
2022-05-17 15:22:38,962 [thread=Thread-131 (ActiveMQ-client-global-threads)] [job=00565e1d80d1383a0180d1f8657a0099, job_key=ImportJob, org=<organization_name>, csid=XXX-XXX-XXX-XXX-XXX] ERROR org.candlepin.controller.refresher.visitors.ProductNodeVisitor - Entity version collision detected: Product [uuid: null, id: RH00050, name: Red Hat Enterprise Linux for Virtual Datacenters, Standard] != Product [uuid: 00565e1d803903fc01803afa615a00cc, id: RH00050, name: Red Hat Enterprise Linux for Virtual Datacenters, Standard]
- Following error trace can be found in manifest refresh/import task details:
Error:
Katello::Errors::CandlepinError
org.candlepin.async.JobExecutionException: Unexpected exception occured while executing transactional block
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.