Skip to content

Manually fix: Transaction error on scim sdk server database initialization

Pascal Knüppel edited this page Sep 24, 2022 · 1 revision

This error is a race condition problem within keycloak and it was already reported: https://github.com/keycloak/keycloak/issues/14570.

This error will be logged with version kc-18-b2 but it will not prevent the startup anymore.

What happens if the error is ignored?

Actually nothing bad.

Basically the access-management for the webadmin-console will no longer be initialized: https://github.com/Captain-P-Goldfish/scim-for-keycloak#grant-management-access-for-configuration

The necessary client-role scim-admin to configure the SCIM endpoints will be missing and and users other than the admin-user will not be able to configure the SCIM endpoints within the realms they have access to.

Each realm (except the master realm) has a client named realm-management in the master realm the client is named master-realm. For those clients a client role is created with the name scim-admin. This role can be assigned to users other than the admin-user to be alowed to configure the SCIM endpoints. (The admin-user of the master realm has still access to all SCIM endpoints within all realms because this user does possess the admin-role of the master-realm).

How to fix this manually

If this error occurs. You have three options.

  1. ignore it
  2. start the server over and over again until you've won the race condition at least once and you are good to go. But if the error occured on startup all new created realms will suffer from this problem again.
  3. create the client-role scim-admin manually as described above and assign these roles to the users you might think who should be able to configure the SCIM endpoints besides the admin-user of the master-realm.