rapidfort / community-images

:gem: RapidFort hardened secure images
https://www.rapidfort.com
MIT License
214 stars 40 forks source link

[Bug]: Keycloak JDBC #436

Open EriTang opened 9 months ago

EriTang commented 9 months ago

Name and Version

rapidfort/keycloak-official:latest

Which runtime are you using to reproduce this issue?

Is this issue reproducible on the original source image?

Reproducible

Could you please identify the category? Details in TROUBLE_SHOOTING.md

Source image error

What steps will reproduce the bug?

KC_DB_URL=jdbc:mysql://my-database-ip:3306/keycloak

Are you using any custom parameters or values?

No response

What is the expected behavior?

No response

What do you see instead?

2024-01-25 12:20:19,967 WARN [io.quarkus.runtime.configuration.ConfigRecorder] (main) Build time property cannot be changed at runtime:

2024-01-25 12:20:20,594 INFO [org.keycloak.quarkus.runtime.hostname.DefaultHostnameProvider] (main) Hostname settings: FrontEnd: auth.momoeri.jp, Strict HTTPS: true, Path: , Strict BackChannel: false, Admin: , Port: -1, Proxied: true

2024-01-25 12:20:20,952 WARN [io.agroal.pool] (agroal-11) Datasource '': No suitable driver found for jdbc:mysql://database-ip:3306/keycloak

2024-01-25 12:20:20,954 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:mysql://database-ip:3306/keycloak

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)

2024-01-25 12:20:22,737 WARN [org.infinispan.PERSISTENCE] (keycloak-cache-init) ISPN000554: jboss-marshalling is deprecated and planned for removal

2024-01-25 12:20:22,801 WARN [org.infinispan.CONFIG] (keycloak-cache-init) ISPN000569: Unable to persist Infinispan internal caches as no global state enabled

2024-01-25 12:20:22,840 INFO [org.infinispan.CONTAINER] (keycloak-cache-init) ISPN000556: Starting user marshaller 'org.infinispan.jboss.marshalling.core.JBossUserMarshaller'

2024-01-25 12:20:23,245 INFO [org.infinispan.CONTAINER] (keycloak-cache-init) ISPN000128: Infinispan version: Infinispan 'Triskaidekaphobia' 13.0.8.Final

2024-01-25 12:20:23,515 INFO [org.infinispan.CLUSTER] (keycloak-cache-init) ISPN000078: Starting JGroups channel ISPN

2024-01-25 12:20:23,515 INFO [org.infinispan.CLUSTER] (keycloak-cache-init) ISPN000088: Unable to use any JGroups configuration mechanisms provided in properties {}. Using default JGroups configuration!

2024-01-25 12:20:23,693 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

2024-01-25 12:20:23,695 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

2024-01-25 12:20:23,696 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

2024-01-25 12:20:23,697 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

2024-01-25 12:20:25,730 INFO [org.jgroups.protocols.pbcast.GMS] (keycloak-cache-init) e5c5edc18b24-49994: no members discovered after 2005 ms: creating cluster as coordinator

2024-01-25 12:20:25,749 INFO [org.infinispan.CLUSTER] (keycloak-cache-init) ISPN000094: Received new cluster view for channel ISPN: [e5c5edc18b24-49994|0] (1) [e5c5edc18b24-49994]

2024-01-25 12:20:25,759 INFO [org.infinispan.CLUSTER] (keycloak-cache-init) ISPN000079: Channel ISPN local address is e5c5edc18b24-49994, physical addresses are [172.23.0.2:43854]

2024-01-25 12:20:26,738 INFO [org.keycloak.connections.infinispan.DefaultInfinispanConnectionProviderFactory] (main) Node name: e5c5edc18b24-49994, Site name: null

2024-01-25 12:20:26,745 WARN [io.agroal.pool] (agroal-11) Datasource '': No suitable driver found for jdbc:mysql://database-ip:3306/keycloak

2024-01-25 12:20:26,784 INFO [org.infinispan.CLUSTER] (main) ISPN000080: Disconnecting JGroups channel ISPN

2024-01-25 12:20:26,889 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: Failed to start server in (production) mode

2024-01-25 12:20:26,891 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: Failed to obtain JDBC connection

2024-01-25 12:20:26,892 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: No suitable driver found for jdbc:mysql://database-ip:3306/keycloak

2024-01-25 12:20:26,892 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) For more details run the same command passing the '--verbose' option. Also you can use '--help' to see the details about the usage of the particular command.

Additional information

It works correctly when using keycloak/keycloak:latest

codervinod commented 7 months ago

@Kirandeep-Singh-Khehra can you please take care of the issue