Capsule sync fails with "duplicate key value violates unique constraint "core_repositoryversion_repository_id_number_XXXXX_uniq" error

Solution Verified - Updated -

Issue

  • Getting following error when synchronizing Capsule.

    duplicate key value violates unique constraint "core_repositoryversion_repository_id_number_xxxxx_uniq"
    DETAIL:  Key (repository_id, number)=(xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, 1) already exists.
    Could not lookup a publication_href for repo 176
    
    insert or update on table "core_repositorycontent" violates foreign key constraint "core_repositoryconte_version_added_id_xxxxx_fk_core_repo"
    DETAIL:  Key (version_added_id)=(xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) is not present in table "core_repositoryversion".
    Could not lookup a publication_href for repo 181
    
    insert or update on table "core_repositorycontent" violates foreign key constraint "core_repositoryconte_version_added_id_xxxxx_fk_core_repo"
    DETAIL:  Key (version_added_id)=(xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) is not present in table "core_repositoryversion".
    Could not lookup a publication_href for repo 184
    

Environment

  • Red Hat Satellite 6.10 and 6.11

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content