[Satellite 6.2] Satellite upgrade fails with "duplicate key value violates unique constraint" error

Solution Verified - Updated -


  • Red Hat Satellite 6.1.9 upgrade fails with the following error:
Upgrade Step: fix_katello_settings_file...
Upgrade Step: migrate_foreman...

[ERROR 2016-08-10 08:22:41 main] rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:

PG::Error: ERROR:  duplicate key value violates unique constraint "katello_subscription_facet_activation_keys_sa_ak_id"
DETAIL:  Key (subscription_facet_id, activation_key_id)=(45, 8) already exists.
: INSERT INTO "katello_subscription_facet_activation_keys" ("activation_key_id", "subscription_facet_id") VALUES ($1, $2) RETURNING "id"/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/postgresql_adapter.rb:834:in `get_last_result'


  • Red Hat Satellite 6.2
  • Red Hat Satellite 6.1.9

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In