'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
Solution 1:[1]
Fixed, it was a network misconfiguration on the MySQL server side. Sorry and thanks for your suggestions guys.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Metafr |
