<p>I am trying to run KeyCloak on kubernetes and connect to external MySQL database. I deployed using the <code>deployment.yaml</code> and <code>service.yaml</code> as below:</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  namespace: {{K8S_NAMESPACE}}
  name: keycloak
  labels:
    app: keycloak
spec:
  replicas: 1
  revisionHistoryLimit: 3
  selector:
    matchLabels:
      name: keycloak
  template:
    metadata:
      labels:
        name: keycloak
      annotations:
        sla: high
        tier: application
        sidecar.istio.io/inject: &quot;false&quot;
    spec:
      automountServiceAccountToken: true
      imagePullSecrets:
      - name: harbor-bot
      serviceAccount: tenant-pod-root
      containers:
      - name: keycloak
        image: quay.io/keycloak/keycloak:14.0.0
        imagePullPolicy: Always
        resources:
          limits:
            cpu: 750m
            memory: 768Mi
          requests:
            cpu: 750m
            memory: 768Mi
        env:
        - name: KEYCLOAK_USER
          value: {{KEYCLOAK_USER}}
        - name: KEYCLOAK_PASSWORD
          value: {{KEYCLOAK_PASSWORD}}
        - name: PROXY_ADDRESS_FORWARDING
          value: &quot;true&quot;
        - name: DB_VENDOR
          value: {{KEYCLOAK_DB_VENDOR}}
        - name: DB_ADDR
          value: {{KEYCLOAK_DB_ADDR}}
        - name: DB_DATABASE
          value: {{KEYCLOAK_DB_DATABASE}}
        - name: DB_USER
          value: {{KEYCLOAK_DB_USER}}
        - name: DB_PASSWORD
          value: {{KEYCLOAK_DB_PASSWORD}}
        - name: DB_PORT
          value: &quot;3306&quot;
        - name: JDBC_PARAMS
          value: &quot;useSSL=false&quot;
        readinessProbe:
          httpGet:
            path: /auth/realms/master
            port: 8080
        ports:
          - name: http
            containerPort: 8080
          - name: https
            containerPort: 8443
----------
apiVersion: v1
kind: Service
metadata:
  labels:
    name: keycloak
  namespace: {{K8S_NAMESPACE}}
  name: keycloak
spec:
  ports:
  - name: tcp-upstream
    port: 8080
    protocol: TCP
    targetPort: 8080
  selector:
    name: keycloak
  sessionAffinity: None
  type: ClusterIP
</code></pre>
<p>When I try to run this yaml in kubernetes, I get the following error:</p>
<pre><code>12:41:55,174 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 17) WFLYCTL0403: Unexpected failure during execution of the following operation(s): [{
    &quot;operation&quot; =&gt; &quot;add&quot;,
    &quot;address&quot; =&gt; [(&quot;subsystem&quot; =&gt; &quot;naming&quot;)]
}, {
    &quot;operation&quot; =&gt; &quot;add&quot;,
    &quot;address&quot; =&gt; [
        (&quot;subsystem&quot; =&gt; &quot;naming&quot;),
        (&quot;service&quot; =&gt; &quot;remote-naming&quot;)
    ]
}]: java.lang.RuntimeException: WFLYCTL0195: Interrupted awaiting transaction commit or rollback
    at org.jboss.as.controller@15.0.1.Final//org.jboss.as.controller.ParallelBootOperationStepHandler$ParallelBootTransactionControl.operationPrepared(ParallelBootOperationStepHandler.java:458)
    at org.jboss.as.controller@15.0.1.Final//org.jboss.as.controller.ModelController$OperationTransactionControl.operationPrepared(ModelController.java:131)
    at org.jboss.as.controller@15.0.1.Final//org.jboss.as.controller.AbstractOperationContext.executeDoneStage(AbstractOperationContext.java:874)
    at org.jboss.as.controller@15.0.1.Final//org.jboss.as.controller.AbstractOperationContext.processStages(AbstractOperationContext.java:805)
    at org.jboss.as.controller@15.0.1.Final//org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:468)
    at org.jboss.as.controller@15.0.1.Final//org.jboss.as.controller.ParallelBootOperationStepHandler$ParallelBootTask.run(ParallelBootOperationStepHandler.java:384)
    at org.jboss.threads@2.4.0.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
    at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
    at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
    at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
    at java.base/java.lang.Thread.run(Thread.java:829)
    at org.jboss.threads@2.4.0.Final//org.jboss.threads.JBossThread.run(JBossThread.java:513)

