Hey guys i am using rmi automatic peer discovery cache replication.. When i run my application the heartbeats of the cache replication is also developing in the logs but still my cache of 1 server is not replicating on the other server..
Tomcat Server 1 - Ehcache.xml
<cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
properties="peerDiscovery=automatic, multicastGroupAddress=230.0.0.1, multicastGroupPort=4446, timeToLive=32"/>
<cacheManagerPeerListenerFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
properties="hostName=192.168.100.22, port=40001, socketTimeoutMillis=2000" />
<defaultCache
maxElementsInMemory="10000"
eternal="false"
timeToIdleSeconds="0"
timeToLiveSeconds="0"
overflowToDisk="false"
diskSpoolBufferSizeMB="30"
diskPersistent="false"
diskExpiryThreadIntervalSeconds="120"
memoryStoreEvictionPolicy="LRU"/>
<cache name="portalsCache"
maxElementsInMemory="100"
overflowToDisk="false"
eternal="false"
timeToIdleSeconds="0"
timeToLiveSeconds="3600"
diskPersistent="false"
memoryStoreEvictionPolicy="LFU">
</cache>
<cache name="subscriptionCache"
maxElementsInMemory="0"
overflowToDisk="false"
eternal="false"
timeToIdleSeconds="1000"
timeToLiveSeconds="10800">
<cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
properties="replicateAsynchronously=true,
replicatePuts=true,
replicatePutsViaCopy=true,
replicateUpdates=true,
replicateUpdatesViaCopy=true,
replicateRemovals=true" />
</cache>
<cache name="transalateLangCache"
maxElementsInMemory="0"
overflowToDisk="false"
eternal="false"
timeToIdleSeconds="3600"
timeToLiveSeconds="3600"
diskPersistent="false"
memoryStoreEvictionPolicy="LFU">
</cache>
Tomcat Server 2 - Ehcache.xml
<cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
properties="peerDiscovery=automatic, multicastGroupAddress=230.0.0.1, multicastGroupPort=4446, timeToLive=255"/>
<cacheManagerPeerListenerFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
properties="hostName=192.168.100.51, port=40002, socketTimeoutMillis=2000" />
<defaultCache
maxElementsInMemory="10000"
eternal="false"
timeToIdleSeconds="0"
timeToLiveSeconds="0"
overflowToDisk="false"
diskSpoolBufferSizeMB="30"
diskPersistent="false"
diskExpiryThreadIntervalSeconds="120"
memoryStoreEvictionPolicy="LRU"/>
<cache name="portalsCache"
maxElementsInMemory="100"
overflowToDisk="false"
eternal="false"
timeToIdleSeconds="0"
timeToLiveSeconds="3600"
diskPersistent="false"
memoryStoreEvictionPolicy="LFU">
</cache>
<cache name="subscriptionCache"
maxElementsInMemory="0"
overflowToDisk="false"
eternal="false"
timeToIdleSeconds="100"
timeToLiveSeconds="100">
<cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
properties="replicateAsynchronously=true,
replicatePuts=true,
replicatePutsViaCopy=true,
replicateUpdates=true,
replicateUpdatesViaCopy=true,
replicateRemovals=true" />
</cache>
<cache name="transalateLangCache"
maxElementsInMemory="0"
overflowToDisk="false"
eternal="false"
timeToIdleSeconds="3600"
timeToLiveSeconds="3600"
diskPersistent="false"
memoryStoreEvictionPolicy="LFU">
</cache>
Server Logs
15:18:06.180 [http-bio-80-exec-3] DEBUG n.s.e.config.ConfigurationFactory - Configuring ehcache from InputStream
15:18:06.199 [http-bio-80-exec-3] DEBUG net.sf.ehcache.config.BeanHandler - Ignoring ehcache attribute xmlns:xsi
15:18:06.200 [http-bio-80-exec-3] DEBUG net.sf.ehcache.config.BeanHandler - Ignoring ehcache attribute xsi:noNamespaceSchemaLocation
15:18:06.201 [http-bio-80-exec-3] DEBUG n.s.e.config.DiskStoreConfiguration - Disk Store Path: /opt/tomcat7/webapps/MCuriumProduction/ehcache/
15:18:06.219 [http-bio-80-exec-3] DEBUG net.sf.ehcache.CacheManager - Creating new CacheManager with InputStream
15:18:06.223 [http-bio-80-exec-3] DEBUG net.sf.ehcache.util.PropertyUtil - propertiesString is null.
15:18:06.235 [http-bio-80-exec-3] DEBUG n.s.e.config.ConfigurationHelper - No CacheManagerEventListenerFactory class specified. Skipping...
15:18:06.237 [http-bio-80-exec-3] DEBUG net.sf.ehcache.util.PropertyUtil - Value found for hostName: 192.168.100.22
15:18:06.237 [http-bio-80-exec-3] DEBUG net.sf.ehcache.util.PropertyUtil - Value found for port: 40001
15:18:06.237 [http-bio-80-exec-3] DEBUG net.sf.ehcache.util.PropertyUtil - Value found for remoteObjectPort: null
15:18:06.237 [http-bio-80-exec-3] DEBUG net.sf.ehcache.util.PropertyUtil - Value found for socketTimeoutMillis: 2000
15:18:06.243 [http-bio-80-exec-3] DEBUG net.sf.ehcache.util.PropertyUtil - Value found for peerDiscovery: automatic
15:18:06.243 [http-bio-80-exec-3] DEBUG net.sf.ehcache.util.PropertyUtil - Value found for hostName: null
15:18:06.244 [http-bio-80-exec-3] DEBUG net.sf.ehcache.util.PropertyUtil - Value found for multicastGroupAddress: 230.0.0.1
15:18:06.244 [http-bio-80-exec-3] DEBUG net.sf.ehcache.util.PropertyUtil - Value found for multicastGroupPort: 4446
15:18:06.244 [http-bio-80-exec-3] DEBUG net.sf.ehcache.util.PropertyUtil - Value found for timeToLive: 32
15:18:06.254 [http-bio-80-exec-3] DEBUG net.sf.ehcache.Cache - No BootstrapCacheLoaderFactory class specified. Skipping...
15:18:06.254 [http-bio-80-exec-3] DEBUG net.sf.ehcache.Cache - CacheWriter factory not configured. Skipping...
15:18:06.255 [http-bio-80-exec-3] DEBUG n.s.e.config.ConfigurationHelper - No CacheExceptionHandlerFactory class specified. Skipping...
15:18:06.290 [http-bio-80-exec-3] DEBUG n.s.e.d.RMICacheManagerPeerListener - 0 RMICachePeers bound in registry for RMI listener
15:18:06.293 [http-bio-80-exec-3] DEBUG net.sf.ehcache.util.PropertyUtil - Value found for replicatePuts: true
15:18:06.293 [http-bio-80-exec-3] DEBUG net.sf.ehcache.util.PropertyUtil - Value found for replicatePutsViaCopy: true
15:18:06.293 [http-bio-80-exec-3] DEBUG net.sf.ehcache.util.PropertyUtil - Value found for replicateUpdates: true
15:18:06.293 [http-bio-80-exec-3] DEBUG net.sf.ehcache.util.PropertyUtil - Value found for replicateUpdatesViaCopy: true
15:18:06.293 [http-bio-80-exec-3] DEBUG net.sf.ehcache.util.PropertyUtil - Value found for replicateRemovals: true
15:18:06.293 [http-bio-80-exec-3] DEBUG net.sf.ehcache.util.PropertyUtil - Value found for replicateAsynchronously: true
15:18:06.294 [http-bio-80-exec-3] DEBUG net.sf.ehcache.util.PropertyUtil - Value found for asynchronousReplicationIntervalMillis: null
15:18:06.297 [http-bio-80-exec-3] DEBUG net.sf.ehcache.Cache - No BootstrapCacheLoaderFactory class specified. Skipping...
15:18:06.297 [http-bio-80-exec-3] DEBUG net.sf.ehcache.Cache - CacheWriter factory not configured. Skipping...
15:18:06.297 [http-bio-80-exec-3] DEBUG n.s.e.config.ConfigurationHelper - No CacheExceptionHandlerFactory class specified. Skipping...
15:18:06.298 [http-bio-80-exec-3] DEBUG net.sf.ehcache.Cache - No BootstrapCacheLoaderFactory class specified. Skipping...
15:18:06.298 [http-bio-80-exec-3] DEBUG net.sf.ehcache.Cache - CacheWriter factory not configured. Skipping...
15:18:06.298 [http-bio-80-exec-3] DEBUG n.s.e.config.ConfigurationHelper - No CacheExceptionHandlerFactory class specified. Skipping...
15:18:06.298 [http-bio-80-exec-3] DEBUG net.sf.ehcache.Cache - No BootstrapCacheLoaderFactory class specified. Skipping...
15:18:06.298 [http-bio-80-exec-3] DEBUG net.sf.ehcache.Cache - CacheWriter factory not configured. Skipping...
15:18:06.298 [http-bio-80-exec-3] DEBUG n.s.e.config.ConfigurationHelper - No CacheExceptionHandlerFactory class specified. Skipping...
15:18:06.324 [http-bio-80-exec-3] DEBUG net.sf.ehcache.store.MemoryStore - Initialized net.sf.ehcache.store.NotifyingMemoryStore for portalsCache
15:18:06.327 [http-bio-80-exec-3] DEBUG net.sf.ehcache.Cache - Initialised cache: portalsCache
15:18:06.327 [http-bio-80-exec-3] DEBUG n.s.e.d.RMICacheManagerPeerListener - Adding to RMI listener
15:18:06.327 [http-bio-80-exec-3] DEBUG n.s.e.d.RMICacheManagerPeerListener - 0 RMICachePeers bound in registry for RMI listener
15:18:06.327 [http-bio-80-exec-3] DEBUG n.s.e.config.ConfigurationHelper - CacheDecoratorFactory not configured. Skipping for 'portalsCache'.
15:18:06.327 [http-bio-80-exec-3] DEBUG n.s.e.config.ConfigurationHelper - CacheDecoratorFactory not configured for defaultCache. Skipping for 'portalsCache'.
15:18:06.328 [http-bio-80-exec-3] WARN n.s.e.config.CacheConfiguration - Cache: transalateLangCache has a maxElementsInMemory of 0. This might lead to performance degradation or OutOfMemoryError at Terracotta client.From Ehcache 2.0 onwards this has been changed to mean a store with no capacity limit. Set it to 1 if you want no elements cached in memory
15:18:06.328 [http-bio-80-exec-3] DEBUG net.sf.ehcache.store.MemoryStore - Initialized net.sf.ehcache.store.NotifyingMemoryStore for transalateLangCache
15:18:06.329 [http-bio-80-exec-3] DEBUG net.sf.ehcache.Cache - Initialised cache: transalateLangCache
15:18:06.329 [http-bio-80-exec-3] DEBUG n.s.e.d.RMICacheManagerPeerListener - Adding to RMI listener
15:18:06.329 [http-bio-80-exec-3] DEBUG n.s.e.d.RMICacheManagerPeerListener - 0 RMICachePeers bound in registry for RMI listener
15:18:06.329 [http-bio-80-exec-3] DEBUG n.s.e.config.ConfigurationHelper - CacheDecoratorFactory not configured. Skipping for 'transalateLangCache'.
15:18:06.329 [http-bio-80-exec-3] DEBUG n.s.e.config.ConfigurationHelper - CacheDecoratorFactory not configured for defaultCache. Skipping for 'transalateLangCache'.
15:18:06.329 [http-bio-80-exec-3] WARN n.s.e.config.CacheConfiguration - Cache: subscriptionCache has a maxElementsInMemory of 0. This might lead to performance degradation or OutOfMemoryError at Terracotta client.From Ehcache 2.0 onwards this has been changed to mean a store with no capacity limit. Set it to 1 if you want no elements cached in memory
15:18:06.330 [http-bio-80-exec-3] DEBUG net.sf.ehcache.store.MemoryStore - Initialized net.sf.ehcache.store.NotifyingMemoryStore for subscriptionCache
15:18:06.331 [http-bio-80-exec-3] DEBUG net.sf.ehcache.Cache - Initialised cache: subscriptionCache
15:18:06.331 [http-bio-80-exec-3] DEBUG n.s.e.d.RMICacheManagerPeerListener - Adding to RMI listener
15:18:06.649 [http-bio-80-exec-3] DEBUG n.s.e.d.RMICacheManagerPeerListener - 1 RMICachePeers bound in registry for RMI listener
15:18:06.650 [http-bio-80-exec-3] DEBUG n.s.e.config.ConfigurationHelper - CacheDecoratorFactory not configured. Skipping for 'subscriptionCache'.
15:18:06.650 [http-bio-80-exec-3] DEBUG n.s.e.config.ConfigurationHelper - CacheDecoratorFactory not configured for defaultCache. Skipping for 'subscriptionCache'.
Please help guys.Help will be appreciated. Thanks