gpt4 book ai didi

azure - keycloak 连接到 azure mariadb 服务器

转载 作者:行者123 更新时间:2023-12-03 03:51:57 26 4
gpt4 key购买 nike

我无法从 Azure 云将 keyclaok 连接到 MariaDB 服务器。给出无法打开连接的错误。

连接字符串以及数据库服务器的凭据已连接,但是一旦我运行 keyclaok 容器,就会出现以下错误。

keycloak_1  |   at <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="1d726f7a33777f726e6e33746f7273777c7e7c707c6f3377797f7e7c797c6d69786f6e5d2c3329332f2f335b74737c71" rel="noreferrer noopener nofollow">[email protected]</a>//org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.createLocalManagedConnection(LocalManagedConnectionFactory.java:345)
keycloak_1 | at <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="c4abb6a3eaaea6abb7b7eaadb6abaaaea5a7a5a9a5b6eaaea0a6a7a5a0a5b4b0a1b6b784f5eaf0eaf6f6ea82adaaa5a8" rel="noreferrer noopener nofollow">[email protected]</a>//org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:352)
keycloak_1 | at <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="117e63763f7b737e62623f78637e7f7b7072707c70633f7b757372707570616574636251203f253f23233f57787f707d" rel="noreferrer noopener nofollow">[email protected]</a>//org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:287)
keycloak_1 | at <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="37584550195d55584444195e4558595d5654565a5645195e5a475b7706190319050519715e59565b" rel="noreferrer noopener nofollow">[email protected]</a>//org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreConcurrentLinkedDequeManagedConnectionPool.createConnectionEventListener(SemaphoreConcurrentLinkedDequeManagedConnectionPool.java:1322)
keycloak_1 | at <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="cca3beabe2a6aea3bfbfe2a5bea3a2a6adafada1adbee2a5a1bca08cfde2f8e2fefee28aa5a2ada0" rel="noreferrer noopener nofollow">[email protected]</a>//org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreConcurrentLinkedDequeManagedConnectionPool.getConnection(SemaphoreConcurrentLinkedDequeManagedConnectionPool.java:499)
keycloak_1 | at <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="e28d9085cc88808d9191cc8b908d8c888381838f8390cc8b8f928ea2d3ccd6ccd0d0cca48b8c838e" rel="noreferrer noopener nofollow">[email protected]</a>//org.jboss.jca.core.connectionmanager.pool.AbstractPool.getSimpleConnection(AbstractPool.java:632)
keycloak_1 | at
<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="0a65786d2460686579792463786564606b696b676b7824606e68696b6e6b7a7e6f78794a3b243e243838244c63646b66" rel="noreferrer noopener nofollow">[email protected]</a>//org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:151)
keycloak_1 | at <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="95fae7f2bbfff7fae6e6bbf4e6bbf6fafbfbf0f6e1fae7d5a7a5bba5bba4bbd3fcfbf4f9" rel="noreferrer noopener nofollow">[email protected]</a>//org.jboss.as.connector.subsystems.datasources.WildFlyDataSource.getConnection(WildFlyDataSource.java:64)
keycloak_1 | at <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="016e73662f6a6478626d6e606a2f6a6478626d6e606a2c6c6e65646d2c6b71604130302f312f32" rel="noreferrer noopener nofollow">[email protected]</a>//org.keycloak.connections.jpa.DefaultJpaConnectionProviderFactory.getConnection(DefaultJpaConnectionProviderFactory.java:371)
keycloak_1 | at <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="59362b3e77323c203a3536383277323c203a353638327434363d3c35743329381968687769776a" rel="noreferrer noopener nofollow">[email protected]</a>//org.keycloak.connections.jpa.updater.liquibase.lock.LiquibaseDBLockProvider.lazyInit(LiquibaseDBLockProvider.java:65)
keycloak_1 | at <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="4b24392c65202e322827242a2065202e322827242a206626242f2e2766213b2a0b7a7a657b6578" rel="noreferrer noopener nofollow">[email protected]</a>//org.keycloak.connections.jpa.updater.liquibase.lock.LiquibaseDBLockProvider.lambda$waitForLock$2(LiquibaseDBLockProvider.java:96)
keycloak_1 | at <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="37584550195c524e545b58565c195c524e545b58565c1a4452454152451a44475e1a47455e4156435277060619071904" rel="noreferrer noopener nofollow">[email protected]</a>//org.keycloak.models.utils.KeycloakModelUtils.suspendJtaTransaction(KeycloakModelUtils.java:682)
keycloak_1 | at <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="137c61743d78766a707f7c72783d78766a707f7c72783e7e7c77767f3e7963725322223d233d20" rel="noreferrer noopener nofollow">[email protected]</a>//org.keycloak.connections.jpa.updater.liquibase.lock.LiquibaseDBLockProvider.waitForLock(LiquibaseDBLockProvider.java:94)
keycloak_1 | at <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="e28d9085cc89879b818e8d8389cc89879b818e8d8389cf918790948b818791a2d3d3ccd2ccd1" rel="noreferrer noopener nofollow">[email protected]</a>//org.keycloak.services.resources.KeycloakApplication$1.run(KeycloakApplication.java:135)
keycloak_1 | at <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="b7d8c5d099dcd2ced4dbd8d6dc99dcd2ced4dbd8d6dc9ac4d2c5c1d2c59ac4c7de9ac7c5dec1d6c3d2f7868699879984" rel="noreferrer noopener nofollow">[email protected]</a>//org.keycloak.models.utils.KeycloakModelUtils.runJobInTransaction(KeycloakModelUtils.java:227)
keycloak_1 | at <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="8be4f9eca5e0eef2e8e7e4eae0a5e0eef2e8e7e4eae0a6f8eef9fde2e8eef8cbbabaa5bba5b8" rel="noreferrer noopener nofollow">[email protected]</a>//org.keycloak.services.resources.KeycloakApplication.startup(KeycloakApplication.java:128)
keycloak_1 | at <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="1b74697c35717974686835697e686f7e7a686235697e686f7e7a686236717a6369685b28352a29352a355d72757a77" rel="noreferrer noopener nofollow">[email protected]</a>//org.jboss.resteasy.spi.ResteasyDeployment.startInternal(ResteasyDeployment.java:283)
keycloak_1 | at <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="56392431783c3439252578243325223337252f78243325223337252f7b3c372e24251665786764786778103f38373a" rel="noreferrer noopener nofollow">[email protected]</a>//org.jboss.resteasy.spi.ResteasyDeployment.start(ResteasyDeployment.java:93)
<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="70191f5e051e141502041f075e031502061c150430425e415e435e36191e111c" rel="noreferrer noopener nofollow">[email protected]</a>//io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:103)
keycloak_1 | at <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="ff9690d18a919b9a8d8b9088d18c9a8d89939a8bbfcdd1ced1ccd1b996919e93" rel="noreferrer noopener nofollow">[email protected]</a>//io.undertow.servlet.core.ManagedServlet$DefaultInstanceStrategy.start(ManagedServlet.java:305)
keycloak_1 | at <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="7b1214550e151f1e090f140c55081e090d171e0f3b49554a5548553d12151a17" rel="noreferrer noopener nofollow">[email protected]</a>//io.undertow.servlet.core.ManagedServlet.createServlet(ManagedServlet.java:145)
keycloak_1 | at <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="036a6c2d766d676671776c742d706671756f667743312d322d302d456a6d626f" rel="noreferrer noopener nofollow">[email protected]</a>//io.undertow.servlet.core.DeploymentManagerImpl$2.call(DeploymentManagerImpl.java:585)
keycloak_1 | at <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="630a0c4d160d070611170c144d100611150f061723514d524d504d250a0d020f" rel="noreferrer noopener nofollow">[email protected]</a>//io.undertow.servlet.core.DeploymentManagerImpl$2.call(DeploymentManagerImpl.java:556)
keycloak_1 | at <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="a3cacc8dd6cdc7c6d1d7ccd48dd0c6d1d5cfc6d7e3918d928d908de5cacdc2cf" rel="noreferrer noopener nofollow">[email protected]</a>//io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42)
keycloak_1 | at io.undertow.s
'keycloak'
keycloak_1 | at org.mariadb.jdbc//org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.get(ExceptionMapper.java:243)
keycloak_1 | at org.mariadb.jdbc//org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.connectWithoutProxy(AbstractConnectProtocol.java:1243)
keycloak_1 | at org.mariadb.jdbc//org.mariadb.jdbc.internal.util.Utils.retrieveProxy(Utils.java:622)
keycloak_1 | at org.mariadb.jdbc//org.mariadb.jdbc.MariaDbConnection.newConnection(MariaDbConnection.java:142)
keycloak_1 | at org.mariadb.jdbc//org.mariadb.jdbc.Driver.connect(Driver.java:86)
keycloak_1 | at <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="d9b6abbef7b3bbb6aaaaf7b0abb6b7b3b8bab8b4b8abf7b3bdbbbab8bdb8a9adbcabaa99e8f7edf7ebebf79fb0b7b8b5" rel="noreferrer noopener nofollow">[email protected]</a>//org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.createLocalManagedConnection(LocalManagedConnectionFactory.java:321)
keycloak_1 | ... 57 more
keycloak_1 | Caused by: java.sql.SQLException: Unknown database 'keycloak'
keycloak_1 | at org.mariadb.jdbc//org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.authenticationHandler(AbstractConnectProtocol.java:729)
keycloak_1 | at org.mariadb.jdbc//org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.createConnection(AbstractConnectProtocol.java:507)
keycloak_1 | at org.mariadb.jdbc//org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.connectWithoutProxy(AbstractConnectProtocol.java:1238)
keycloak_1 | ... 61 more
keycloak_1 |
keycloak_1 | 21:04:14,492 FATAL [org.keycloak.services] (ServerService Thread Pool -- 61) Error during startup: java.lang.RuntimeException: Failed to connect to database

最佳答案

您使用的是 docker-compose 文件吗?很高兴看到它以提供帮助

关于azure - keycloak 连接到 azure mariadb 服务器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66323492/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com