Keycloak H2 login failure: constraint already exists

Viewed 861

we are using keycloak with an h2 database. This went pretty well until yesterday, when keycloak could not connect to the h2 database anymore all for sudden throwing:

Constraint "FK_OUSE064PLMLR732LXJCN1Q5F1" already exists; SQL 
statement: ALTER TABLE PUBLIC.SCOPE_MAPPING ADD CONSTRAINT 
PUBLIC.FK_OUSE064PLMLR732LXJCN1Q5F1 FOREIGN KEY(CLIENT_ID) INDEX 
PUBLIC.FK_OUSE064PLMLR732LXJCN1Q5F1_INDEX_8 REFERENCES 
PUBLIC.CLIENT(ID) NOCHECK [90045-196] 

I replicated the *.mv.db file and tried to connect locally using razorsql, running in the same issue. Since i cannot connect to the db i cannot fix it either. This seems to be a deadlock somehow. Any ideas how to fix it or what to test?

0 Answers
Related