12:41:55,173 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 10) WFLYCTL0403: Unexpected failure during execution of the following operation(s): [{
    &quot;operation&quot; =&gt; &quot;add&quot;,
    &quot;address&quot; =&gt; [(&quot;subsystem&quot; =&gt; &quot;jgroups&quot;)],
    &quot;default-channel&quot; =&gt; &quot;ee&quot;
}, {
    &quot;operation&quot; =&gt; &quot;add&quot;,
    &quot;address&quot; =&gt; [
        (&quot;subsystem&quot; =&gt; &quot;jgroups&quot;),
        (&quot;channel&quot; =&gt; &quot;ee&quot;)
    ],
    &quot;stack&quot; =&gt; &quot;udp&quot;,
    &quot;cluster&quot; =&gt; &quot;ejb&quot;
}, {
    &quot;operation&quot; =&gt; &quot;add&quot;,
    &quot;address&quot; =&gt; [
        (&quot;subsystem&quot; =&gt; &quot;jgroups&quot;),
        (&quot;stack&quot; =&gt; &quot;udp&quot;)
    ]
}, {
    &quot;operation&quot; =&gt; &quot;add&quot;,
    &quot;address&quot; =&gt; [
        (&quot;subsystem&quot; =&gt; &quot;jgroups&quot;),
        (&quot;stack&quot; =&gt; &quot;udp&quot;),
        (&quot;transport&quot; =&gt; &quot;UDP&quot;)
    ],
    &quot;socket-binding&quot; =&gt; &quot;jgroups-udp&quot;
}, {
    &quot;operation&quot; =&gt; &quot;add&quot;,
    &quot;address&quot; =&gt; [
        (&quot;subsystem&quot; =&gt; &quot;jgroups&quot;),
        (&quot;stack&quot; =&gt; &quot;udp&quot;),
        (&quot;protocol&quot; =&gt; &quot;PING&quot;)
    ]
}, {
    &quot;operation&quot; =&gt; &quot;add&quot;,
    &quot;address&quot; =&gt; [
        (&quot;subsystem&quot; =&gt; &quot;jgroups&quot;),
        (&quot;stack&quot; =&gt; &quot;udp&quot;),
        (&quot;protocol&quot; =&gt; &quot;MERGE3&quot;)
    ]
}, {
    &quot;operation&quot; =&gt; &quot;add&quot;,
    &quot;address&quot; =&gt; [
        (&quot;subsystem&quot; =&gt; &quot;jgroups&quot;),
        (&quot;stack&quot; =&gt; &quot;udp&quot;),
        (&quot;protocol&quot; =&gt; &quot;FD_SOCK&quot;)
    ],
    &quot;socket-binding&quot; =&gt; &quot;jgroups-udp-fd&quot;
}, {
    &quot;operation&quot; =&gt; &quot;add&quot;,
    &quot;address&quot; =&gt; [
        (&quot;subsystem&quot; =&gt; &quot;jgroups&quot;),
        (&quot;stack&quot; =&gt; &quot;udp&quot;),
        (&quot;protocol&quot; =&gt; &quot;FD_ALL&quot;)
    ]
}, {
    &quot;operation&quot; =&gt; &quot;add&quot;,
    &quot;address&quot; =&gt; [
        (&quot;subsystem&quot; =&gt; &quot;jgroups&quot;),
        (&quot;stack&quot; =&gt; &quot;udp&quot;),
        (&quot;protocol&quot; =&gt; &quot;VERIFY_SUSPECT&quot;)
    ]
}, {
    &quot;operation&quot; =&gt; &quot;add&quot;,
    &quot;address&quot; =&gt; [
        (&quot;subsystem&quot; =&gt; &quot;jgroups&quot;),
        (&quot;stack&quot; =&gt; &quot;udp&quot;),
        (&quot;protocol&quot; =&gt; &quot;pbcast.NAKACK2&quot;)
    ]
}, {
    &quot;operation&quot; =&gt; &quot;add&quot;,
    &quot;address&quot; =&gt; [
        (&quot;subsystem&quot; =&gt; &quot;jgroups&quot;),
        (&quot;stack&quot; =&gt; &quot;udp&quot;),
        (&quot;protocol&quot; =&gt; &quot;UNICAST3&quot;)
    ]
}, {
    &quot;operation&quot; =&gt; &quot;add&quot;,
    &quot;address&quot; =&gt; [
        (&quot;subsystem&quot; =&gt; &quot;jgroups&quot;),
        (&quot;stack&quot; =&gt; &quot;udp&quot;),
        (&quot;protocol&quot; =&gt; &quot;pbcast.STABLE&quot;)
    ]
}, {
    &quot;operation&quot; =&gt; &quot;add&quot;,
    &quot;address&quot; =&gt; [
        (&quot;subsystem&quot; =&gt; &quot;jgroups&quot;),
        (&quot;stack&quot; =&gt; &quot;udp&quot;),
        (&quot;protocol&quot; =&gt; &quot;pbcast.GMS&quot;)
    ]
}, {
    &quot;operation&quot; =&gt; &quot;add&quot;,
    &quot;address&quot; =&gt; [
        (&quot;subsystem&quot; =&gt; &quot;jgroups&quot;),
        (&quot;stack&quot; =&gt; &quot;udp&quot;),
        (&quot;protocol&quot; =&gt; &quot;UFC&quot;)
    ]
}, {
    &quot;operation&quot; =&gt; &quot;add&quot;,
    &quot;address&quot; =&gt; [
        (&quot;subsystem&quot; =&gt; &quot;jgroups&quot;),
        (&quot;stack&quot; =&gt; &quot;udp&quot;),
        (&quot;protocol&quot; =&gt; &quot;MFC&quot;)
    ]
}, {
    &quot;operation&quot; =&gt; &quot;add&quot;,
    &quot;address&quot; =&gt; [
        (&quot;subsystem&quot; =&gt; &quot;jgroups&quot;),
        (&quot;stack&quot; =&gt; &quot;udp&quot;),
        (&quot;protocol&quot; =&gt; &quot;FRAG3&quot;)
    ]
}, {
    &quot;operation&quot; =&gt; &quot;add&quot;,
    &quot;address&quot; =&gt; [
        (&quot;subsystem&quot; =&gt; &quot;jgroups&quot;),
        (&quot;stack&quot; =&gt; &quot;tcp&quot;)
    ]
}, {
    &quot;operation&quot; =&gt; &quot;add&quot;,
    &quot;address&quot; =&gt; [
        (&quot;subsystem&quot; =&gt; &quot;jgroups&quot;),
        (&quot;stack&quot; =&gt; &quot;tcp&quot;),
        (&quot;transport&quot; =&gt; &quot;TCP&quot;)
    ],
    &quot;socket-binding&quot; =&gt; &quot;jgroups-tcp&quot;
}, {
    &quot;operation&quot; =&gt; &quot;add&quot;,
    &quot;address&quot; =&gt; [
        (&quot;subsystem&quot; =&gt; &quot;jgroups&quot;),
        (&quot;stack&quot; =&gt; &quot;tcp&quot;),
        (&quot;protocol&quot; =&gt; &quot;MPING&quot;)
    ],
    &quot;socket-binding&quot; =&gt; &quot;jgroups-mping&quot;
}, {
    &quot;operation&quot; =&gt; &quot;add&quot;,
    &quot;address&quot; =&gt; [
        (&quot;subsystem&quot; =&gt; &quot;jgroups&quot;),
        (&quot;stack&quot; =&gt; &quot;tcp&quot;),
        (&quot;protocol&quot; =&gt; &quot;MERGE3&quot;)
    ]
}, {
    &quot;operation&quot; =&gt; &quot;add&quot;,
    &quot;address&quot; =&gt; [
        (&quot;subsystem&quot; =&gt; &quot;jgroups&quot;),
        (&quot;stack&quot; =&gt; &quot;tcp&quot;),
        (&quot;protocol&quot; =&gt; &quot;FD_SOCK&quot;)
    ],
    &quot;socket-binding&quot; =&gt; &quot;jgroups-tcp-fd&quot;
}, {
    &quot;operation&quot; =&gt; &quot;add&quot;,
    &quot;address&quot; =&gt; [
        (&quot;subsystem&quot; =&gt; &quot;jgroups&quot;),
        (&quot;stack&quot; =&gt; &quot;tcp&quot;),
        (&quot;protocol&quot; =&gt; &quot;FD_ALL&quot;)
    ]
}, {
    &quot;operation&quot; =&gt; &quot;add&quot;,
    &quot;address&quot; =&gt; [
        (&quot;subsystem&quot; =&gt; &quot;jgroups&quot;),
        (&quot;stack&quot; =&gt; &quot;tcp&quot;),
        (&quot;protocol&quot; =&gt; &quot;VERIFY_SUSPECT&quot;)
    ]
}, {
    &quot;operation&quot; =&gt; &quot;add&quot;,
    &quot;address&quot; =&gt; [
        (&quot;subsystem&quot; =&gt; &quot;jgroups&quot;),
        (&quot;stack&quot; =&gt; &quot;tcp&quot;),
        (&quot;protocol&quot; =&gt; &quot;pbcast.NAKACK2&quot;)
    ]
}, {
    &quot;operation&quot; =&gt; &quot;add&quot;,
    &quot;address&quot; =&gt; [
        (&quot;subsystem&quot; =&gt; &quot;jgroups&quot;),
        (&quot;stack&quot; =&gt; &quot;tcp&quot;),
        (&quot;protocol&quot; =&gt; &quot;UNICAST3&quot;)
    ]
}, {
    &quot;operation&quot; =&gt; &quot;add&quot;,
    &quot;address&quot; =&gt; [
        (&quot;subsystem&quot; =&gt; &quot;jgroups&quot;),
        (&quot;stack&quot; =&gt; &quot;tcp&quot;),
        (&quot;protocol&quot; =&gt; &quot;pbcast.STABLE&quot;)
    ]
}, {
    &quot;operation&quot; =&gt; &quot;add&quot;,
    &quot;address&quot; =&gt; [
        (&quot;subsystem&quot; =&gt; &quot;jgroups&quot;),
        (&quot;stack&quot; =&gt; &quot;tcp&quot;),
        (&quot;protocol&quot; =&gt; &quot;pbcast.GMS&quot;)
    ]
}, {
    &quot;operation&quot; =&gt; &quot;add&quot;,
    &quot;address&quot; =&gt; [
        (&quot;subsystem&quot; =&gt; &quot;jgroups&quot;),
        (&quot;stack&quot; =&gt; &quot;tcp&quot;),
        (&quot;protocol&quot; =&gt; &quot;MFC&quot;)
    ]
}, {
    &quot;operation&quot; =&gt; &quot;add&quot;,
    &quot;address&quot; =&gt; [
        (&quot;subsystem&quot; =&gt; &quot;jgroups&quot;),
        (&quot;stack&quot; =&gt; &quot;tcp&quot;),
        (&quot;protocol&quot; =&gt; &quot;FRAG3&quot;)
    ]
}]: java.lang.RuntimeException: WFLYCTL0195: Interrupted awaiting transaction commit or rollback
    at org.jboss.as.controller@15.0.1.Final//org.jboss.as.controller.ParallelBootOperationStepHandler$ParallelBootTransactionControl.operationPrepared(ParallelBootOperationStepHandler.java:458)
    at org.jboss.as.controller@15.0.1.Final//org.jboss.as.controller.ModelController$OperationTransactionControl.operationPrepared(ModelController.java:131)
    at org.jboss.as.controller@15.0.1.Final//org.jboss.as.controller.AbstractOperationContext.executeDoneStage(AbstractOperationContext.java:874)
    at org.jboss.as.controller@15.0.1.Final//org.jboss.as.controller.AbstractOperationContext.processStages(AbstractOperationContext.java:805)
    at org.jboss.as.controller@15.0.1.Final//org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:468)
    at org.jboss.as.controller@15.0.1.Final//org.jboss.as.controller.ParallelBootOperationStepHandler$ParallelBootTask.run(ParallelBootOperationStepHandler.java:384)
    at org.jboss.threads@2.4.0.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
    at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
    at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
    at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
    at java.base/java.lang.Thread.run(Thread.java:829)
    at org.jboss.threads@2.4.0.Final//org.jboss.threads.JBossThread.run(JBossThread.java:513)

