从keycloak 3.2.1升级到4.5时出现错误

时间:2018-11-07 10:10:32

标签: keycloak

当我将我的密钥斗篷版本从3.2.1升级到4.5时,出现以下异常。如果我从3.2.1转到密钥斗篷4.2.1,我不会得到这个。因此,看起来像是keycloak 4.5特有的东西。

  

[[31m08:36:40,672错误   [org.keycloak.connections.jpa.updater.liquibase.conn.DefaultLiquibaseConnectionProvider]   (ServerService线程池-52)更改集   META-INF / jpa-changelog-3.2.0.xml :: 3.2.0-fix-offline-sessions :: hmlnarik   失败了错误:liquibase.exception.CustomChangeException:仅保留   每个用户和客户端一个脱机会话:更新时发生异常   先前版本中的数据[[0m08:36:40,682 INFO   [org.jboss.as.server](线程2)WFLYSRV0220:服务器关闭已被关闭   通过操作系统信号请求[[31m08:36:40,687错误   [org.jboss.msc.service.fail](ServerService线程池-52)   MSC000001:无法启动服务   jboss.undertow.deployment.default-server.default-host./auth:   服务中的org.jboss.msc.service.StartException   jboss.undertow.deployment.default-server.default-host./auth:   java.lang.RuntimeException:RESTEASY003325:无法构造公共   org.keycloak.services.resources.KeycloakApplication(javax.servlet.ServletContext,org.jboss.resteasy.core.Dispatcher)           在org.wildfly.extension.undertow.deployment.UndertowDeploymentService $ 1.run(UndertowDeploymentService.java:81)           在java.util.concurrent.Executors $ RunnableAdapter.call(Executors.java:511)           在java.util.concurrent.FutureTask.run(FutureTask.java:266)           在org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)           在org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)           在org.jboss.threads.EnhancedQueueExecutor $ ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)           在org.jboss.threads.EnhancedQueueExecutor $ ThreadBody.run(EnhancedQueueExecutor.java:1378)           在java.lang.Thread.run(Thread.java:748)           在org.jboss.threads.JBossThread.run(JBossThread.java:485)导致原因:java.lang.RuntimeException:RESTEASY003325:失败   建设公众   org.keycloak.services.resources.KeycloakApplication(javax.servlet.ServletContext,org.jboss.resteasy.core.Dispatcher)           在org.jboss.resteasy.core.ConstructorInjectorImpl.construct(ConstructorInjectorImpl.java:162)           在org.jboss.resteasy.spi.ResteasyProviderFactory.createProviderInstance(ResteasyProviderFactory.java:2676)           在org.jboss.resteasy.spi.ResteasyDeployment.createApplication(ResteasyDeployment.java:361)           在org.jboss.resteasy.spi.ResteasyDeployment.startInternal(ResteasyDeployment.java:274)           在org.jboss.resteasy.spi.ResteasyDeployment.start(ResteasyDeployment.java:86)           在org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.init(ServletContainerDispatcher.java:119)           在org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.init(HttpServletDispatcher.java:36)           在io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:117)           在org.wildfly.extension.undertow.security.RunAsLifecycleInterceptor.init(RunAsLifecycleInterceptor.java:78)处           在io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:103)           在io.undertow.servlet.core.ManagedServlet $ DefaultInstanceStrategy.start(ManagedServlet.java:300)           在io.undertow.servlet.core.ManagedServlet.createServlet(ManagedServlet.java:140)           在io.undertow.servlet.core.DeploymentManagerImpl $ 2.call(DeploymentManagerImpl.java:584)           在io.undertow.servlet.core.DeploymentManagerImpl $ 2.call(DeploymentManagerImpl.java:555)           在io.undertow.servlet.core.ServletRequestContextThreadSetupAction $ 1.call(ServletRequestContextThreadSetupAction.java:42)           在io.undertow.servlet.core.ContextClassLoaderSetupAction $ 1.call(ContextClassLoaderSetupAction.java:43)           在org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda $ create $ 0(SecurityContextThreadSetupAction.java:105)

1 个答案:

答案 0 :(得分:1)

如果已达到Jboss Transaction Timeout,则可能会弹出此错误。 4.x升级将迁移所有密钥斗篷域;如果您有a lot of realms,这将花费很多时间。

默认情况下,交易超时设置为5分钟¹。要更改超时,您需要在 standalone.xml 文件中同时添加jboss.as.management.blocking.timeoutcoordinator-environment timeout

要将超时设置为2小时,请在</extensions>标签之后添加:

<system-properties>
   <property name="jboss.as.management.blocking.timeout" value="7200"/> 
</system-properties>

第二,搜索<subsystem xmlns="urn:jboss:domain:transactions:4.0">标签并添加

<coordinator-environment default-timeout="7200"/>

标记为孩子。


¹花了大约1个小时来更新我公司的106个领域