-
Bug
-
Resolution: Done
-
Undefined
-
None
-
False
-
-
False
-
-
Before reporting an issue
[x] I have read and understood the above terms for submitting issues, and I understand that my issue may be closed without action if I do not follow them.
Area
core
Describe the bug
After upgrading Keycloak from 26.1.4 to 26.2.0 in Kubernetes, Keycloak can't connect to the internal H2 database. This results in a Keycloak Pod crash with the following error:
{"timestamp":"2025-04-17T08:21:47.788621506Z","sequence":13159,"loggerClassName":"org.jboss.logging.Logger","loggerName":"org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler","level":"ERROR","message":"ERROR: Failed to start server in (development) mode","threadName":"main","threadId":1,"mdc":{},"ndc":"","hostName":"keycloak-0","processName":"/usr/lib/jvm/java-21-openjdk-21.0.6.0.7-1.el9.aarch64/bin/java","processId":1} {"timestamp":"2025-04-17T08:21:47.788686923Z","sequence":13160,"loggerClassName":"org.jboss.logging.Logger","loggerName":"org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler","level":"ERROR","message":"ERROR: Failed to obtain JDBC connection","threadName":"main","threadId":1,"mdc":{},"ndc":"","hostName":"keycloak-0","processName":"/usr/lib/jvm/java-21-openjdk-21.0.6.0.7-1.el9.aarch64/bin/java","processId":1} {"timestamp":"2025-04-17T08:21:47.788710673Z","sequence":13161,"loggerClassName":"org.jboss.logging.Logger","loggerName":"org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler","level":"ERROR","message":"ERROR: Wrong user name or password [28000-230]","threadName":"main","threadId":1,"mdc":{},"ndc":"","hostName":"keycloak-0","processName":"/usr/lib/jvm/java-21-openjdk-21.0.6.0.7-1.el9.aarch64/bin/java","processId":1}
The error has been noticed during a regular UDS Platform component upgrade: https://github.com/defenseunicorns/uds-core/pull/1452
In our testing setup, Keycloak is bootstrapped with the following parameters (that are relevant to this case):
- start-dev - --spi-theme-static-max-age=-1 - --spi-theme-cache-themes=false - --spi-theme-cache-templates=false - --import-realm - --features=preview
Here are some other links that you may find useful:
- Full UDS Test logs: https://github.com/defenseunicorns/uds-core/actions/runs/14509959971/job/40710758573?pr=1452
- Full Pod Spec: https://github.com/defenseunicorns/uds-core/actions/runs/14509959971/job/40710758573?pr=1452#step:7:3326
- Keycloak Pod Logs: https://github.com/defenseunicorns/uds-core/actions/runs/14509959971/artifacts/2962269517
- Unpack and find Keycloak Pod Logs
Version
26.2.0
Regression
[x] The issue is a regression
Expected behavior
The upgraded Keycloak should boot up without any problems
Actual behavior
The upgraded Keycloak instances crashes
How to Reproduce?
The stable reproducer might be found in the UDS Platform. In order to run it, please follow:
1. Follow https://uds.defenseunicorns.com/getting-started/basic-requirements/
2. Follow https://uds.defenseunicorns.com/getting-started/install-and-deploy-uds/
3. Clone the https://github.com/defenseunicorns/uds-core/pull/1452
4. Run uds run test-uds-core-upgrade --set FLAVOR=upstream --no-progress
Alternatively, you may try to spin up a container with - start-dev and version 26.1.. Once it's running, just upgrade it to 26.2.0.
Anything else?
No response
- links to