12:41:55,173 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 12) WFLYCTL0403: Unexpected failure during execution of the following operation(s): [{
    &quot;operation&quot; =&gt; &quot;add&quot;,
    &quot;address&quot; =&gt; [(&quot;subsystem&quot; =&gt; &quot;elytron&quot;)],
    &quot;final-providers&quot; =&gt; &quot;combined-providers&quot;,
    &quot;disallowed-providers&quot; =&gt; [&quot;OracleUcrypto&quot;]
}, {
    &quot;operation&quot; =&gt; &quot;add&quot;,
    &quot;address&quot; =&gt; [
        (&quot;subsystem&quot; =&gt; &quot;elytron&quot;),
        (&quot;aggregate-providers&quot; =&gt; &quot;combined-providers&quot;)
    ],
    &quot;providers&quot; =&gt; [
        &quot;elytron&quot;,
        &quot;openssl&quot;
    ]
}, {
    &quot;operation&quot; =&gt; &quot;add&quot;,
    &quot;address&quot; =&gt; [
        (&quot;subsystem&quot; =&gt; &quot;elytron&quot;),
        (&quot;provider-loader&quot; =&gt; &quot;elytron&quot;)
    ],
    &quot;module&quot; =&gt; &quot;org.wildfly.security.elytron&quot;
}, {
    &quot;operation&quot; =&gt; &quot;add&quot;,
    &quot;address&quot; =&gt; [
        (&quot;subsystem&quot; =&gt; &quot;elytron&quot;),
        (&quot;provider-loader&quot; =&gt; &quot;openssl&quot;)
    ],
    &quot;module&quot; =&gt; &quot;org.wildfly.openssl&quot;
}, {
    &quot;operation&quot; =&gt; &quot;add&quot;,
    &quot;address&quot; =&gt; [
        (&quot;subsystem&quot; =&gt; &quot;elytron&quot;),
        (&quot;file-audit-log&quot; =&gt; &quot;local-audit&quot;)
    ],
    &quot;path&quot; =&gt; &quot;audit.log&quot;,
    &quot;relative-to&quot; =&gt; &quot;jboss.server.log.dir&quot;,
    &quot;format&quot; =&gt; &quot;JSON&quot;
}, {
    &quot;operation&quot; =&gt; &quot;add&quot;,
    &quot;address&quot; =&gt; [
        (&quot;subsystem&quot; =&gt; &quot;elytron&quot;),
        (&quot;security-domain&quot; =&gt; &quot;ApplicationDomain&quot;)
    ],
    &quot;default-realm&quot; =&gt; &quot;ApplicationRealm&quot;,
    &quot;permission-mapper&quot; =&gt; &quot;default-permission-mapper&quot;,
    &quot;realms&quot; =&gt; [
        {
            &quot;realm&quot; =&gt; &quot;ApplicationRealm&quot;,
            &quot;role-decoder&quot; =&gt; &quot;groups-to-roles&quot;
        },
        {&quot;realm&quot; =&gt; &quot;local&quot;}
    ]
}, {
    &quot;operation&quot; =&gt; &quot;add&quot;,
    &quot;address&quot; =&gt; [
        (&quot;subsystem&quot; =&gt; &quot;elytron&quot;),
        (&quot;security-domain&quot; =&gt; &quot;ManagementDomain&quot;)
    ],
    &quot;default-realm&quot; =&gt; &quot;ManagementRealm&quot;,
    &quot;permission-mapper&quot; =&gt; &quot;default-permission-mapper&quot;,
    &quot;realms&quot; =&gt; [
        {
            &quot;realm&quot; =&gt; &quot;ManagementRealm&quot;,
            &quot;role-decoder&quot; =&gt; &quot;groups-to-roles&quot;
        },
        {
            &quot;realm&quot; =&gt; &quot;local&quot;,
            &quot;role-mapper&quot; =&gt; &quot;super-user-mapper&quot;
        }
    ]
}, {
    &quot;operation&quot; =&gt; &quot;add&quot;,
    &quot;address&quot; =&gt; [
        (&quot;subsystem&quot; =&gt; &quot;elytron&quot;),
        (&quot;identity-realm&quot; =&gt; &quot;local&quot;)
    ],
    &quot;identity&quot; =&gt; &quot;$local&quot;
}, {
    &quot;operation&quot; =&gt; &quot;add&quot;,
    &quot;address&quot; =&gt; [
        (&quot;subsystem&quot; =&gt; &quot;elytron&quot;),
        (&quot;properties-realm&quot; =&gt; &quot;ApplicationRealm&quot;)
    ],
    &quot;users-properties&quot; =&gt; {
        &quot;path&quot; =&gt; &quot;application-users.properties&quot;,
        &quot;relative-to&quot; =&gt; &quot;jboss.server.config.dir&quot;,
        &quot;digest-realm-name&quot; =&gt; &quot;ApplicationRealm&quot;
    },
    &quot;groups-properties&quot; =&gt; {
        &quot;path&quot; =&gt; &quot;application-roles.properties&quot;,
        &quot;relative-to&quot; =&gt; &quot;jboss.server.config.dir&quot;
    }
}, {
    &quot;operation&quot; =&gt; &quot;add&quot;,
    &quot;address&quot; =&gt; [
        (&quot;subsystem&quot; =&gt; &quot;elytron&quot;),
        (&quot;properties-realm&quot; =&gt; &quot;ManagementRealm&quot;)
    ],
    &quot;users-properties&quot; =&gt; {
        &quot;path&quot; =&gt; &quot;mgmt-users.properties&quot;,
        &quot;relative-to&quot; =&gt; &quot;jboss.server.config.dir&quot;,
        &quot;digest-realm-name&quot; =&gt; &quot;ManagementRealm&quot;
    },
    &quot;groups-properties&quot; =&gt; {
        &quot;path&quot; =&gt; &quot;mgmt-groups.properties&quot;,
        &quot;relative-to&quot; =&gt; &quot;jboss.server.config.dir&quot;
    }
}, {
    &quot;operation&quot; =&gt; &quot;add&quot;,
    &quot;address&quot; =&gt; [
        (&quot;subsystem&quot; =&gt; &quot;elytron&quot;),
        (&quot;simple-permission-mapper&quot; =&gt; &quot;default-permission-mapper&quot;)
    ],
    &quot;mapping-mode&quot; =&gt; &quot;first&quot;,
    &quot;permission-mappings&quot; =&gt; [
        {
            &quot;principals&quot; =&gt; [&quot;anonymous&quot;],
            &quot;permission-sets&quot; =&gt; [{&quot;permission-set&quot; =&gt; &quot;default-permissions&quot;}]
        },
        {
            &quot;match-all&quot; =&gt; true,
            &quot;permission-sets&quot; =&gt; [
                {&quot;permission-set&quot; =&gt; &quot;login-permission&quot;},
                {&quot;permission-set&quot; =&gt; &quot;default-permissions&quot;}
            ]
        }
    ]
}, {
    &quot;operation&quot; =&gt; &quot;add&quot;,
    &quot;address&quot; =&gt; [
        (&quot;subsystem&quot; =&gt; &quot;elytron&quot;),
        (&quot;constant-realm-mapper&quot; =&gt; &quot;local&quot;)
    ],
    &quot;realm-name&quot; =&gt; &quot;local&quot;
}, {
    &quot;operation&quot; =&gt; &quot;add&quot;,
    &quot;address&quot; =&gt; [
        (&quot;subsystem&quot; =&gt; &quot;elytron&quot;),
        (&quot;simple-role-decoder&quot; =&gt; &quot;groups-to-roles&quot;)
    ],
    &quot;attribute&quot; =&gt; &quot;groups&quot;
}, {
    &quot;operation&quot; =&gt; &quot;add&quot;,
    &quot;address&quot; =&gt; [
        (&quot;subsystem&quot; =&gt; &quot;elytron&quot;),
        (&quot;constant-role-mapper&quot; =&gt; &quot;super-user-mapper&quot;)
    ],
    &quot;roles&quot; =&gt; [&quot;SuperUser&quot;]
}, {
    &quot;operation&quot; =&gt; &quot;add&quot;,
    &quot;address&quot; =&gt; [
        (&quot;subsystem&quot; =&gt; &quot;elytron&quot;),
        (&quot;permission-set&quot; =&gt; &quot;login-permission&quot;)
    ],
    &quot;permissions&quot; =&gt; [{&quot;class-name&quot; =&gt; &quot;org.wildfly.security.auth.permission.LoginPermission&quot;}]
}, {
    &quot;operation&quot; =&gt; &quot;add&quot;,
    &quot;address&quot; =&gt; [
        (&quot;subsystem&quot; =&gt; &quot;elytron&quot;),
        (&quot;permission-set&quot; =&gt; &quot;default-permissions&quot;)
    ],
    &quot;permissions&quot; =&gt; [
        {
            &quot;class-name&quot; =&gt; &quot;org.wildfly.extension.batch.jberet.deployment.BatchPermission&quot;,
            &quot;module&quot; =&gt; &quot;org.wildfly.extension.batch.jberet&quot;,
            &quot;target-name&quot; =&gt; &quot;*&quot;
        },
        {
            &quot;class-name&quot; =&gt; &quot;org.wildfly.transaction.client.RemoteTransactionPermission&quot;,
            &quot;module&quot; =&gt; &quot;org.wildfly.transaction.client&quot;
        },
        {
            &quot;class-name&quot; =&gt; &quot;org.jboss.ejb.client.RemoteEJBPermission&quot;,
            &quot;module&quot; =&gt; &quot;org.jboss.ejb-client&quot;
        },
        {
            &quot;class-name&quot; =&gt; &quot;org.jboss.ejb.client.RemoteEJBPermission&quot;,
            &quot;module&quot; =&gt; &quot;org.jboss.ejb-client&quot;
        }
    ]
}, {
    &quot;operation&quot; =&gt; &quot;add&quot;,
    &quot;address&quot; =&gt; [
        (&quot;subsystem&quot; =&gt; &quot;elytron&quot;),
        (&quot;http-authentication-factory&quot; =&gt; &quot;management-http-authentication&quot;)
    ],
    &quot;security-domain&quot; =&gt; &quot;ManagementDomain&quot;,
    &quot;http-server-mechanism-factory&quot; =&gt; &quot;global&quot;,
    &quot;mechanism-configurations&quot; =&gt; [{
        &quot;mechanism-name&quot; =&gt; &quot;DIGEST&quot;,
        &quot;mechanism-realm-configurations&quot; =&gt; [{&quot;realm-name&quot; =&gt; &quot;ManagementRealm&quot;}]
    }]
}, {
    &quot;operation&quot; =&gt; &quot;add&quot;,
    &quot;address&quot; =&gt; [
        (&quot;subsystem&quot; =&gt; &quot;elytron&quot;),
        (&quot;provider-http-server-mechanism-factory&quot; =&gt; &quot;global&quot;)
    ]
}, {
    &quot;operation&quot; =&gt; &quot;add&quot;,
    &quot;address&quot; =&gt; [
        (&quot;subsystem&quot; =&gt; &quot;elytron&quot;),
        (&quot;sasl-authentication-factory&quot; =&gt; &quot;application-sasl-authentication&quot;)
    ],
    &quot;sasl-server-factory&quot; =&gt; &quot;configured&quot;,
    &quot;security-domain&quot; =&gt; &quot;ApplicationDomain&quot;,
    &quot;mechanism-configurations&quot; =&gt; [
        {
            &quot;mechanism-name&quot; =&gt; &quot;JBOSS-LOCAL-USER&quot;,
            &quot;realm-mapper&quot; =&gt; &quot;local&quot;
        },
        {
            &quot;mechanism-name&quot; =&gt; &quot;DIGEST-MD5&quot;,
            &quot;mechanism-realm-configurations&quot; =&gt; [{&quot;realm-name&quot; =&gt; &quot;ApplicationRealm&quot;}]
        }
    ]
}, {
    &quot;operation&quot; =&gt; &quot;add&quot;,
    &quot;address&quot; =&gt; [
        (&quot;subsystem&quot; =&gt; &quot;elytron&quot;),
        (&quot;sasl-authentication-factory&quot; =&gt; &quot;management-sasl-authentication&quot;)
    ],
    &quot;sasl-server-factory&quot; =&gt; &quot;configured&quot;,
    &quot;security-domain&quot; =&gt; &quot;ManagementDomain&quot;,
    &quot;mechanism-configurations&quot; =&gt; [
        {
            &quot;mechanism-name&quot; =&gt; &quot;JBOSS-LOCAL-USER&quot;,
            &quot;realm-mapper&quot; =&gt; &quot;local&quot;
        },
        {
            &quot;mechanism-name&quot; =&gt; &quot;DIGEST-MD5&quot;,
            &quot;mechanism-realm-configurations&quot; =&gt; [{&quot;realm-name&quot; =&gt; &quot;ManagementRealm&quot;}]
        }
    ]
}, {
    &quot;operation&quot; =&gt; &quot;add&quot;,
    &quot;address&quot; =&gt; [
        (&quot;subsystem&quot; =&gt; &quot;elytron&quot;),
        (&quot;configurable-sasl-server-factory&quot; =&gt; &quot;configured&quot;)
    ],
    &quot;sasl-server-factory&quot; =&gt; &quot;elytron&quot;,
    &quot;properties&quot; =&gt; {&quot;wildfly.sasl.local-user.default-user&quot; =&gt; &quot;$local&quot;}
}, {
    &quot;operation&quot; =&gt; &quot;add&quot;,
    &quot;address&quot; =&gt; [
        (&quot;subsystem&quot; =&gt; &quot;elytron&quot;),
        (&quot;mechanism-provider-filtering-sasl-server-factory&quot; =&gt; &quot;elytron&quot;)
    ],
    &quot;sasl-server-factory&quot; =&gt; &quot;global&quot;,
    &quot;filters&quot; =&gt; [{&quot;provider-name&quot; =&gt; &quot;WildFlyElytron&quot;}]
}, {
    &quot;operation&quot; =&gt; &quot;add&quot;,
    &quot;address&quot; =&gt; [
        (&quot;subsystem&quot; =&gt; &quot;elytron&quot;),
        (&quot;provider-sasl-server-factory&quot; =&gt; &quot;global&quot;)
    ]
}, {
    &quot;operation&quot; =&gt; &quot;add&quot;,
    &quot;address&quot; =&gt; [
        (&quot;subsystem&quot; =&gt; &quot;elytron&quot;),
        (&quot;key-store&quot; =&gt; &quot;applicationKS&quot;)
    ],
    &quot;credential-reference&quot; =&gt; {&quot;clear-text&quot; =&gt; &quot;password&quot;},
    &quot;type&quot; =&gt; &quot;JKS&quot;,
    &quot;path&quot; =&gt; &quot;application.keystore&quot;,
    &quot;relative-to&quot; =&gt; &quot;jboss.server.config.dir&quot;
}, {
    &quot;operation&quot; =&gt; &quot;add&quot;,
    &quot;address&quot; =&gt; [
        (&quot;subsystem&quot; =&gt; &quot;elytron&quot;),
        (&quot;key-manager&quot; =&gt; &quot;applicationKM&quot;)
    ],
    &quot;key-store&quot; =&gt; &quot;applicationKS&quot;,
    &quot;generate-self-signed-certificate-host&quot; =&gt; &quot;localhost&quot;,
    &quot;credential-reference&quot; =&gt; {&quot;clear-text&quot; =&gt; &quot;password&quot;}
}, {
    &quot;operation&quot; =&gt; &quot;add&quot;,
    &quot;address&quot; =&gt; [
        (&quot;subsystem&quot; =&gt; &quot;elytron&quot;),
        (&quot;server-ssl-context&quot; =&gt; &quot;applicationSSC&quot;)
    ],
    &quot;key-manager&quot; =&gt; &quot;applicationKM&quot;
}]: java.lang.RuntimeException: WFLYCTL0195: Interrupted awaiting transaction commit or rollback
    at org.jboss.as.controller@15.0.1.Final//org.jboss.as.controller.ParallelBootOperationStepHandler$ParallelBootTransactionControl.operationPrepared(ParallelBootOperationStepHandler.java:458)
    at org.jboss.as.controller@15.0.1.Final//org.jboss.as.controller.ModelController$OperationTransactionControl.operationPrepared(ModelController.java:131)
    at org.jboss.as.controller@15.0.1.Final//org.jboss.as.controller.AbstractOperationContext.executeDoneStage(AbstractOperationContext.java:874)
    at org.jboss.as.controller@15.0.1.Final//org.jboss.as.controller.AbstractOperationContext.processStages(AbstractOperationContext.java:805)
    at org.jboss.as.controller@15.0.1.Final//org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:468)
    at org.jboss.as.controller@15.0.1.Final//org.jboss.as.controller.ParallelBootOperationStepHandler$ParallelBootTask.run(ParallelBootOperationStepHandler.java:384)
    at org.jboss.threads@2.4.0.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
    at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
    at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
    at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
    at java.base/java.lang.Thread.run(Thread.java:829)
    at org.jboss.threads@2.4.0.Final//org.jboss.threads.JBossThread.run(JBossThread.java:513)
