I'm trying to implement ehcache replication for my application. Following are the jar versions : ehcache-jgroupsreplication:1.7 ehcache-core 2.5.2 jgroups 3.1.0
When starting my application, getting following line in server logs:
GMS: address=ABC111-33601, cluster=EH_CACHE, physical address=10.x.x.xx:1123
And getting the following warning in application logs:
ABC111-33601: dropped message 1 from ABC222-40262 (sender not in table [ABC111-33601]), view=[ABC111-33601|0] [ABC111-33601]
The echache.xml is:
<?xml version="1.0" encoding="UTF-8"?>
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ehcache.org/ehcache.xsd"
updateCheck="false">
<diskStore path="java.io.tmpdir"/>
<cacheManagerPeerProviderFactory
class="net.sf.ehcache.distribution.jgroups.JGroupsCacheManagerPeerProviderFactory"
properties="connect=TCP(bind_port=1123):
TCPPING(initial_hosts=ABC111[1123],ABC222[1123],ABC333[1123];port_range=10;timeout=3000;num_initial_members=4):
VERIFY_SUSPECT(timeout=1500):
pbcast.NAKACK(use_mcast_xmit=false;use_mcast_xmit_req=false;retransmit_timeout=3000):
pbcast.GMS(join_timeout=5000):
FRAG2(frag_size=60K)"
propertySeparator="::" />
<defaultCache
maxElementsInMemory="1000"
eternal="false"
timeToIdleSeconds="120"
timeToLiveSeconds="120"
overflowToDisk="false"
diskPersistent="false"
diskExpiryThreadIntervalSeconds="120">
</defaultCache>
<cache name="com.abc.tariff"
maxElementsInMemory="1000"
eternal="false"
overflowToDisk="false"
timeToIdleSeconds="1800"
timeToLiveSeconds="1800">
<cacheEventListenerFactory
class="net.sf.ehcache.distribution.jgroups.JGroupsCacheReplicatorFactory"
properties="replicateAsynchronously=true, replicatePuts=true, replicateUpdates=true, replicateUpdatesViaCopy=false, replicateRemovals=true" />
</cache>
<cache name="com.abc.customer"
maxElementsInMemory="1000"
eternal="false"
overflowToDisk="false"
timeToIdleSeconds="120"
timeToLiveSeconds="180">
<cacheEventListenerFactory
class="net.sf.ehcache.distribution.jgroups.JGroupsCacheReplicatorFactory"
properties="replicateAsynchronously=true, replicatePuts=true, replicateUpdates=true, replicateUpdatesViaCopy=false, replicateRemovals=true" />
</cache>
</ehcache>
ABC111, ABC222 and ABC333 are not in weblogic cluster.
Any idea why the warning is coming and my guess is that the replication has not started due to this or has it?
Your cluster has not formed.
The warning says that you received a message from
ABC222
which claimed to be in the same cluster but wasn't in your view of the cluster.Your config looks weird anyway, for instance,
UNICAST
is missing, you have no failure detection protocols, no merge protocols etc. Is this the default JGroups config ehcache ships with? That would be very wrong!You can use
probe
(check the JGroups manual for details) to find out if the cluster formed correctly. My guess is that adding a correctbind_addr
toTCP
would fix the issue here...