Running Keycloak 18.0.2 build from quay.io, a few integrations added.
If I start the docker image with “start” (sudo docker run -d -e DB_VENDOR=postgres -e KC_DB_URL=jdbc:postgresql://{aws_rds_postgres_instance}:5432/{db_name} -e DB_PORT=5432 -e DB_DATABASE={db_name} -e DB_USER={db_user) -e DB_PASSWORD={password} -p 8080:8080 --name keycloak_container kc_test_build_js:0.0.14 start), the container fails almost immediately, and I get the following log output:
2023-05-03 23:03:44,304 WARN [io.quarkus.runtime.configuration.ConfigRecorder] (main) Build time property cannot be changed at runtime:
- quarkus.datasource.jdbc.driver is set to ‘org.h2.jdbcx.JdbcDataSource’ but it is build time fixed to ‘org.postgresql.xa.PGXADataSource’. Did you change the property quarkus.datasource.jdbc.driver after building the application?
- quarkus.datasource.health.enabled is set to ‘false’ but it is build time fixed to ‘true’. Did you change the property quarkus.datasource.health.enabled after building the application?
2023-05-03 23:03:45,272 INFO [org.keycloak.quarkus.runtime.hostname.DefaultHostnameProvider] (main) Hostname settings: FrontEnd: , Strict HTTPS: true, Path: , Strict BackChannel: false, Admin: , Port: -1, Proxied: false
2023-05-03 23:03:45,512 WARN [io.agroal.pool] (agroal-11) Datasource ‘’: No suitable driver found for jdbc:postgresql://{aws_rds_postgres_instance}:5432/{db_name}
2023-05-03 23:03:45,519 WARN [org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator] (JPA Startup Thread: keycloak-default) HHH000342: Could not obtain connection to query metadata: java.sql.SQLException: No suitable driver found for jdbc:postgresql://{aws_rds_postgres_instance}:5432/{db_name}
at org.h2.jdbcx.JdbcDataSource.getJdbcConnection(JdbcDataSource.java:191)
at org.h2.jdbcx.JdbcDataSource.getXAConnection(JdbcDataSource.java:352)
at io.agroal.pool.ConnectionFactory.createConnection(ConnectionFactory.java:216)
at io.agroal.pool.ConnectionPool$CreateConnectionTask.call(ConnectionPool.java:513)
at io.agroal.pool.ConnectionPool$CreateConnectionTask.call(ConnectionPool.java:494)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at io.agroal.pool.util.PriorityScheduledExecutor.beforeExecute(PriorityScheduledExecutor.java:75)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1126)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
2023-05-03 23:03:47,255 WARN [io.agroal.pool] (agroal-11) Datasource ‘’: No suitable driver found for jdbc:postgresql://{aws_rds_postgres_instance}:5432/{db_name}
2023-05-03 23:03:47,647 WARN [org.infinispan.CONFIG] (keycloak-cache-init) ISPN000569: Unable to persist Infinispan internal caches as no global state enabled
2023-05-03 23:03:47,657 WARN [org.infinispan.PERSISTENCE] (keycloak-cache-init) ISPN000554: jboss-marshalling is deprecated and planned for removal
2023-05-03 23:03:47,721 INFO [org.infinispan.CONTAINER] (keycloak-cache-init) ISPN000556: Starting user marshaller ‘org.infinispan.jboss.marshalling.core.JBossUserMarshaller’
2023-05-03 23:03:48,060 INFO [org.infinispan.CONTAINER] (keycloak-cache-init) ISPN000128: Infinispan version: Infinispan ‘Triskaidekaphobia’ 13.0.9.Final
2023-05-03 23:03:48,288 INFO [org.infinispan.CLUSTER] (keycloak-cache-init) ISPN000078: Starting JGroups channel ISPN
2023-05-03 23:03:48,288 INFO [org.infinispan.CLUSTER] (keycloak-cache-init) ISPN000088: Unable to use any JGroups configuration mechanisms provided in properties {}. Using default JGroups configuration!
2023-05-03 23:03:48,423 WARN [org.jgroups.protocols.UDP] (keycloak-cache-init) JGRP000015: the send buffer of socket MulticastSocket was set to 1.00MB, but the OS only allocated 212.99KB
2023-05-03 23:03:48,424 WARN [org.jgroups.protocols.UDP] (keycloak-cache-init) JGRP000015: the receive buffer of socket MulticastSocket was set to 20.00MB, but the OS only allocated 212.99KB
2023-05-03 23:03:48,425 WARN [org.jgroups.protocols.UDP] (keycloak-cache-init) JGRP000015: the send buffer of socket MulticastSocket was set to 1.00MB, but the OS only allocated 212.99KB
2023-05-03 23:03:48,426 WARN [org.jgroups.protocols.UDP] (keycloak-cache-init) JGRP000015: the receive buffer of socket MulticastSocket was set to 25.00MB, but the OS only allocated 212.99KB
However, if I start the image with “start-dev” (sudo docker run -d -e DB_VENDOR=postgres -e KC_DB_URL=jdbc:postgresql://{aws_rds_postgres_instance}:5432/{db_name} -e DB_PORT=5432 -e DB_DATABASE={db_name} -e DB_USER={db_user) -e DB_PASSWORD={password} -p 8080:8080 --name keycloak_container kc_test_build_js:0.0.14 start-dev), I get an (apparently) functional keycloak deployment.
Nothing else is different; been over environmental variables, etc. I can go into the container and start it manually, but I get the exact same output; I can only start it using “start-dev” rather than “start”. Been around and around with this, but can’t seem to find a cause. It’s likely I’m missing something obvious; can anyone steer me in the right direction? Thanks!