</code></pre>
<p>The user I have given to keycloak is already created as well as the database as in <a href="https://medium.com/@pratik.dandavate/setting-up-keycloak-standalone-with-mysql-database-7ebb614cc229" rel="nofollow noreferrer">here</a>.</p>
<p>I am not sure why there is an error like - <code>java.lang.RuntimeException: WFLYCTL0195: Interrupted awaiting transaction commit or rollback</code></p>
<p>This is really confusing. The same keycloak runs without MySQL totally fine.</p>

mifol68042
<p>You can try with defining module as :</p>
<pre><code>&lt;module xmlns=&quot;urn:jboss:module:1.1&quot; name=&quot;com.mysql&quot;&gt;
&lt;resources&gt;
    &lt;resource-root path=&quot;mysql-connector-java-8.0.26.jar&quot;/&gt;
&lt;/resources&gt;
&lt;dependencies&gt;
    &lt;module name=&quot;javax.api&quot;/&gt;
    &lt;module name=&quot;javax.transaction.api&quot;/&gt;
&lt;/dependencies&gt;
</code></pre>

<p>And based on this module use driver in standalone.xml as:</p>
<pre><code>&lt;driver name=&quot;mysql&quot; module=&quot;com.mysql&quot;&gt;
       &lt;xa-datasource-class&gt;com.mysql.cj.jdbc.MysqlXADataSource&lt;/xa-datasource-class&gt;
&lt;/driver&gt;
</code></pre>
<p>This is what helped me to get ride of this issue.</p>
