containers icon indicating copy to clipboard operation
containers copied to clipboard

No suitable driver found for jdbc:postgresql on bitnami/keycloak:18.0.2-debian-11-r3 and bitnami/keycloak:18.0.2-debian-11-r4

Open EStork09 opened this issue 2 years ago • 10 comments

Name and Version

bitnami/keycloak:18.0.2-debian-11-r3

What steps will reproduce the bug?

  1. Running in the kubernetes environment with the 9.4.0 helm chart
  2. Using the config with the standalone postgresql db
  3. With image bitnami/keycloak:18.0.2-debian-11-r3 (and also bitnami/keycloak:18.0.2-debian-11-r4)
  4. We see this error "No suitable driver found for jdbc:postgresql://keycloak-postgresql:5432/bitnami_keycloak?currentSchema=public" and the container fails to start

What is the expected behavior?

keycloak should start up and pass healthchecks

What do you see instead?

No suitable driver found for jdbc:postgresql://keycloak-postgresql:5432/bitnami_keycloak?currentSchema=public

Additional information

We rolled back to r0 for the time being, but it looks like the driver got removed in the newer versions?

EStork09 avatar Jul 07 '22 16:07 EStork09

We have the same problem with every 18.0.2 release. Only solution for us was to roll back to 18.0.1.

sapphic-kitten avatar Jul 09 '22 11:07 sapphic-kitten

Similar experience here. Oddly enough, killing the Pod multiple times still managed to get it running 🤷‍♂️

tamcore avatar Jul 11 '22 05:07 tamcore

Hi!

I couldn't reproduce the issue. I installed the 9.4.0 version of the chart with the default values (standalone postgresql) and it worked perfectly. In fact, I can see in the logs the PostgreSQL driver is installed:

2022-07-11 07:40:49,957 INFO  [io.quarkus] (main) Installed features: [agroal, cdi, hibernate-orm, jdbc-h2, jdbc-mariadb, jdbc-mssql, jdbc-mysql, jdbc-oracle, jdbc-postgresql, keycloak, narayana-jta, reactive-routes, resteasy, resteasy-jackson, smallrye-context-propagation, smallrye-health, smallrye-metrics, vault, vertx]

Are you using any custom values?

alemorcuq avatar Jul 11 '22 07:07 alemorcuq

Related issue: https://github.com/bitnami/charts/issues/11067

Custom values are basically a must. But related to postgres we only have

  postgresql:
    enabled: true
    image:
      tag: 11.14.0-debian-10-r28
    persistence:
      existingClaim: data-keycloak-postgresql-0

which is working fine. With r0. But based on the linked issue and the reference to run.sh there, I should also mention, that we have KEYCLOAK_PRODUCTION enabled.

tamcore avatar Jul 11 '22 08:07 tamcore

Yep. Just tried deploying r5 while toggling KEYCLOAK_PRODUCTION.

With KEYCLOAK_PRODUCTION set to true, I get the No suitable driver found error and Keycloak fails to start. If I set it to false, Keycloak starts just fine.

If I add

        - name: KEYCLOAK_EXTRA_ARGS
          value: "--auto-build"

to the StatefulSet, as described in https://github.com/bitnami/charts/issues/11067, Keycloak starts just fine with KEYCLOAK_PRODUCTION set to true.

So most likely https://github.com/bitnami/bitnami-docker-keycloak/pull/91 is going to fix this.

tamcore avatar Jul 11 '22 08:07 tamcore

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

github-actions[bot] avatar Jul 27 '22 01:07 github-actions[bot]

Ping @alemorcuq

tamcore avatar Jul 27 '22 03:07 tamcore

We are going to transfer this issue to bitnami/containers

In order to unify the approaches followed in Bitnami containers and Bitnami charts, we are moving some issues in bitnami/bitnami-docker-<container> repositories to bitnami/containers.

Please follow bitnami/containers to keep you updated about the latest bitnami images.

More information here: https://blog.bitnami.com/2022/07/new-source-of-truth-bitnami-containers.html

carrodher avatar Jul 28 '22 10:07 carrodher

Would you like to contribute with a PR, @tamcore ?

alemorcuq avatar Aug 05 '22 15:08 alemorcuq

@alemorcuq I can look into it. But my approach would be identical to https://github.com/bitnami/bitnami-docker-keycloak/pull/91 so i'd basically just massage @rpiecyk's PR to work with this repo.

tamcore avatar Aug 09 '22 07:08 tamcore

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

github-actions[bot] avatar Aug 25 '22 01:08 github-actions[bot]

Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.

github-actions[bot] avatar Aug 30 '22 01:08 github-actions[bot]