All,
I am new to keycloak. I failed to run keycloak with mysql with docker command.
The command I used:
The Error I got:
2025-08-28 01:49:52,934 DEBUG [io.quarkus.hibernate.orm.runtime.FastBootHibernatePersistenceProvider] (JPA Startup Thread) No PersistenceProvider explicitly requested, assuming Hibernate 2025-08-28 01:49:53,327 DEBUG [io.quarkus.agroal.runtime.DataSources] (JPA Startup Thread) Started datasource <default> connected to jdbc:mysql://
127.0.0.1:3306/keycloak?serverTimezone=Asia/Shanghai&useSSL=false&allowPublicKeyRetrieval=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&connectTimeout=30000 2025-08-28 01:49:53,403 DEBUG [org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl] (JPA Startup Thread) `hibernate.connection.provider_disables_autocommit` was enabled. This setting should only be enabled when you are certain that the Connections given to Hibernate by the ConnectionProvider have auto-commit disabled. Enabling this setting when the Connections do not have auto-commit disabled will lead to Hibernate executing SQL operations outside of any JDBC/SQL transaction. 2025-08-28 01:49:54,068 WARN [io.agroal.pool] (agroal-11) Datasource '<default>': Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server. 2025-08-28 01:49:54,082 WARN [org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator] (JPA Startup Thread) HHH000342: Could not obtain connection to query metadata: org.hibernate.exception.JDBCConnectionException: unable to obtain isolated JDBC connection [Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.] [n/a] at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:100) at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:58)
When I use tcpdump to check the possible reason of connection error, I got nothing. So it seems the container didn't even try connect before it declares failure.
please note the same docker command could boot up the container successfully on ubuntu 22.04 running in VMware player.
BR
/Li