<div dir="ltr"><div>Can you confirm that you see the following lines in your host-controller.log:</div><br>[Server:authentication-server-demosetup] 15:58:23,220 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 72) WFLYUT0021: Registered web context: /auth<br>[Server:authentication-server-demosetup] 15:58:23,267 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 36) WFLYSRV0010: Deployed &quot;keycloak-server.war&quot; (runtime-name : &quot;keycloak-server.war&quot;)<div><br></div><div><br></div><div>What does the following url show: <a href="http://localhost:8180/auth">http://localhost:8180/auth</a></div><div><br></div><div>Infinispan in HA mode ensures there is a distributed cache layer in use. It means there are not two local caches with possibly different states. That&#39;s important if you use round-robin front end proxy without sticky sessions. Otherwise you may see strange Admin UI behaviour.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 4, 2015 at 3:31 PM, Andrej P <span dir="ltr">&lt;<a href="mailto:ado.boj.83@gmail.com" target="_blank">ado.boj.83@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Again inside text are my answers.<div><br></div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Wed, Nov 4, 2015 at 2:49 PM, Marko Strukelj <span dir="ltr">&lt;<a href="mailto:mstrukel@redhat.com" target="_blank">mstrukel@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Your log.txt doesn&#39;t look right. Only a host controller is started - no server running your idbt-ha profile is started at all.<div><br></div><div>There should be entries in the log looking like:</div><div><br></div>[Server:configuration-server-demosetup] 15:58:05,712 INFO  [org.jboss.modules] (main) JBoss Modules version 1.4.3.Final<br>[Server:configuration-server-demosetup] 15:58:06,017 INFO  [org.jboss.msc] (main) JBoss MSC version 1.2.6.Final<br>[Server:configuration-server-demosetup] 15:58:06,118 INFO  [<a href="http://org.jboss.as" target="_blank">org.jboss.as</a>] (MSC service thread 1-6) WFLYSRV0049: WildFly Full 9.0.1.Final (WildFly Core 1.0.1.Final) starting </div></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>...</div></div></blockquote></span><div>   <font color="#ff0000">In log /opt/wildfly-9.0.1.Final/domain/log/host-controller.log are presnt your requested lines (log.txt was copied from command line)</font></div><div><font color="#ff0000">   2015-11-04 13:38:43,479 INFO  [org.jboss.as.host.controller] (Controller Boot Thread) WFLYHC0023: Starting server configuration-server-demosetup</font></div><div><font color="#ff0000">  2015-11-04 13:38:46,125 INFO  [org.jboss.as.host.controller] (Remoting &quot;demosetup:MANAGEMENT&quot; task-4) WFLYHC0021: Server [Server:configuration-server-demosetup] connected using    connection [Channel ID 656dd302 (inbound) of Remoting connection 1d425566 to /<a href="http://127.0.0.1:50449" target="_blank">127.0.0.1:50449</a>]</font></div><div><font color="#ff0000">  2015-11-04 13:38:46,193 INFO  [org.jboss.as.host.controller] (Controller Boot Thread) WFLYHC0023: Starting server authentication-server-demosetup</font></div><div><font color="#ff0000">2015-11-04 13:38:46,246 INFO  [org.jboss.as.host.controller] (server-registration-threads - 1) WFLYHC0020: Registering server configuration-server-demosetup</font></div><div><font color="#ff0000">2015-11-04 13:38:53,794 INFO  [org.jboss.as.host.controller] (Remoting &quot;demosetup:MANAGEMENT&quot; task-8) WFLYHC0021: Server [Server:authentication-server-demosetup] connected using connection [Channel ID 3e8ad11c (inbound) of Remoting connection 67282c6a to /<a href="http://127.0.0.1:52804" target="_blank">127.0.0.1:52804</a>]</font></div><div><font color="#ff0000">2015-11-04 13:38:53,867 INFO  [org.jboss.as.host.controller] (server-registration-threads - 1) WFLYHC0020: Registering server authentication-server-demosetup</font></div><span class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><br></div><div><br></div><div>There must be a problem with your host.xml file. You should have a server definition there referring to one of your server groups, for example:</div><br>&lt;servers&gt;<br>        &lt;server name=&quot;configuration-server-demosetup&quot; group=&quot;group-authentication&quot;/&gt;<div>        ...</div><div>&lt;/servers&gt;</div></div></blockquote></span><div>   <font color="#ff0000">I attached host-idbt.xml now and from my point of view it looks fine.</font></div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>Also, in domain-idbt.xml your Infinispan cache is configured to be local. For distributed setup you should be using distributed Infinispan cache:</div><div><br></div>              &lt;cache-container name=&quot;keycloak&quot; jndi-name=&quot;infinispan/Keycloak&quot;&gt;<br>                    &lt;transport lock-timeout=&quot;60000&quot;/&gt;<br>                    &lt;invalidation-cache name=&quot;realms&quot; mode=&quot;SYNC&quot;/&gt;<br>                    &lt;invalidation-cache name=&quot;users&quot; mode=&quot;SYNC&quot;/&gt;<br>                    &lt;distributed-cache name=&quot;sessions&quot; mode=&quot;SYNC&quot; owners=&quot;1&quot;/&gt;<br>                    &lt;distributed-cache name=&quot;loginFailures&quot; mode=&quot;SYNC&quot; owners=&quot;1&quot;/&gt;<br>              &lt;/cache-container&gt;</div></blockquote></span><div>   <font color="#ff0000">In previous attached domain-idbt.xml I configured Infinispan cache like local not distributed, is it conflict, have to be in HA mode?</font></div><div><div class="h5"><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><br></div><div><br></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 4, 2015 at 2:20 PM, Andrej P <span dir="ltr">&lt;<a href="mailto:ado.boj.83@gmail.com" target="_blank">ado.boj.83@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Hi Marko,<div><br></div><div>thanks for your hints, I went through but still w/o positive result.</div><div>I will write my comments inside your hints.</div><div>I attached 2 files: domain-idbt.xml - with added sections for keycloak</div><div>                          log.txt - log after start wildfly in command line</div><div><br></div><div>Br,</div><div>Andrej.</div><div class="gmail_extra"><br><div class="gmail_quote"><span>On Tue, Nov 3, 2015 at 4:24 PM, Marko Strukelj <span dir="ltr">&lt;<a href="mailto:mstrukel@redhat.com" target="_blank">mstrukel@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>From your descriptions of the problem it sounds like your server-one which binds to port 8080 doesn&#39;t have keycloak-server configured at all - it&#39;s using a server group, that uses a different profile than the one you configured.</div></div></blockquote></span><div>    <font color="#ff0000">Our group/server/profile setup looks like:</font></div><div><font color="#ff0000">   </font></div><table border="0" cellpadding="0" cellspacing="0" width="395" style="border-collapse:collapse;width:296pt">
 <colgroup><col width="104" style="width:78pt">
 <col width="219" style="width:164pt">
 <col width="72" style="width:54pt">
 </colgroup><tbody><tr height="22" style="height:16.5pt">
  <td height="22" width="104" style="height:16.5pt;width:78pt">  <font color="#ff0000">GROUP</font></td>
  <td width="219" style="border-left-style:none;width:164pt"><font color="#ff0000">SERVER</font></td>
  <td width="72" style="border-left-style:none;width:54pt"><font color="#ff0000">PROFILE</font></td>
 </tr>
 <tr height="21" style="height:15.75pt">
  <td height="21" style="height:15.75pt"><font color="#ff0000">  configuration</font></td>
  <td style="border-left-style:none"><font color="#ff0000">configuration-server-demosetup</font></td>
  <td style="border-left-style:none"><font color="#ff0000">idbt-ha</font></td>
 </tr>
 <tr height="21" style="height:15.75pt">
  <td height="21" style="height:15.75pt;border-top-style:none"><font color="#ff0000">  authentication</font></td>
  <td style="border-top-style:none;border-left-style:none"><font color="#ff0000">authentication-server-demosetup</font></td>
  <td style="border-top-style:none;border-left-style:none"><font color="#ff0000">idbt-ha</font></td>
 </tr></tbody></table><span><div>     </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>There are four profiles in the default domain.xml - default, ha, full, and full-ha</div></div></blockquote></span><div>    <font color="#ff0000">In our domain-idbt.xml are only 2 profiles:idbt-ha and idbt-security and I modified inifinispan for idbt-ha (but ha is only in name not used inside configuration)</font> </div><span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>If you want your multiple Keycloak instances to run in high availability mode, using a shared Infinispan cache, and a shared database, then that&#39;s the most complex of all configurations - you have to setup a standalone database, use &quot;full-ha&quot; profile to configure the datasource with proper database connection url, and configure the distributed Infinispan cache. Also add &lt;subsystem xmlns=&quot;urn:jboss:domain:keycloak-server:1.1&quot;&gt; declaration.</div></div></blockquote><div><br></div></span><div>  <font color="#ff0000">  I created Keycloak_DS, which was before missing.</font></div><div>    <font color="#ff0000">I add : extension; inifinispan and subsystem section for Keycloak inside my domain-idbt.xml (I attached finally modified domain-idbt.xml) Pls you can check it inside.</font> </div><span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div> </div>







<div><br></div><div>In server-groups section define a new group or reuse existing one, and set its profile to &quot;full-ha&quot;, and use &quot;full-ha-sockets&quot; binding group.</div><div>In host.xml make sure that server definitions have the proper group set.</div><div><br></div><div>Then you also have to copy some configurations.</div><div><br></div><div>Assuming you have two servers defined in host.xml - called server-one, and server-two, create a directory:</div><div><br></div><div>$WILDFLY_HOME/domain/servers/server-one/configuration</div><div><div>$WILDFLY_HOME/domain/servers/server-two/configuration</div></div><div><br></div><div>Then copy the following configurations from standalone/configuration:</div><div><br></div><div><div>cp $WILDFLY_HOME/standalone/configuration/keycloak-server.json $WILDFLY_HOME/domain/servers/server-one/configuration/</div><div>cp -r $WILDFLY_HOME/standalone/configuration/themes $WILDFLY_HOME/domain/servers/server-one/configuration/</div><div>cp -r $WILDFLY_HOME/standalone/configuration/providers $WILDFLY_HOME/domain/servers/server-one/configuration/</div></div><div><br></div><div>cp $WILDFLY_HOME/standalone/configuration/keycloak-server.json $WILDFLY_HOME/domain/servers/server-two/configuration/</div><div><div>cp -r $WILDFLY_HOME/standalone/configuration/themes $WILDFLY_HOME/domain/servers/server-two/configuration/</div></div><div><div>cp -r $WILDFLY_HOME/standalone/configuration/providers $WILDFLY_HOME/domain/servers/server-two/configuration/</div></div></div></blockquote><div><br></div></span><div>  <font color="#ff0000">Done all creation and copying steps.</font></div><div><br></div><div><br></div><div> </div></div><br></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div></div></div><br></div></div>
</blockquote></div><br></div>