[keycloak-user] can't setup keycloak into a mysql database.
Priyamal Madushan
priyamalm at mobitel.lk
Thu May 30 07:58:11 EDT 2019
Hi guys.
I am trying to setup keycloak to use a mysql database. I have read the documentation and edited the standalone.xml to use the mysql datasource and included the driver in the module.xml as well. Here is the datasource I created
<datasource jndi-name="java:/jboss/datasources/KeycloakDS" pool-name="KeycloakDS" enabled="true" use-java-context="true">
<connection-url>jdbc:mysql://localhost:3306/keycloak?useSSL=false&characterEncoding=UTF-8</connection-url>
<driver>mysql</driver>
<pool>
<min-pool-size>5</min-pool-size>
<max-pool-size>20</max-pool-size>
<prefill>true</prefill>
</pool>
<timeout>
<idle-timeout-minutes>0</idle-timeout-minutes>
</timeout>
<security>
<user-name>root</user-name>
<password>password</password>
</security>
<validation>
<valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLValidConnectionChecker"/>
<validate-on-match>true</validate-on-match>
<exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLExceptionSorter"/>
</validation>
</datasource>
With the above configuration I always end up in this error
Timeout after [300] seconds waiting for service container stability. Operation will roll back. Step that first updated the service container was 'add' at address '[
("core-service" => "management"),
("management-interface" => "http-interface")
]'
I tried keycloak version 5,6 and 6.0.1 assuming older version might fix the issue, but it didn't here is a similar discussion
https://developer.jboss.org/thread/272010
after going through that I changed my time out but it didn't solve the issue either.
<timeout>
<blocking-timeout-millis>60000</blocking-timeout-millis>
<allocation-retry>3</allocation-retry>
</timeout>
Here is the question that I posted on stack overflow : https://stackoverflow.com/questions/56357585/how-to-migrate-keycloak-to-mysql-database-and-fix-timeout-after-300-exception
I am trying to fix this for couple of days now and still couldn't get this solved Any help would be appreciated.
Thanks and regards
Priyamal.
This e-mail and any attachments may contain confidential and
privileged information. If you are not the intended recipient,
please notify the sender immediately by return e-mail, delete this
e-mail and destroy any copies. Any dissemination or use of this
information by a person other than the intended recipient is
unauthorized and may be illegal.
Mobitel (Pvt) Ltd.
More information about the keycloak-user
mailing list