<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>Yes, when I provision the environment, Terraform brings up everything at the same time. I'll have to put a delay in for starting one of the containers.</div>
<div><br>
</div>
<div>I saw a different SQL error under similar circumstances, so I'm pretty sure it's that.</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>Stian Thorgersen <<a href="mailto:sthorger@redhat.com">sthorger@redhat.com</a>><br>
<span style="font-weight:bold">Reply-To: </span>"<a href="mailto:stian@redhat.com">stian@redhat.com</a>" <<a href="mailto:stian@redhat.com">stian@redhat.com</a>><br>
<span style="font-weight:bold">Date: </span>Wednesday, February 17, 2016 at 2:01 AM<br>
<span style="font-weight:bold">To: </span>"<a href="mailto:pblair@clearme.com">pblair@clearme.com</a>" <<a href="mailto:pblair@clearme.com">pblair@clearme.com</a>><br>
<span style="font-weight:bold">Subject: </span>Re: [keycloak-user] 1.8.1.Final SQL error<br>
</div>
<div><br>
</div>
<div>
<div>
<p dir="ltr">Did you start two Keycloak containers at the same time pointing to the same db?</p>
<div class="gmail_quote">On 16 Feb 2016 21:35, "Paul Blair" <<a href="mailto:pblair@clearme.com">pblair@clearme.com</a>> wrote:<br type="attribution">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word;color:rgb(0,0,0);font-size:14px;font-family:Calibri,sans-serif">
<div>This doesn't seem to have recurred. Not sure what happened there.</div>
<div><br>
</div>
<span>
<div style="font-family:Calibri;font-size:11pt;text-align:left;color:black;BORDER-BOTTOM:medium none;BORDER-LEFT:medium none;PADDING-BOTTOM:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;BORDER-TOP:#b5c4df 1pt solid;BORDER-RIGHT:medium none;PADDING-TOP:3pt">
<span style="font-weight:bold">From: </span><<a href="mailto:keycloak-user-bounces@lists.jboss.org" target="_blank">keycloak-user-bounces@lists.jboss.org</a>> on behalf of "<a href="mailto:pblair@clearme.com" target="_blank">pblair@clearme.com</a>" <<a href="mailto:pblair@clearme.com" target="_blank">pblair@clearme.com</a>><br>
<span style="font-weight:bold">Date: </span>Tuesday, February 16, 2016 at 2:40 PM<br>
<span style="font-weight:bold">To: </span>"<a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a>" <<a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a>><br>
<span style="font-weight:bold">Subject: </span>[keycloak-user] 1.8.1.Final SQL error<br>
</div>
<div><br>
</div>
<div>
<div style="word-wrap:break-word;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 style="white-space:pre-wrap"></span>at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:316)</div>
<div><span style="white-space:pre-wrap"></span>at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:55)</div>
<div><span style="white-space:pre-wrap"></span>at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:122)</div>
<div><span style="white-space:pre-wrap"></span>at liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1247)</div>
<div><span style="white-space:pre-wrap"></span>at liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1230)</div>
<div><span style="white-space:pre-wrap"></span>at liquibase.changelog.ChangeSet.execute(ChangeSet.java:548)</div>
<div><span style="white-space:pre-wrap"></span>at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:51)</div>
<div><span style="white-space:pre-wrap"></span>at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:73)</div>
</div>
<div>
<div><span style="white-space:pre-wrap"></span>at liquibase.Liquibase.update(Liquibase.java:210)</div>
<div><span style="white-space:pre-wrap"></span>at liquibase.Liquibase.update(Liquibase.java:190)</div>
<div><span style="white-space:pre-wrap"></span>at liquibase.Liquibase.update(Liquibase.java:186)</div>
<div><span style="white-space:pre-wrap"></span>at org.keycloak.connections.jpa.updater.liquibase.LiquibaseJpaUpdaterProvider.update(LiquibaseJpaUpdaterProvider.java:84)</div>
<div><span style="white-space:pre-wrap"></span>at org.keycloak.connections.jpa.DefaultJpaConnectionProviderFactory.lazyInit(DefaultJpaConnectionProviderFactory.java:153)</div>
<div><span style="white-space:pre-wrap"></span>at org.keycloak.connections.jpa.DefaultJpaConnectionProviderFactory.create(DefaultJpaConnectionProviderFactory.java:42)</div>
<div><span style="white-space:pre-wrap"></span>at org.keycloak.connections.jpa.DefaultJpaConnectionProviderFactory.create(DefaultJpaConnectionProviderFactory.java:30)</div>
<div><span style="white-space:pre-wrap"></span>at org.keycloak.services.DefaultKeycloakSession.getProvider(DefaultKeycloakSession.java:103)</div>
<div><span style="white-space:pre-wrap"></span>at org.keycloak.models.jpa.JpaRealmProviderFactory.create(JpaRealmProviderFactory.java:34)</div>
<div><span style="white-space:pre-wrap"></span>at org.keycloak.models.jpa.JpaRealmProviderFactory.create(JpaRealmProviderFactory.java:16)</div>
<div><span style="white-space:pre-wrap"></span>at org.keycloak.services.DefaultKeycloakSession.getProvider(DefaultKeycloakSession.java:103)</div>
<div><span style="white-space:pre-wrap"></span>at org.keycloak.models.cache.infinispan.DefaultCacheRealmProvider.getDelegate(DefaultCacheRealmProvider.java:61)</div>
<div><span style="white-space:pre-wrap"></span>at org.keycloak.models.cache.infinispan.DefaultCacheRealmProvider.getMigrationModel(DefaultCacheRealmProvider.java:43)</div>
</div>
<div>
<div><span style="white-space:pre-wrap"></span>at org.keycloak.migration.MigrationModelManager.migrate(MigrationModelManager.java:21)</div>
<div><span style="white-space:pre-wrap"></span>at org.keycloak.services.resources.KeycloakApplication.migrateModel(KeycloakApplication.java:139)</div>
<div><span style="white-space:pre-wrap"></span>at org.keycloak.services.resources.KeycloakApplication.<init>(KeycloakApplication.java:82)</div>
<div><span style="white-space:pre-wrap"></span>at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)</div>
<div><span style="white-space:pre-wrap"></span>at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)</div>
<div><span style="white-space:pre-wrap"></span>at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)</div>
<div><span style="white-space:pre-wrap"></span>at java.lang.reflect.Constructor.newInstance(Constructor.java:408)</div>
<div><span style="white-space:pre-wrap"></span>at org.jboss.resteasy.core.ConstructorInjectorImpl.construct(ConstructorInjectorImpl.java:150)</div>
<div><span style="white-space:pre-wrap"></span>at org.jboss.resteasy.spi.ResteasyProviderFactory.createProviderInstance(ResteasyProviderFactory.java:2209)</div>
<div><span style="white-space:pre-wrap"></span>at org.jboss.resteasy.spi.ResteasyDeployment.createApplication(ResteasyDeployment.java:299)</div>
<div><span style="white-space:pre-wrap"></span>at org.jboss.resteasy.spi.ResteasyDeployment.start(ResteasyDeployment.java:240)</div>
<div><span style="white-space:pre-wrap"></span>at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.init(ServletContainerDispatcher.java:113)</div>
<div><span style="white-space:pre-wrap"></span>at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.init(HttpServletDispatcher.java:36)</div>
<div><span style="white-space:pre-wrap"></span>at io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:117)</div>
<div><span style="white-space:pre-wrap"></span>at org.wildfly.extension.undertow.security.RunAsLifecycleInterceptor.init(RunAsLifecycleInterceptor.java:78)</div>
<div><span style="white-space:pre-wrap"></span>at io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:103)</div>
<div><span style="white-space:pre-wrap"></span>at io.undertow.servlet.core.ManagedServlet$DefaultInstanceStrategy.start(ManagedServlet.java:231)</div>
<div><span style="white-space:pre-wrap"></span>at io.undertow.servlet.core.ManagedServlet.createServlet(ManagedServlet.java:132)</div>
<div><span style="white-space:pre-wrap"></span>at io.undertow.servlet.core.DeploymentManagerImpl.start(DeploymentManagerImpl.java:526)</div>
<div><span style="white-space:pre-wrap"></span>at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:101)</div>
<div><span style="white-space:pre-wrap"></span>at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:82)</div>
<div><span style="white-space:pre-wrap"></span>at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)</div>
<div><span style="white-space:pre-wrap"></span>at java.util.concurrent.FutureTask.run(FutureTask.java:266)</div>
<div><span style="white-space:pre-wrap"></span>at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)</div>
<div><span style="white-space:pre-wrap"></span>at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)</div>
<div><span style="white-space:pre-wrap"></span>at java.lang.Thread.run(Thread.java:745)</div>
<div><span style="white-space:pre-wrap"></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 style="white-space:pre-wrap"></span>at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2198)</div>
<div><span style="white-space:pre-wrap"></span>at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1927)</div>
<div><span style="white-space:pre-wrap"></span>at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)</div>
<div><span style="white-space:pre-wrap"></span>at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:561)</div>
<div><span style="white-space:pre-wrap"></span>at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:405)</div>
<div><span style="white-space:pre-wrap"></span>at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:397)</div>
<div><span style="white-space:pre-wrap"></span>at org.jboss.jca.adapters.jdbc.WrappedStatement.execute(WrappedStatement.java:198)</div>
<div><span style="white-space:pre-wrap"></span>at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:314)</div>
<div><span style="white-space:pre-wrap"></span>... 47 more</div>
</div>
</div>
</div>
</span></div>
<br>
_______________________________________________<br>
keycloak-user mailing list<br>
<a href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><br>
</blockquote>
</div>
</div>
</div>
</span>
</body>
</html>