Why am I getting "Duplicate entry 'master-<username>' for key 'UK_RU8TT6T700S9V50BU18WS5HA6'" error?

Solution Unverified - Updated -

Issue

I run RH-SSO on Openshift and I found "Duplicate entry 'master-' for key 'UK_RU8TT6T700S9V50BU18WS5HA6'" error is logged.
What is the issue?

Example log:

[0m[0m04:30:33,009 INFO  [org.keycloak.services] (ServerService Thread Pool -- 55) KC-SERVICES0006: Importing users from '/opt/eap/standalone/configuration/keycloak-add-user.json'
[0m[33m04:30:33,173 WARN  [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (ServerService Thread Pool -- 55) SQL Error: 1062, SQLState: 23000
[0m[31m04:30:33,173 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (ServerService Thread Pool -- 55) Duplicate entry 'master-<username>' for key 'UK_RU8TT6T700S9V50BU18WS5HA6'
[0m[31m04:30:33,184 ERROR [org.keycloak.services] (ServerService Thread Pool -- 55) KC-SERVICES0010: Failed to add user '<username>' to realm 'master': user with username exists

Environment

  • Red Hat Single Sign On (RH-SSO) on OpenShift
    • 7.x

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