Keycloak Container Ignoring Db_Addr Option

I am trying to create a docker container for keycloak using a remote MySQL db. For some reason the DB_ADDR option seem to be ignored during startup and Keycloak keeps trying to connect to a unexpected address and I'm getting the below error :

at [email protected]//org.jboss.threads.JBossThread.run(JBossThread.java:513) Caused by: java.sql.SQLException: Access denied for user 'keycloakuser'@'192.168.0.254' (using password: YES)

FATAL [org.keycloak.services] (ServerService Thread Pool -- 65) Error during startup: java.lang.RuntimeException: Failed to connect to database

Not sure where this ip address (192.168.0.254) comes from and why Keycloak is ignoring the ip address I provide with the option DB_ADDR

Here is the command I use :

docker run -p 8080:8080 -e DB_VENDOR=mysql -e DB_ADDR=<ip_address> -e DB_PORT=3306 -e DB_DATABASE=keycloakdb -e DB_USER=keycloakuser -e DB_PASSWORD=password jboss/keycloak
2

1 Answer

Fixed, it was a network misconfiguration on the MySQL server side. Sorry and thanks for your suggestions guys.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Elena Rostova

Elena Rostova

Lead Health, Wellness & Medical Journalist

Elena Rostova holds a Master's degree in Public Health Journalism. She covers groundbreaking medical research, holistic wellness trends, mental health awareness, and nutritional science.

Share this article
Twitter Facebook Pinterest