I am running a WildFly 10 application in OpenShift that uses JGroups/Infinispan for clustering. The Infinispan version is 8.1.8.Final. The JGroups version is 3.6.4.Final. I run into problems when two replicas are started at the same time. I see the following in my logs:
WARN [org.jgroups.protocols.ASYM_ENCRYPT] (thread-11,ee,hawkular-metrics-4npd3) hawkular-metrics-4npd3: unrecognized cipher; discarding message from hawkular-metrics-j9d1q
...
WARN [org.jgroups.protocols.openshift.KUBE_PING] (thread-2,ee,hawkular-metrics-4npd3) Error sending ping request: url [http://10.129.0.17:8888], clusterName [ee], attempts[1]: Connection refused (Connection refused)
...
INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (thread-3,ee,hawkular-metrics-4npd3) ISPN000094: Received new cluster view for channel server: [hawkular-metrics-4npd3|1] (2) [hawkular-metrics-4npd3, hawkular-metrics-j9d1q]
INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (thread-3,ee,hawkular-metrics-4npd3) ISPN000094: Received new cluster view for channel hawkular-metrics: [hawkular-metrics-4npd3|1] (2) [hawkular-metrics-4npd3, hawkular-metrics-j9d1q]
INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (thread-3,ee,hawkular-metrics-4npd3) ISPN000094: Received new cluster view for channel web: [hawkular-metrics-4npd3|1] (2) [hawkular-metrics-4npd3, hawkular-metrics-j9d1q]
INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (thread-3,ee,hawkular-metrics-4npd3) ISPN000094: Received new cluster view for channel hawkular-alerts: [hawkular-metrics-4npd3|1] (2) [hawkular-metrics-4npd3, hawkular-metrics-j9d1q]
ERROR [org.infinispan.interceptors.InvocationContextInterceptor] (thread-3,ee,hawkular-metrics-4npd3) ISPN000136: Error executing command PrepareCommand, writing keys [buckets, previousPartition, currentPartition]: org.infinispan.util.concurrent.TimeoutException: Replication timeout for hawkular-metrics-j9d1q
at org.infinispan.remoting.transport.jgroups.JGroupsTransport.checkRsp(JGroupsTransport.java:772)
at org.infinispan.remoting.transport.jgroups.JGroupsTransport.lambda$invokeRemotelyAsync$1(JGroupsTransport.java:615)
at java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:602)
at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:577)
at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474)
at java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:1962)
at org.infinispan.remoting.transport.jgroups.RspListFuture.call(RspListFuture.java:47)
at org.infinispan.remoting.transport.jgroups.RspListFuture.call(RspListFuture.java:16)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
[0m [31m2017-08-08 01:28:38,169 ERROR [org.infinispan.transaction.impl.TransactionCoordinator] (thread-3,ee,hawkular-metrics-4npd3) ISPN000097: Error while processing a prepare in a single-phase transaction: org.infinispan.util.concurrent.TimeoutException: Replication timeout for hawkular-metrics-j9d1q
at org.infinispan.remoting.transport.jgroups.JGroupsTransport.checkRsp(JGroupsTransport.java:772)
at org.infinispan.remoting.transport.jgroups.JGroupsTransport.lambda$invokeRemotelyAsync$1(JGroupsTransport.java:615)
at java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:602)
at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:577)
at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474)
at java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:1962)
at org.infinispan.remoting.transport.jgroups.RspListFuture.call(RspListFuture.java:47)
at org.infinispan.remoting.transport.jgroups.RspListFuture.call(RspListFuture.java:16)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Here is my configuration from standalone.xml:
<subsystem xmlns="urn:jboss:domain:jgroups:4.0">
<channels default="ee">
<channel name="ee" stack="tcp"/>
</channels>
<stacks>
<stack name="udp">
<transport type="UDP" socket-binding="jgroups-udp"/>
<protocol type="kubernetes.KUBE_PING"/>
<protocol type="MERGE3"/>
<protocol type="FD_SOCK" socket-binding="jgroups-udp-fd"/>
<protocol type="FD_ALL"/>
<protocol type="VERIFY_SUSPECT"/>
<protocol type="ASYM_ENCRYPT">
<property name="encrypt_entire_message">true</property>
<property name="sym_keylength">128</property>
<property name="sym_algorithm">AES</property>
<property name="asym_keylength">512</property>
<property name="asym_algorithm">RSA</property>
</protocol>
<protocol type="pbcast.NAKACK2"/>
<protocol type="UNICAST3"/>
<protocol type="pbcast.STABLE"/>
<protocol type="pbcast.GMS"/>
<protocol type="UFC"/>
<protocol type="MFC"/>
<protocol type="FRAG2"/>
<protocol type="AUTH">
<property name="auth_class">org.jgroups.auth.MD5Token</property>
<property name="auth_value">${jgroups.password}</property>
<property name="token_hash">MD5</property>
</protocol>
</stack>
<stack name="tcp">
<transport type="TCP" socket-binding="jgroups-tcp"/>
<protocol type="kubernetes.KUBE_PING" socket-binding="jgroups-mping"/>
<protocol type="MERGE3"/>
<protocol type="FD_SOCK" socket-binding="jgroups-tcp-fd"/>
<protocol type="FD"/>
<protocol type="VERIFY_SUSPECT"/>
<protocol type="ASYM_ENCRYPT">
<property name="encrypt_entire_message">true</property>
<property name="sym_keylength">128</property>
<property name="sym_algorithm">AES</property>
<property name="asym_keylength">512</property>
<property name="asym_algorithm">RSA</property>
</protocol>
<protocol type="pbcast.NAKACK2"/>
<protocol type="UNICAST3"/>
<protocol type="pbcast.STABLE"/>
<protocol type="pbcast.GMS"/>
<protocol type="MFC"/>
<protocol type="FRAG2"/>
<protocol type="AUTH">
<property name="auth_class">org.jgroups.auth.MD5Token</property>
<property name="auth_value">${jgroups.password}</property>
<property name="token_hash">MD5</property>
</protocol>
</stack>
</stacks>
</subsystem>
...
<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
<socket-binding name="jgroups-mping" interface="private" port="0" multicast-address="${jboss.default.multicast.address:230.0.0.4}" multicast-port="45700"/>
<socket-binding name="jgroups-tcp" interface="private" port="7600"/>
<socket-binding name="jgroups-tcp-fd" interface="private" port="57600"/>
<socket-binding name="jgroups-udp" interface="private" port="55200" multicast-address="${jboss.default.multicast.address:230.0.0.4}" multicast-port="45688"/>
<socket-binding name="jgroups-udp-fd" interface="private" port="54200"/>
<socket-binding name="modcluster" port="0" multicast-address="224.0.1.105" multicast-port="23364"/>
</socket-binding-group>
Are there any problems with my configuration? If I restart the pod, then I do not encounter the above errors in the logs.
Thanks
John