<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<div>I've just installed Keycloak 1.8.1.Final in a clean environment with a new Postgres database instance. I'm getting an error on startup that the column direct_grants_only does not exist on the CLIENT table. When I log in to the database I can confirm it's
not there; otherwise the tables all seem to be set up, and the CLIENT table does have a direct_access_grants_enabled column. I've verified that the server is running WildFly 10.0.0.Final and that all the Keycloak jars under ./modules/system/layers/base/org/keycloak/keycloak-core/main
are 1.8.1.Final. I've diffed all the config files where we made changes against older versions of Keycloak and applied them to 1.8.1.Final, and nothing seems relevant.</div>
<div><br>
</div>
<div>Also odd is that I have two Keycloak instances running in two separate Docker containers and that I only see this error in one of them. They were both created at the same time by Terraform in exactly the same way.</div>
<div><br>
</div>
<div>Any idea what this might be coming from?</div>
<div><br>
</div>
<div>
<div>17:04:30,706 INFO [org.keycloak.services.resources.KeycloakApplication] (ServerService Thread Pool -- 50) Load config from /opt/jboss/wildfly/standalone/configuration/keycloak-server.json</div>
<div>17:04:33,048 INFO [org.keycloak.connections.jpa.updater.liquibase.LiquibaseJpaUpdaterProvider] (ServerService Thread Pool -- 50) Updating database</div>
<div>17:04:43,154 ERROR [org.keycloak.connections.jpa.updater.liquibase.LiquibaseJpaUpdaterProvider] (ServerService Thread Pool -- 50) Change Set META-INF/jpa-changelog-1.2.0.Final.xml::1.2.0.Final::keycloak failed. Error: ERROR: column "direct_grants_only"
does not exist</div>
<div> Position: 59 [Failed SQL: UPDATE public.CLIENT SET DIRECT_GRANTS_ONLY = FALSE WHERE DIRECT_GRANTS_ONLY is null]: liquibase.exception.DatabaseException: ERROR: column "direct_grants_only" does not exist</div>
<div> Position: 59 [Failed SQL: UPDATE public.CLIENT SET DIRECT_GRANTS_ONLY = FALSE WHERE DIRECT_GRANTS_ONLY is null]</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:316)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:55)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:122)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1247)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1230)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at liquibase.changelog.ChangeSet.execute(ChangeSet.java:548)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:51)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:73)</div>
</div>
<div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at liquibase.Liquibase.update(Liquibase.java:210)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at liquibase.Liquibase.update(Liquibase.java:190)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at liquibase.Liquibase.update(Liquibase.java:186)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at org.keycloak.connections.jpa.updater.liquibase.LiquibaseJpaUpdaterProvider.update(LiquibaseJpaUpdaterProvider.java:84)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at org.keycloak.connections.jpa.DefaultJpaConnectionProviderFactory.lazyInit(DefaultJpaConnectionProviderFactory.java:153)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at org.keycloak.connections.jpa.DefaultJpaConnectionProviderFactory.create(DefaultJpaConnectionProviderFactory.java:42)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at org.keycloak.connections.jpa.DefaultJpaConnectionProviderFactory.create(DefaultJpaConnectionProviderFactory.java:30)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at org.keycloak.services.DefaultKeycloakSession.getProvider(DefaultKeycloakSession.java:103)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at org.keycloak.models.jpa.JpaRealmProviderFactory.create(JpaRealmProviderFactory.java:34)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at org.keycloak.models.jpa.JpaRealmProviderFactory.create(JpaRealmProviderFactory.java:16)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at org.keycloak.services.DefaultKeycloakSession.getProvider(DefaultKeycloakSession.java:103)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at org.keycloak.models.cache.infinispan.DefaultCacheRealmProvider.getDelegate(DefaultCacheRealmProvider.java:61)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at org.keycloak.models.cache.infinispan.DefaultCacheRealmProvider.getMigrationModel(DefaultCacheRealmProvider.java:43)</div>
</div>
<div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at org.keycloak.migration.MigrationModelManager.migrate(MigrationModelManager.java:21)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at org.keycloak.services.resources.KeycloakApplication.migrateModel(KeycloakApplication.java:139)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at org.keycloak.services.resources.KeycloakApplication.<init>(KeycloakApplication.java:82)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at java.lang.reflect.Constructor.newInstance(Constructor.java:408)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at org.jboss.resteasy.core.ConstructorInjectorImpl.construct(ConstructorInjectorImpl.java:150)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at org.jboss.resteasy.spi.ResteasyProviderFactory.createProviderInstance(ResteasyProviderFactory.java:2209)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at org.jboss.resteasy.spi.ResteasyDeployment.createApplication(ResteasyDeployment.java:299)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at org.jboss.resteasy.spi.ResteasyDeployment.start(ResteasyDeployment.java:240)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.init(ServletContainerDispatcher.java:113)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.init(HttpServletDispatcher.java:36)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:117)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at org.wildfly.extension.undertow.security.RunAsLifecycleInterceptor.init(RunAsLifecycleInterceptor.java:78)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:103)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at io.undertow.servlet.core.ManagedServlet$DefaultInstanceStrategy.start(ManagedServlet.java:231)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at io.undertow.servlet.core.ManagedServlet.createServlet(ManagedServlet.java:132)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at io.undertow.servlet.core.DeploymentManagerImpl.start(DeploymentManagerImpl.java:526)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:101)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:82)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at java.util.concurrent.FutureTask.run(FutureTask.java:266)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at java.lang.Thread.run(Thread.java:745)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at org.jboss.threads.JBossThread.run(JBossThread.java:320)</div>
</div>
<div>
<div>Caused by: org.postgresql.util.PSQLException: ERROR: column "direct_grants_only" does not exist</div>
<div> Position: 59</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2198)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1927)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:561)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:405)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:397)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at org.jboss.jca.adapters.jdbc.WrappedStatement.execute(WrappedStatement.java:198)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:314)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>... 47 more</div>
</div>
</body>
</html>