Running Key Cloak with MySQL on Docker Failed to Start

I am trying to start a Keycloak instance which uses a custom mysql database. It was previously using a mariadb database, but there is a requirement to migrate it to mysql. This is the docker-compose.yml file :

version: "3.6"
  container_name: sample-keycloak
  restart: always
   - 8180:8080
    DB_DATABASE: keycloak
    DB_USER: user
    DB_PASSWORD: password
    KEYCLOAK_USER: admin
    - database_static-network
   external: true

With mariadb it was starting fine with DB_VENDOR: mariadb. I changed that to DB_VENDOR: MYSQL.

I ensured that the database as well as the user is created in mysql and the privileges are given to the user for the database. With mysql up and running, i started the keycloak docker to connect and tables that got created as a result of executing this process inside the keycloak database. But the service is failed to start giving the following errors :

vnfm-keycloak    | 03:44:27,583 ERROR [] (ServerService Thread Pool -- 46) WFLYSRV0022: Deploy of deployment "keycloak-server.war" was rolled back with no failure message
vnfm-keycloak    | 03:44:27,672 INFO  [] (MSC service thread 1-5) WFLYSRV0050: Keycloak 12.0.4 (WildFly Core 13.0.3.Final) stopped in 742ms
vnfm-keycloak    | 03:44:27,671 ERROR [] (Controller Boot Thread) WFLYCTL0403: Unexpected failure during execution of the following operation(s): [{
vnfm-keycloak    |     "address" => [
vnfm-keycloak    |         ("core-service" => "management"),
vnfm-keycloak    |         ("security-realm" => "ManagementRealm")
vnfm-keycloak    |     ],
vnfm-keycloak    |     "operation" => "add",
vnfm-keycloak    |     "map-groups-to-roles" => false
vnfm-keycloak    | }, {
vnfm-keycloak    | }]: java.util.concurrent.RejectedExecutionException
vnfm-keycloak    |  at org.jboss.threads@2.4.0.Final//org.jboss.threads.RejectingExecutor.execute(
vnfm-keycloak    |  at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor.rejectShutdown(
vnfm-keycloak    |  at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor.execute(
vnfm-keycloak    |  at$NonBlockingNotificationSupport.emit(
vnfm-keycloak    |  at
vnfm-keycloak    |  at
vnfm-keycloak    |  at$Step.finalizeInternal(
vnfm-keycloak    |  at$Step.finalizeStep(
vnfm-keycloak    |  at$Step.access$400(
vnfm-keycloak    |  at
vnfm-keycloak    |  at
vnfm-keycloak    |  at
vnfm-keycloak    |  at
vnfm-keycloak    |  at
vnfm-keycloak    |  at
vnfm-keycloak    |  at
vnfm-keycloak    |  at
vnfm-keycloak    |  at
vnfm-keycloak    |  at$
vnfm-keycloak    |  at java.base/
vnfm-keycloak    |  Suppressed: java.util.concurrent.RejectedExecutionException: Executor is being shut down
vnfm-keycloak    |      at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor.rejectShutdown(
vnfm-keycloak    |      ... 18 more

This Post Has One Comment

  1. No Fault

    Running Keycloak with MySql on docker – Failed to start

Leave a Reply