Keycloak database H2 reference

1,266 views
Skip to first unread message

Roberto

unread,
Oct 11, 2022, 9:24:22 AM10/11/22
to Keycloak User
Hi all,

I am using Keycloak 19.0.1 based on Quarkus distribution and Keycloak initializes the Database for whatever schema changes has to be done. I had not change the default database configuration, in this way i expected to connect to the db via H2 Console using this parameters:

Driver Class: org.h2.Driver
JDBC URL: jdbc:h2:file:c:/keycloak-19.0.1/data/h2/keycloakdb;AUTO_SERVER=TRUE
Username: sa
Password: sa

When i try to connect i receive the below error:

Wrong user name or password [28000-199] 28000/28000 (Aiuto)
org.h2.jdbc.JdbcSQLException: Wrong user name or password [28000-197]
    at org.h2.message.DbException.getJdbcSQLException(DbException.java:357)
    at org.h2.message.DbException.get(DbException.java:179)
    at org.h2.message.DbException.get(DbException.java:155)
    at org.h2.message.DbException.get(DbException.java:144)
    at org.h2.engine.Engine.validateUserAndPassword(Engine.java:341)
    at org.h2.engine.Engine.createSessionAndValidate(Engine.java:165)
    at org.h2.engine.Engine.createSession(Engine.java:140)
    at org.h2.server.TcpServerThread.run(TcpServerThread.java:155)
    at java.base/java.lang.Thread.run(Thread.java:834)

    at org.h2.message.DbException.getJdbcSQLException(DbException.java:459)
    at org.h2.engine.SessionRemote.done(SessionRemote.java:607)
    at org.h2.engine.SessionRemote.initTransfer(SessionRemote.java:143)
    at org.h2.engine.SessionRemote.connectServer(SessionRemote.java:431)
    at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:348)
    at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:169)
    at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:148)
    at org.h2.Driver.connect(Driver.java:69)
    at org.h2.util.JdbcUtils.getConnection(JdbcUtils.java:299)
    at org.h2.server.web.WebServer.getConnection(WebServer.java:782)
    at org.h2.server.web.WebApp.login(WebApp.java:1004)
    at org.h2.server.web.WebApp.process(WebApp.java:219)
    at org.h2.server.web.WebApp.processRequest(WebApp.java:169)
    at org.h2.server.web.WebThread.process(WebThread.java:139)
    at org.h2.server.web.WebThread.run(WebThread.java:93)
    at java.lang.Thread.run(Unknown Source)

I also have installed Keycloak 18.0.0 Wildfly distribution and this database configuration is working well.

What's wrong on 19.0.1? Why i cannot connect to database?

Roberto

Richard Gathogo

unread,
Oct 12, 2022, 4:42:09 AM10/12/22
to Roberto, Keycloak User

--
You received this message because you are subscribed to the Google Groups "Keycloak User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keycloak-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/keycloak-user/4f3f9d62-fa6c-40c9-a1a6-2253240f6addn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages