<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Yeah just tried:<div class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;invalidation-cache name="realms" mode="SYNC" &nbsp;start="EAGER"/&gt;<br class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;invalidation-cache name="users" mode="SYNC" start="EAGER"/&gt;<br class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;distributed-cache name="sessions" mode="SYNC" owners="2" segments="60" &nbsp;start="EAGER"&gt;<br class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;state-transfer enabled="true" /&gt;<br class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/distributed-cache&gt;<br class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;distributed-cache name="loginFailures" mode="SYNC" owners="2" segments="60" &nbsp;start="EAGER"&gt;<br class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;state-transfer enabled="true" /&gt;<br class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/distributed-cache&gt;</div><div class=""><br class=""></div><div class="">Scenario:</div><div class="">&nbsp;- node1 is up</div><div class="">&nbsp;- I’m logged in in node 1</div><div class="">&nbsp;- starting node 2</div><div class=""><br class=""></div><div class="">I get on node1:</div><div class=""><div class="">15:00:45,988 INFO &nbsp;[org.infinispan.remoting.transport.jgroups.JGroupsTransport] (Incoming-1,shared=udp) ISPN000094: Received new cluster view: [node1/keycloak|1] [node1/keycloak, node2/keycloak]</div><div class="">15:00:46,706 ERROR [org.infinispan.statetransfer.OutboundTransferTask] (transport-thread-18) Failed to send entries to node node2/keycloak : ISPN000217: Received exception from node2/keycloak, see cause for remote stack trace: org.infinispan.remoting.RemoteException: ISPN000217: Received exception from node2/keycloak, see cause for remote stack trace</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.infinispan.remoting.transport.AbstractTransport.checkResponse(AbstractTransport.java:60)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.processSingleCall(CommandAwareRpcDispatcher.java:310)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.invokeRemoteCommand(CommandAwareRpcDispatcher.java:179)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.infinispan.remoting.transport.jgroups.JGroupsTransport.invokeRemotely(JGroupsTransport.java:515)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:173)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:194)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.infinispan.statetransfer.OutboundTransferTask.sendEntries(OutboundTransferTask.java:257)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.infinispan.statetransfer.OutboundTransferTask.run(OutboundTransferTask.java:187)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [rt.jar:1.8.0_40]</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_40]</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [rt.jar:1.8.0_40]</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_40]</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_40]</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_40]</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_40]</div><div class="">Caused by: org.infinispan.CacheException: Problems invoking command.</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.handle(CommandAwareRpcDispatcher.java:230)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.blocks.RequestCorrelator.handleRequest(RequestCorrelator.java:484)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.blocks.RequestCorrelator.receiveMessage(RequestCorrelator.java:391)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.blocks.RequestCorrelator.receive(RequestCorrelator.java:249)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:600)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.blocks.mux.MuxUpHandler.up(MuxUpHandler.java:130)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.JChannel.up(JChannel.java:707)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:1025)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.protocols.RSVP.up(RSVP.java:172)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.protocols.FRAG2.up(FRAG2.java:181)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.protocols.FlowControl.up(FlowControl.java:418)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.protocols.FlowControl.up(FlowControl.java:400)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.protocols.pbcast.GMS.up(GMS.java:896)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:245)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.protocols.UNICAST2.handleDataReceived(UNICAST2.java:766)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.protocols.UNICAST2.up(UNICAST2.java:420)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.protocols.pbcast.NAKACK.up(NAKACK.java:645)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.protocols.VERIFY_SUSPECT.up(VERIFY_SUSPECT.java:147)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.protocols.FD.up(FD.java:253)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.protocols.FD_SOCK.up(FD_SOCK.java:288)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.protocols.MERGE3.up(MERGE3.java:290)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.protocols.Discovery.up(Discovery.java:359)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.protocols.TP$ProtocolAdapter.up(TP.java:2607)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.protocols.TP.passMessageUp(TP.java:1260)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.protocols.TP$IncomingPacket.handleMyMessage(TP.java:1822)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jgroups.protocols.TP$IncomingPacket.run(TP.java:1795)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>... 3 more</div><div class="">Caused by: java.io.InvalidClassException: org.keycloak.models.sessions.infinispan.entities.ClientSessionEntity; Module load failed</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jboss.marshalling.ModularClassResolver.resolveClass(ModularClassResolver.java:104)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jboss.marshalling.river.RiverUnmarshaller.doReadClassDescriptor(RiverUnmarshaller.java:948)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1255)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:276)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:41)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.infinispan.container.entries.ImmortalCacheEntry$Externalizer.readObject(ImmortalCacheEntry.java:160)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.infinispan.container.entries.ImmortalCacheEntry$Externalizer.readObject(ImmortalCacheEntry.java:150)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.infinispan.marshall.jboss.ExternalizerTable$ExternalizerAdapter.readObject(ExternalizerTable.java:406)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.infinispan.marshall.jboss.ExternalizerTable.readObject(ExternalizerTable.java:226)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.infinispan.marshall.jboss.JBossMarshaller$ExternalizerTableProxy.readObject(JBossMarshaller.java:167)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:354)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:41)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.infinispan.marshall.exts.ArrayListExternalizer.readObject(ArrayListExternalizer.java:57)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.infinispan.marshall.exts.ArrayListExternalizer.readObject(ArrayListExternalizer.java:45)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.infinispan.marshall.jboss.ExternalizerTable$ExternalizerAdapter.readObject(ExternalizerTable.java:406)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.infinispan.marshall.jboss.ExternalizerTable.readObject(ExternalizerTable.java:226)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.infinispan.marshall.jboss.JBossMarshaller$ExternalizerTableProxy.readObject(JBossMarshaller.java:167)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:354)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:41)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.infinispan.statetransfer.StateChunk$Externalizer.readObject(StateChunk.java:111)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.infinispan.statetransfer.StateChunk$Externalizer.readObject(StateChunk.java:88)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.infinispan.marshall.jboss.ExternalizerTable$ExternalizerAdapter.readObject(ExternalizerTable.java:406)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.infinispan.marshall.jboss.ExternalizerTable.readObject(ExternalizerTable.java:226)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.infinispan.marshall.jboss.JBossMarshaller$ExternalizerTableProxy.readObject(JBossMarshaller.java:167)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:354)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:41)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.infinispan.marshall.exts.ArrayListExternalizer.readObject(ArrayListExternalizer.java:57)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.infinispan.marshall.exts.ArrayListExternalizer.readObject(ArrayListExternalizer.java:45)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.infinispan.marshall.jboss.ExternalizerTable$ExternalizerAdapter.readObject(ExternalizerTable.java:406)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.infinispan.marshall.jboss.ExternalizerTable.readObject(ExternalizerTable.java:226)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.infinispan.marshall.jboss.JBossMarshaller$ExternalizerTableProxy.readObject(JBossMarshaller.java:167)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:354)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:41)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.infinispan.marshall.exts.ReplicableCommandExternalizer.readParameters(ReplicableCommandExternalizer.java:130)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.infinispan.marshall.exts.CacheRpcCommandExternalizer.readObject(CacheRpcCommandExternalizer.java:158)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.infinispan.marshall.exts.CacheRpcCommandExternalizer.readObject(CacheRpcCommandExternalizer.java:73)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.infinispan.marshall.jboss.ExternalizerTable$ExternalizerAdapter.readObject(ExternalizerTable.java:406)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.infinispan.marshall.jboss.ExternalizerTable.readObject(ExternalizerTable.java:226)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.infinispan.marshall.jboss.JBossMarshaller$ExternalizerTableProxy.readObject(JBossMarshaller.java:167)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:354)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:41)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.infinispan.marshall.jboss.AbstractJBossMarshaller.objectFromObjectStream(AbstractJBossMarshaller.java:163)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.infinispan.marshall.VersionAwareMarshaller.objectFromByteBuffer(VersionAwareMarshaller.java:121)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.infinispan.marshall.AbstractDelegatingMarshaller.objectFromByteBuffer(AbstractDelegatingMarshaller.java:104)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.infinispan.remoting.transport.jgroups.MarshallerAdapter.objectFromBuffer(MarshallerAdapter.java:50)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.handle(CommandAwareRpcDispatcher.java:215)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>... 28 more</div><div class="">Caused by: org.jboss.modules.ModuleNotFoundException: deployment.auth-server.war:main</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:240) [jboss-modules.jar:1.3.6.Final-redhat-1]</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jboss.marshalling.ModularClassResolver.resolveClass(ModularClassResolver.java:102)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>... 79 more</div></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Very similar on node2 plus something like this:</div><div class=""><div class="">15:01:46,574 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 57) MSC000001: Failed to start service jboss.infinispan.keycloak.sessions: org.jboss.msc.service.StartException in service jboss.infinispan.keycloak.sessions: org.infinispan.CacheException: Unable to invoke method public void org.infinispan.statetransfer.StateTransferManagerImpl.waitForInitialStateTransferToComplete() throws java.lang.InterruptedException on object of type StateTransferManagerImpl</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.jboss.as.clustering.msc.AsynchronousService$1.run(AsynchronousService.java:91) [jboss-as-clustering-common-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_40]</div></div><div class="">&lt;skipped&gt;</div><div class="">Caused by: org.infinispan.CacheException: Initial state transfer timed out for cache sessions on node2/keycloak<br class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.infinispan.statetransfer.StateTransferManagerImpl.waitForInitialStateTransferToComplete(StateTransferManagerImpl.java:216)<br class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_40]<br class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_40]<br class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_40]<br class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at java.lang.reflect.Method.invoke(Method.java:497) [rt.jar:1.8.0_40]<br class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at org.infinispan.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:203)<br class=""><span class="Apple-tab-span" style="white-space:pre">        </span>... 18 more<br class=""><br class="">15:01:46,581 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014612: Operation ("add") failed - address: ([<br class="">&nbsp; &nbsp; ("subsystem" =&gt; "infinispan"),<br class="">&nbsp; &nbsp; ("cache-container" =&gt; "keycloak"),<br class="">&nbsp; &nbsp; ("distributed-cache" =&gt; "sessions")<br class="">]) - failure description: {"JBAS014671: Failed services" =&gt; {"jboss.infinispan.keycloak.sessions" =&gt; "org.jboss.msc.service.StartException in service&nbsp;jboss.infinispan.keycloak.sessions: org.infinispan.CacheException: Unable to invoke method public void&nbsp;org.infinispan.statetransfer.StateTransferManagerImpl.waitForInitialStateTransferToComplete() throws java.lang.InterruptedException on object of type StateTransferManagerImpl<br class="">&nbsp; &nbsp; Caused by: org.infinispan.CacheException: Unable to invoke method public void org.infinispan.statetransfer.StateTransferManagerImpl.waitForInitialStateTransferToComplete()&nbsp;throws java.lang.InterruptedException on object of type StateTransferManagerImpl<br class="">&nbsp; &nbsp; Caused by: org.infinispan.CacheException: Initial state transfer timed out for cache sessions on node2/keycloak"}}</div><div class=""><br class=""><div class="">
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class="Apple-interchange-newline">Thanks,</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class=""></div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">Libor Krzyžanek</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="http://jboss.org" class="">jboss.org</a>&nbsp;Development Team</div>
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On 27 Apr 2015, at 15:02, Stian Thorgersen &lt;<a href="mailto:stian@redhat.com" class="">stian@redhat.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">----- Original Message -----</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">From: "Libor Krzyžanek" &lt;<a href="mailto:lkrzyzan@redhat.com" class="">lkrzyzan@redhat.com</a>&gt;<br class="">To: "Marek Posolda" &lt;<a href="mailto:mposolda@redhat.com" class="">mposolda@redhat.com</a>&gt;<br class="">Cc: "keycloak-user" &lt;<a href="mailto:keycloak-user@lists.jboss.org" class="">keycloak-user@lists.jboss.org</a>&gt;<br class="">Sent: Monday, 27 April, 2015 2:55:43 PM<br class="">Subject: Re: [keycloak-user] Clustering on localhost with shared DB<br class=""><br class="">Hi,<br class="">yeah this helps little bit:<br class="">&lt;invalidation-cache name="realms" mode="SYNC"/&gt;<br class="">&lt;invalidation-cache name="users" mode="SYNC"/&gt;<br class="">&lt;distributed-cache name="sessions" mode="SYNC" owners="2" segments="60" &gt;<br class="">&lt;state-transfer enabled="true" /&gt;<br class="">&lt;/distributed-cache&gt;<br class="">&lt;distributed-cache name="loginFailures" mode="SYNC" owners="2" segments="60"<br class=""><blockquote type="cite" class=""><br class=""></blockquote>&lt;state-transfer enabled="true" /&gt;<br class="">&lt;/distributed-cache&gt;<br class=""><br class="">When both caches on both nodes are up then syncing works fine.<br class="">Also /sessions works OK.<br class=""><br class="">But I’m still facing issue no 1.<br class=""><br class="">When node is up I see in logs this:<br class=""><br class="">14:51:19,088 INFO [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss<br class="">EAP 6.4.0.GA (AS 7.5.0.Final-redhat-21) started in 18527ms - Started 242 of<br class="">347 services (141 services are lazy, passive or on-demand)<br class=""><br class="">Caches are initialised after first hit not after KC start<br class=""></blockquote><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Have you tried putting start="EAGER" on both the cache-container and all caches in standalone.xml?</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class="">I’m talking about this in log:<br class="">14:51:52,597 INFO [org.infinispan.jmx.CacheJmxRegistration]<br class="">(http-/127.0.0.1:8080-1) ISPN000031: MBeans were successfully registered to<br class="">the platform MBean server.<br class="">14:51:52,605 INFO [org.jboss.as.clustering.infinispan]<br class="">(http-/127.0.0.1:8080-1) JBAS010281: Started users cache from keycloak<br class="">container<br class="">14:51:52,710 INFO [org.infinispan.jmx.CacheJmxRegistration]<br class="">(http-/127.0.0.1:8080-2) ISPN000031: MBeans were successfully registered to<br class="">the platform MBean server.<br class="">14:51:52,815 INFO [org.jboss.as.clustering.infinispan]<br class="">(http-/127.0.0.1:8080-2) JBAS010281: Started sessions cache from keycloak<br class="">container<br class="">14:51:52,822 INFO [org.infinispan.jmx.CacheJmxRegistration]<br class="">(http-/127.0.0.1:8080-2) ISPN000031: MBeans were successfully registered to<br class="">the platform MBean server.<br class="">14:51:52,847 INFO [org.jboss.as.clustering.infinispan]<br class="">(http-/127.0.0.1:8080-2) JBAS010281: Started loginFailures cache from<br class="">keycloak container<br class=""><br class=""><br class=""><br class="">Thanks,<br class=""><br class="">Libor Krzyžanek<br class=""><a href="http://jboss.org" class="">jboss.org</a> Development Team<br class=""><br class=""><br class=""><br class=""><br class="">On 27 Apr 2015, at 14:24, Marek Posolda &lt; <a href="mailto:mposolda@redhat.com" class="">mposolda@redhat.com</a> &gt; wrote:<br class=""><br class="">On 27.4.2015 13:50, Libor Krzyžanek wrote:<br class=""><br class=""><br class="">Hi,<br class="">I have now apache webproxy with this configuration:<br class="">&lt;Proxy *&gt;<br class="">Order allow,deny<br class="">Allow from all<br class="">&lt;/Proxy&gt;<br class="">&lt;Proxy <a href="balancer://app/" class="">balancer://app/</a> &gt;<br class="">BalancerMember <a href="http://localhost:8080" class="">http://localhost:8080</a> route=app02<br class="">BalancerMember <a href="http://localhost:8180" class="">http://localhost:8180</a> route=app03<br class="">ProxySet lbmethod=byrequests<br class="">&lt;/Proxy&gt;<br class="">ProxyPass /balancer-manager !<br class="">ProxyPass /server-status !<br class="">ProxyPass /server-info !<br class="">ProxyPass / <a href="balancer://app/" class="">balancer://app/</a><br class="">ProxyPassReverse / <a href="balancer://app/" class="">balancer://app/</a><br class=""><br class="">It looks it helped.<br class="">When I have started both nodes and I see that caches on both nodes are<br class="">started then everything is fine.<br class="">Scenario: When I login to node1, then stop node1, then I’m redirected to<br class="">node2 and I’m still logged in. Great!<br class=""><br class="">But I see two issues right now:<br class="">1. Caches are replicated to newly started node too late.<br class="">Scenario is:<br class="">1. start node1, log in.<br class="">2. start node2, wait till you see that node1 knows new node and node2 is<br class="">fully started<br class="">3. killl node1.<br class=""><br class="">Then I’m redirected to login page.<br class=""><br class="">This happens really only when no request hits newly started node2. If I do<br class="">few reloads in browser before I kill node1 then I see in logs that those<br class="">infinispan caches are created on node2 and fully replicated.<br class=""><br class="">Is it related to “start = EAGER” ?<br class="">Will it help if you use in standalone-ha.xml the config like this? :<br class=""><br class="">&lt;distributed-cache name="sessions" mode="SYNC" owners="2" segments="60" &gt;<br class="">&lt;state-transfer enabled="true" /&gt;<br class="">&lt;/distributed-cache&gt;<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""><br class="">2. Weird thing is on /account/session page (<br class=""><a href="http://localhost/auth/realms/cluster-test/account/sessions" class="">http://localhost/auth/realms/cluster-test/account/sessions</a> ).<br class=""><br class="">I got:<br class=""><br class="">13:30:50,291 ERROR<br class="">[org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/auth].[Keycloak<br class="">REST Interface]] (http-/127.0.0.1:8080-2) JBWEB000236: Servlet.service() for<br class="">servlet Keycloak REST Interface threw exception: java.lang.RuntimeException:<br class="">request path: /auth/realms/cluster-test/account/sessions<br class="">at<br class="">org.keycloak.services.filters.KeycloakSessionServletFilter.doFilter(KeycloakSessionServletFilter.java:54)<br class="">[keycloak-services-1.2.0.Beta1.jar:1.2.0.Beta1]<br class="">at<br class="">org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)<br class="">[jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]<br class="">at<br class="">org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)<br class="">[jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]<br class="">at<br class="">org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:231)<br class="">[jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]<br class="">at<br class="">org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149)<br class="">[jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]<br class="">at<br class="">org.jboss.modcluster.container.jbossweb.JBossWebContext$RequestListenerValve.event(JBossWebContext.java:91)<br class="">at<br class="">org.jboss.modcluster.container.jbossweb.JBossWebContext$RequestListenerValve.invoke(JBossWebContext.java:72)<br class="">at<br class="">org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50)<br class="">[jboss-as-jpa-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]<br class="">at<br class="">org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50)<br class="">[jboss-as-jpa-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]<br class="">at<br class="">org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169)<br class="">[jboss-as-web-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]<br class="">at<br class="">org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:150)<br class="">[jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]<br class="">at<br class="">org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97)<br class="">[jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]<br class="">at<br class="">org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102)<br class="">[jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]<br class="">at<br class="">org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344)<br class="">[jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]<br class="">at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:854)<br class="">[jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]<br class="">at<br class="">org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653)<br class="">[jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]<br class="">at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:926)<br class="">[jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]<br class="">at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_40]<br class="">Caused by: org.jboss.resteasy.spi.UnhandledException:<br class="">java.lang.IllegalStateException: Cache mode should be DIST, rather than<br class="">REPL_SYNC<br class="">at<br class="">org.jboss.resteasy.core.ExceptionHandler.handleApplicationException(ExceptionHandler.java:76)<br class="">[resteasy-jaxrs-3.0.9.Final.jar:]<br class="">at<br class="">org.jboss.resteasy.core.ExceptionHandler.handleException(ExceptionHandler.java:212)<br class="">[resteasy-jaxrs-3.0.9.Final.jar:]<br class="">at<br class="">org.jboss.resteasy.core.SynchronousDispatcher.writeException(SynchronousDispatcher.java:149)<br class="">[resteasy-jaxrs-3.0.9.Final.jar:]<br class="">at<br class="">org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:372)<br class="">[resteasy-jaxrs-3.0.9.Final.jar:]<br class="">at<br class="">org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:179)<br class="">[resteasy-jaxrs-3.0.9.Final.jar:]<br class="">at<br class="">org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:220)<br class="">[resteasy-jaxrs-3.0.9.Final.jar:]<br class="">at<br class="">org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)<br class="">[resteasy-jaxrs-3.0.9.Final.jar:]<br class="">at<br class="">org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)<br class="">[resteasy-jaxrs-3.0.9.Final.jar:]<br class="">at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)<br class="">[jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-2.jar:1.0.2.Final-redhat-2]<br class="">at<br class="">org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295)<br class="">[jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]<br class="">at<br class="">org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)<br class="">[jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]<br class="">at<br class="">org.keycloak.services.filters.ClientConnectionFilter.doFilter(ClientConnectionFilter.java:41)<br class="">[keycloak-services-1.2.0.Beta1.jar:1.2.0.Beta1]<br class="">at<br class="">org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)<br class="">[jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]<br class="">at<br class="">org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)<br class="">[jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]<br class="">at<br class="">org.keycloak.services.filters.KeycloakSessionServletFilter.doFilter(KeycloakSessionServletFilter.java:40)<br class="">[keycloak-services-1.2.0.Beta1.jar:1.2.0.Beta1]<br class="">... 17 more<br class="">Caused by: java.lang.IllegalStateException: Cache mode should be DIST, rather<br class="">than REPL_SYNC<br class="">at<br class="">org.infinispan.distexec.mapreduce.MapReduceTask.ensureProperCacheState(MapReduceTask.java:685)<br class="">[infinispan-core-5.2.11.Final-redhat-2.jar:5.2.11.Final-redhat-2]<br class="">at<br class="">org.infinispan.distexec.mapreduce.MapReduceTask.&lt;init&gt;(MapReduceTask.java:226)<br class="">[infinispan-core-5.2.11.Final-redhat-2.jar:5.2.11.Final-redhat-2]<br class="">at<br class="">org.infinispan.distexec.mapreduce.MapReduceTask.&lt;init&gt;(MapReduceTask.java:190)<br class="">[infinispan-core-5.2.11.Final-redhat-2.jar:5.2.11.Final-redhat-2]<br class="">at<br class="">org.keycloak.models.sessions.infinispan.InfinispanUserSessionProvider.getUserSessions(InfinispanUserSessionProvider.java:121)<br class="">[keycloak-model-sessions-infinispan-1.2.0.Beta1.jar:1.2.0.Beta1]<br class="">at<br class="">org.keycloak.services.resources.AccountService.sessionsPage(AccountService.java:344)<br class="">[keycloak-services-1.2.0.Beta1.jar:1.2.0.Beta1]<br class="">at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br class="">[rt.jar:1.8.0_40]<br class="">at<br class="">sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)<br class="">[rt.jar:1.8.0_40]<br class="">at<br class="">sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)<br class="">[rt.jar:1.8.0_40]<br class="">at java.lang.reflect.Method.invoke(Method.java:497) [rt.jar:1.8.0_40]<br class="">at<br class="">org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:137)<br class="">[resteasy-jaxrs-3.0.9.Final.jar:]<br class="">at<br class="">org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:296)<br class="">[resteasy-jaxrs-3.0.9.Final.jar:]<br class="">at<br class="">org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:250)<br class="">[resteasy-jaxrs-3.0.9.Final.jar:]<br class="">at<br class="">org.jboss.resteasy.core.ResourceLocatorInvoker.invokeOnTargetObject(ResourceLocatorInvoker.java:140)<br class="">[resteasy-jaxrs-3.0.9.Final.jar:]<br class="">at<br class="">org.jboss.resteasy.core.ResourceLocatorInvoker.invoke(ResourceLocatorInvoker.java:103)<br class="">[resteasy-jaxrs-3.0.9.Final.jar:]<br class="">at<br class="">org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)<br class="">[resteasy-jaxrs-3.0.9.Final.jar:]<br class="">... 28 more<br class=""><br class=""><br class="">Same error I get in admin console (<br class=""><a href="http://localhost/auth/admin/master/console/#/realms/cluster-test/sessions/realm" class="">http://localhost/auth/admin/master/console/#/realms/cluster-test/sessions/realm</a><br class="">)<br class="">Strange... Are you using "distributed-cache" with mode "SYNC" on both cluster<br class="">nodes?<br class=""><br class="">Marek<br class=""><br class=""><br class=""><br class=""><br class="">Thanks,<br class=""><br class="">Libor Krzyžanek<br class="">jboss.org Development Team<br class=""><br class=""><br class=""><br class=""><br class="">On 27 Apr 2015, at 09:05, Libor Krzyžanek &lt; lkrzyzan@redhat.com &gt; wrote:<br class=""><br class="">Hi Marek,<br class="">your’re right that i’m hitting directly localhsot on different ports.<br class=""><br class="">I was thinking about cookies resp. load balancer so I checked cookies and<br class="">they were sent on both ports.<br class=""><br class="">I’ll set up load balancer and I’ll will see.<br class=""><br class="">Thanks,<br class=""><br class="">Libor Krzyžanek<br class="">jboss.org Development Team<br class=""><br class=""><br class=""><br class=""><br class="">On 24 Apr 2015, at 19:06, Marek Posolda &lt; mposolda@redhat.com &gt; wrote:<br class=""><br class="">Hi Libor,<br class=""><br class="">the config files looks good (at least for the first look), but question is if<br class="">you're using loadbalancer?<br class=""><br class="">If you're not using loadbalancer and you access keycloak servers directly on<br class="">localhost:8080 and localhost:8180, the problem might be just in the fact<br class="">that browser cookie KEYCLOAK_IDENTITY is not shared between them and hence<br class="">going to localhost:8180 will not find KEYCLOAK_IDENTITY cookie from<br class="">localhost:8080 and will try to create new session.<br class=""><br class="">You can check admin console or account management and list available user<br class="">sessions on both nodes. If both cluster nodes have same sessions, then<br class="">replication of userSessions works fine, but only issue is really the cookie.<br class=""><br class="">I suspect that in production, you will use loadbalancer, so this issue won't<br class="">happen.<br class=""><br class="">Marek<br class=""><br class="">On 24.4.2015 15:50, Libor Krzyžanek wrote:<br class=""><br class=""><br class="">Attaching keycloak-server.json and standalone-ha.xml<br class=""><br class="">Thanks,<br class=""><br class="">Libor Krzyžanek<br class="">jboss.org Development Team<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""><br class=""><br class=""><br class="">On 24 Apr 2015, at 15:36, Stian Thorgersen &lt; stian@redhat.com &gt; wrote:<br class=""><br class="">Can you attach your keycloak-server.json and standalone.xml?<br class=""><br class="">----- Original Message -----<br class=""><br class=""><br class="">From: "Libor Krzyžanek" &lt; lkrzyzan@redhat.com &gt;<br class="">To: "keycloak-user" &lt; keycloak-user@lists.jboss.org &gt;<br class="">Sent: Friday, 24 April, 2015 3:12:29 PM<br class="">Subject: [keycloak-user] Clustering on localhost with shared DB<br class=""><br class="">Hi,<br class="">I’m trying to achieve full user session replication which means when I’m<br class="">logged in on node 1 and then hit node 2 then I expect to be logged in but<br class="">I’m forced to log in again.<br class=""><br class="">I have:<br class="">1. two localhost nodes with JBoss EAP 6.4 + War installation<br class="">2. Postgres<br class="">3. EAP cofigured based on<br class="">http://docs.jboss.org/keycloak/docs/1.2.0.Beta1/userguide/html/clustering.html<br class=""><br class="">I triedeither<br class="">&lt;distributed-cache name="sessions" mode="SYNC" owners=“ 2 " /&gt;<br class="">&lt;distributed-cache name="loginFailures" mode="SYNC" owners=“ 2 " /&gt;<br class="">or<br class="">&lt;replicated-cache name="sessions" mode="SYNC"/&gt;<br class="">&lt;replicated-cache name="loginFailures" mode="SYNC”/&gt;<br class="">but with same result.<br class=""><br class="">I’m starting nodes by<br class="">./jb1/bin/standalone.sh --server-config=standalone-ha.xml<br class="">-Djboss.node.name=node1<br class="">./jb2/bin/standalone.sh --server-config=standalone-ha.xml<br class="">-Djboss.socket.binding.port-offset=100 -Djboss.node.name=node2<br class=""><br class=""><br class="">both jb1 and jb2 are identical and they know each other (Received new cluster<br class="">view: [node1/keycloak|1] [node1/keycloak, node2/keycloak])<br class=""><br class="">How do you test clustering of KC please?<br class=""><br class="">Thanks,<br class=""><br class="">Libor Krzyžanek<br class="">jboss.org Development Team<br class=""><br class=""><br class="">_______________________________________________<br class="">keycloak-user mailing list<br class="">keycloak-user@lists.jboss.org<br class="">https://lists.jboss.org/mailman/listinfo/keycloak-user<br class=""><br class=""><br class=""><br class="">_______________________________________________<br class="">keycloak-user mailing list keycloak-user@lists.jboss.org<br class="">https://lists.jboss.org/mailman/listinfo/keycloak-user<br class=""><br class=""><br class="">_______________________________________________<br class="">keycloak-user mailing list<br class="">keycloak-user@lists.jboss.org<br class="">https://lists.jboss.org/mailman/listinfo/keycloak-user<br class=""><br class=""><br class=""><br class=""><br class="">_______________________________________________<br class="">keycloak-user mailing list<br class=""><a href="mailto:keycloak-user@lists.jboss.org" class="">keycloak-user@lists.jboss.org</a><br class=""><a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" class="">https://lists.jboss.org/mailman/listinfo/keycloak-user</a></blockquote></div></blockquote></div><br class=""></div></body></html>