<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="">Here it is: <a href="https://issues.jboss.org/browse/KEYCLOAK-1237" class="">https://issues.jboss.org/browse/KEYCLOAK-1237</a><div class=""><br class=""></div><div class="">Very appreciated!<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> Development Team</div>
</div>
<br class=""><div style=""><blockquote type="cite" class=""><div class="">On 27 Apr 2015, at 15:15, Stian Thorgersen <<a href="mailto:stian@redhat.com" class="">stian@redhat.com</a>> wrote:</div><br class="Apple-interchange-newline"><div 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="">Can you JIRA this and we'll try to get it fixed for 1.2.0.CR1?</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=""><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" <<a href="mailto:lkrzyzan@redhat.com" class="">lkrzyzan@redhat.com</a>><br class="">To: "Stian Thorgersen" <<a href="mailto:stian@redhat.com" class="">stian@redhat.com</a>><br class="">Cc: "Marek Posolda" <<a href="mailto:mposolda@redhat.com" class="">mposolda@redhat.com</a>>, "keycloak-user" <<a href="mailto:keycloak-user@lists.jboss.org" class="">keycloak-user@lists.jboss.org</a>><br class="">Sent: Monday, 27 April, 2015 3:06:53 PM<br class="">Subject: Re: [keycloak-user] Clustering on localhost with shared DB<br class=""><br class="">Yeah just tried:<br class=""> <invalidation-cache name="realms" mode="SYNC"<br class=""> start="EAGER"/><br class=""> <invalidation-cache name="users" mode="SYNC" start="EAGER"/><br class=""> <distributed-cache name="sessions" mode="SYNC" owners="2"<br class=""> segments="60" start="EAGER"><br class=""> <state-transfer enabled="true" /><br class=""> </distributed-cache><br class=""> <distributed-cache name="loginFailures" mode="SYNC"<br class=""> owners="2" segments="60" start="EAGER"><br class=""> <state-transfer enabled="true" /><br class=""> </distributed-cache><br class=""><br class="">Scenario:<br class="">- node1 is up<br class="">- I’m logged in in node 1<br class="">- starting node 2<br class=""><br class="">I get on node1:<br class="">15:00:45,988 INFO<br class="">[org.infinispan.remoting.transport.jgroups.JGroupsTransport]<br class="">(Incoming-1,shared=udp) ISPN000094: Received new cluster view:<br class="">[node1/keycloak|1] [node1/keycloak, node2/keycloak]<br class="">15:00:46,706 ERROR [org.infinispan.statetransfer.OutboundTransferTask]<br class="">(transport-thread-18) Failed to send entries to node node2/keycloak :<br class="">ISPN000217: Received exception from node2/keycloak, see cause for remote<br class="">stack trace: org.infinispan.remoting.RemoteException: ISPN000217: Received<br class="">exception from node2/keycloak, see cause for remote stack trace<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.infinispan.remoting.transport.AbstractTransport.checkResponse(AbstractTransport.java:60)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.processSingleCall(CommandAwareRpcDispatcher.java:310)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.invokeRemoteCommand(CommandAwareRpcDispatcher.java:179)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.infinispan.remoting.transport.jgroups.JGroupsTransport.invokeRemotely(JGroupsTransport.java:515)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:173)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:194)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.infinispan.statetransfer.OutboundTransferTask.sendEntries(OutboundTransferTask.java:257)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.infinispan.statetransfer.OutboundTransferTask.run(OutboundTransferTask.java:187)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>[rt.jar:1.8.0_40]<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at java.util.concurrent.FutureTask.run(FutureTask.java:266)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>[rt.jar:1.8.0_40]<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>[rt.jar:1.8.0_40]<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at java.util.concurrent.FutureTask.run(FutureTask.java:266)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>[rt.jar:1.8.0_40]<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>[rt.jar:1.8.0_40]<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>[rt.jar:1.8.0_40]<br 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]<br class="">Caused by: org.infinispan.CacheException: Problems invoking command.<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.handle(CommandAwareRpcDispatcher.java:230)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.jgroups.blocks.RequestCorrelator.handleRequest(RequestCorrelator.java:484)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.jgroups.blocks.RequestCorrelator.receiveMessage(RequestCorrelator.java:391)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at org.jgroups.blocks.RequestCorrelator.receive(RequestCorrelator.java:249)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:600)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at org.jgroups.blocks.mux.MuxUpHandler.up(MuxUpHandler.java:130)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at org.jgroups.JChannel.up(JChannel.java:707)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:1025)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at org.jgroups.protocols.RSVP.up(RSVP.java:172)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at org.jgroups.protocols.FRAG2.up(FRAG2.java:181)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at org.jgroups.protocols.FlowControl.up(FlowControl.java:418)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at org.jgroups.protocols.FlowControl.up(FlowControl.java:400)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at org.jgroups.protocols.pbcast.GMS.up(GMS.java:896)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:245)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at org.jgroups.protocols.UNICAST2.handleDataReceived(UNICAST2.java:766)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at org.jgroups.protocols.UNICAST2.up(UNICAST2.java:420)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at org.jgroups.protocols.pbcast.NAKACK.up(NAKACK.java:645)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at org.jgroups.protocols.VERIFY_SUSPECT.up(VERIFY_SUSPECT.java:147)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at org.jgroups.protocols.FD.up(FD.java:253)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at org.jgroups.protocols.FD_SOCK.up(FD_SOCK.java:288)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at org.jgroups.protocols.MERGE3.up(MERGE3.java:290)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at org.jgroups.protocols.Discovery.up(Discovery.java:359)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at org.jgroups.protocols.TP$ProtocolAdapter.up(TP.java:2607)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at org.jgroups.protocols.TP.passMessageUp(TP.java:1260)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at org.jgroups.protocols.TP$IncomingPacket.handleMyMessage(TP.java:1822)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at org.jgroups.protocols.TP$IncomingPacket.run(TP.java:1795)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>... 3 more<br class="">Caused by: java.io.InvalidClassException:<br class="">org.keycloak.models.sessions.infinispan.entities.ClientSessionEntity; Module<br class="">load failed<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.jboss.marshalling.ModularClassResolver.resolveClass(ModularClassResolver.java:104)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.jboss.marshalling.river.RiverUnmarshaller.doReadClassDescriptor(RiverUnmarshaller.java:948)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1255)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:276)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:41)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.infinispan.container.entries.ImmortalCacheEntry$Externalizer.readObject(ImmortalCacheEntry.java:160)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.infinispan.container.entries.ImmortalCacheEntry$Externalizer.readObject(ImmortalCacheEntry.java:150)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.infinispan.marshall.jboss.ExternalizerTable$ExternalizerAdapter.readObject(ExternalizerTable.java:406)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.infinispan.marshall.jboss.ExternalizerTable.readObject(ExternalizerTable.java:226)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.infinispan.marshall.jboss.JBossMarshaller$ExternalizerTableProxy.readObject(JBossMarshaller.java:167)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:354)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:41)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.infinispan.marshall.exts.ArrayListExternalizer.readObject(ArrayListExternalizer.java:57)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.infinispan.marshall.exts.ArrayListExternalizer.readObject(ArrayListExternalizer.java:45)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.infinispan.marshall.jboss.ExternalizerTable$ExternalizerAdapter.readObject(ExternalizerTable.java:406)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.infinispan.marshall.jboss.ExternalizerTable.readObject(ExternalizerTable.java:226)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.infinispan.marshall.jboss.JBossMarshaller$ExternalizerTableProxy.readObject(JBossMarshaller.java:167)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:354)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:41)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.infinispan.statetransfer.StateChunk$Externalizer.readObject(StateChunk.java:111)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.infinispan.statetransfer.StateChunk$Externalizer.readObject(StateChunk.java:88)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.infinispan.marshall.jboss.ExternalizerTable$ExternalizerAdapter.readObject(ExternalizerTable.java:406)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.infinispan.marshall.jboss.ExternalizerTable.readObject(ExternalizerTable.java:226)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.infinispan.marshall.jboss.JBossMarshaller$ExternalizerTableProxy.readObject(JBossMarshaller.java:167)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:354)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:41)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.infinispan.marshall.exts.ArrayListExternalizer.readObject(ArrayListExternalizer.java:57)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.infinispan.marshall.exts.ArrayListExternalizer.readObject(ArrayListExternalizer.java:45)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.infinispan.marshall.jboss.ExternalizerTable$ExternalizerAdapter.readObject(ExternalizerTable.java:406)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.infinispan.marshall.jboss.ExternalizerTable.readObject(ExternalizerTable.java:226)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.infinispan.marshall.jboss.JBossMarshaller$ExternalizerTableProxy.readObject(JBossMarshaller.java:167)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:354)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:41)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.infinispan.marshall.exts.ReplicableCommandExternalizer.readParameters(ReplicableCommandExternalizer.java:130)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.infinispan.marshall.exts.CacheRpcCommandExternalizer.readObject(CacheRpcCommandExternalizer.java:158)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.infinispan.marshall.exts.CacheRpcCommandExternalizer.readObject(CacheRpcCommandExternalizer.java:73)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.infinispan.marshall.jboss.ExternalizerTable$ExternalizerAdapter.readObject(ExternalizerTable.java:406)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.infinispan.marshall.jboss.ExternalizerTable.readObject(ExternalizerTable.java:226)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.infinispan.marshall.jboss.JBossMarshaller$ExternalizerTableProxy.readObject(JBossMarshaller.java:167)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:354)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:41)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.infinispan.marshall.jboss.AbstractJBossMarshaller.objectFromObjectStream(AbstractJBossMarshaller.java:163)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.infinispan.marshall.VersionAwareMarshaller.objectFromByteBuffer(VersionAwareMarshaller.java:121)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.infinispan.marshall.AbstractDelegatingMarshaller.objectFromByteBuffer(AbstractDelegatingMarshaller.java:104)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.infinispan.remoting.transport.jgroups.MarshallerAdapter.objectFromBuffer(MarshallerAdapter.java:50)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.handle(CommandAwareRpcDispatcher.java:215)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>... 28 more<br class="">Caused by: org.jboss.modules.ModuleNotFoundException:<br class="">deployment.auth-server.war:main<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:240)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>[jboss-modules.jar:1.3.6.Final-redhat-1]<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.jboss.marshalling.ModularClassResolver.resolveClass(ModularClassResolver.java:102)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>... 79 more<br class=""><br class=""><br class=""><br class=""><br class="">Very similar on node2 plus something like this:<br class="">15:01:46,574 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool --<br class="">57) MSC000001: Failed to start service jboss.infinispan.keycloak.sessions:<br class="">org.jboss.msc.service.StartException in service<br class="">jboss.infinispan.keycloak.sessions: org.infinispan.CacheException: Unable to<br class="">invoke method public void<br class="">org.infinispan.statetransfer.StateTransferManagerImpl.waitForInitialStateTransferToComplete()<br class="">throws java.lang.InterruptedException on object of type<br class="">StateTransferManagerImpl<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>org.jboss.as.clustering.msc.AsynchronousService$1.run(AsynchronousService.java:91)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>[jboss-as-clustering-common-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>[rt.jar:1.8.0_40]<br class=""><skipped><br class="">Caused by: org.infinispan.CacheException: Initial state transfer timed out<br class="">for cache sessions on node2/keycloak<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>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)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>[rt.jar:1.8.0_40]<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>[rt.jar:1.8.0_40]<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>at<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>[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<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>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<br class="">Boot Thread) JBAS014612: Operation ("add") failed - address: ([<br class=""> ("subsystem" => "infinispan"),<br class=""> ("cache-container" => "keycloak"),<br class=""> ("distributed-cache" => "sessions")<br class="">]) - failure description: {"JBAS014671: Failed services" =><br class="">{"jboss.infinispan.keycloak.sessions" =><br class="">"org.jboss.msc.service.StartException in service<br class="">jboss.infinispan.keycloak.sessions: org.infinispan.CacheException: Unable to<br class="">invoke method public void<br class="">org.infinispan.statetransfer.StateTransferManagerImpl.waitForInitialStateTransferToComplete()<br class="">throws java.lang.InterruptedException on object of type<br class="">StateTransferManagerImpl<br class=""> Caused by: org.infinispan.CacheException: Unable to invoke method public<br class=""> void<br class=""> org.infinispan.statetransfer.StateTransferManagerImpl.waitForInitialStateTransferToComplete()<br class=""> throws java.lang.InterruptedException on object of type<br class=""> StateTransferManagerImpl<br class=""> Caused by: org.infinispan.CacheException: Initial state transfer timed<br class=""> out for cache sessions on node2/keycloak"}}<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><span class="Apple-converted-space"> </span><<a href="http://jboss.org/" class="">http://jboss.org/</a>> Development Team<br class=""><br class=""><blockquote type="cite" class="">On 27 Apr 2015, at 15:02, Stian Thorgersen <<a href="mailto:stian@redhat.com" class="">stian@redhat.com</a>> wrote:<br class=""><br class=""><br class=""><br class="">----- Original Message -----<br class=""><blockquote type="cite" class="">From: "Libor Krzyžanek" <<a href="mailto:lkrzyzan@redhat.com" class="">lkrzyzan@redhat.com</a>><br class="">To: "Marek Posolda" <<a href="mailto:mposolda@redhat.com" class="">mposolda@redhat.com</a>><br class="">Cc: "keycloak-user" <<a href="mailto:keycloak-user@lists.jboss.org" class="">keycloak-user@lists.jboss.org</a>><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=""><invalidation-cache name="realms" mode="SYNC"/><br class=""><invalidation-cache name="users" mode="SYNC"/><br class=""><distributed-cache name="sessions" mode="SYNC" owners="2" segments="60" ><br class=""><state-transfer enabled="true" /><br class=""></distributed-cache><br class=""><distributed-cache name="loginFailures" mode="SYNC" owners="2"<br class="">segments="60"<br class=""><blockquote type="cite" class=""><br class=""></blockquote><state-transfer enabled="true" /><br class=""></distributed-cache><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:<br class="">JBoss<br class="">EAP 6.4.0.GA (AS 7.5.0.Final-redhat-21) started in 18527ms - Started 242<br class="">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 class="">Have you tried putting start="EAGER" on both the cache-container and all<br class="">caches in standalone.xml?<br class=""><br class=""><blockquote type="cite" 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<br class="">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<br class="">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<br class="">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><span class="Apple-converted-space"> </span>Development Team<br class=""><br class=""><br class=""><br class=""><br class="">On 27 Apr 2015, at 14:24, Marek Posolda <<span class="Apple-converted-space"> </span><a href="mailto:mposolda@redhat.com" class="">mposolda@redhat.com</a><span class="Apple-converted-space"> </span>> 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=""><Proxy *><br class="">Order allow,deny<br class="">Allow from all<br class=""></Proxy><br class=""><Proxy<span class="Apple-converted-space"> </span><a href="balancer://app/" class="">balancer://app/</a><span class="Apple-converted-space"> </span>><br class="">BalancerMember<span class="Apple-converted-space"> </span><a href="http://localhost:8080/" class="">http://localhost:8080</a><span class="Apple-converted-space"> </span>route=app02<br class="">BalancerMember<span class="Apple-converted-space"> </span><a href="http://localhost:8180/" class="">http://localhost:8180</a><span class="Apple-converted-space"> </span>route=app03<br class="">ProxySet lbmethod=byrequests<br class=""></Proxy><br class="">ProxyPass /balancer-manager !<br class="">ProxyPass /server-status !<br class="">ProxyPass /server-info !<br class="">ProxyPass /<span class="Apple-converted-space"> </span><a href="balancer://app/" class="">balancer://app/</a><br class="">ProxyPassReverse /<span class="Apple-converted-space"> </span><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=""><distributed-cache name="sessions" mode="SYNC" owners="2" segments="60" ><br class=""><state-transfer enabled="true" /><br class=""></distributed-cache><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><span class="Apple-converted-space"> </span>).<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()<br class="">for<br class="">servlet Keycloak REST Interface threw exception:<br class="">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<br class="">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,<br class="">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.<init>(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.<init>(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<br class="">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=""><a href="http://jboss.org/" class="">jboss.org</a><span class="Apple-converted-space"> </span>Development Team<br class=""><br class=""><br class=""><br class=""><br class="">On 27 Apr 2015, at 09:05, Libor Krzyžanek <<span class="Apple-converted-space"> </span><a href="mailto:lkrzyzan@redhat.com" class="">lkrzyzan@redhat.com</a><span class="Apple-converted-space"> </span>> 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=""><a href="http://jboss.org/" class="">jboss.org</a><span class="Apple-converted-space"> </span>Development Team<br class=""><br class=""><br class=""><br class=""><br class="">On 24 Apr 2015, at 19:06, Marek Posolda <<span class="Apple-converted-space"> </span><a href="mailto:mposolda@redhat.com" class="">mposolda@redhat.com</a><span class="Apple-converted-space"> </span>> 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<br class="">if<br class="">you're using loadbalancer?<br class=""><br class="">If you're not using loadbalancer and you access keycloak servers directly<br class="">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<br class="">cookie.<br class=""><br class="">I suspect that in production, you will use loadbalancer, so this issue<br class="">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=""><a href="http://jboss.org/" class="">jboss.org</a><span class="Apple-converted-space"> </span>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 <<span class="Apple-converted-space"> </span><a href="mailto:stian@redhat.com" class="">stian@redhat.com</a><span class="Apple-converted-space"> </span>> 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" <<span class="Apple-converted-space"> </span><a href="mailto:lkrzyzan@redhat.com" class="">lkrzyzan@redhat.com</a><span class="Apple-converted-space"> </span>><br class="">To: "keycloak-user" <<span class="Apple-converted-space"> </span><a href="mailto:keycloak-user@lists.jboss.org" class="">keycloak-user@lists.jboss.org</a><span class="Apple-converted-space"> </span>><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=""><a href="http://docs.jboss.org/keycloak/docs/1.2.0.Beta1/userguide/html/clustering.html" class="">http://docs.jboss.org/keycloak/docs/1.2.0.Beta1/userguide/html/clustering.html</a><br class=""><br class="">I triedeither<br class=""><distributed-cache name="sessions" mode="SYNC" owners=“ 2 " /><br class=""><distributed-cache name="loginFailures" mode="SYNC" owners=“ 2 " /><br class="">or<br class=""><replicated-cache name="sessions" mode="SYNC"/><br class=""><replicated-cache name="loginFailures" mode="SYNC”/><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<br class="">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=""><a href="http://jboss.org/" class="">jboss.org</a><span class="Apple-converted-space"> </span>Development Team<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="">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><span class="Apple-converted-space"> </span><<a href="mailto:keycloak-user@lists.jboss.org" class="">mailto: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><br class=""><<a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" class="">https://lists.jboss.org/mailman/listinfo/keycloak-user</a>></blockquote></blockquote></blockquote></div></blockquote></div><br class=""></div></body></html>