Linux上の2つのシステムにSampleWebAppなどのWebアプリケーションであるサーバーの2つのインスタンスをインストールしました。ローカルデータをキャッシュするようにehcacheを構成し、Server1からServer2に行われた変更を複製するためのデフォルトのRMIレプリケーションも構成しました。レプリケーションはWindows環境では正常に機能しますが、Linux環境では機能しません。エラーが出力されなくても、サイレントに失敗します。
ehcache.xmlファイルで行われた構成は以下のとおりです-
<cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
properties="peerDiscovery=manual,
rmiUrls=//<ip>:50000/sampleReplicatedCache"
propertySeparator="," />
<cacheManagerPeerListenerFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory" properties="port=40000"/>
<cache name="cmServerReplicatedCache" maxElementsInMemory="100" eternal="true"
memoryStoreEvictionPolicy="LRU" >
<cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
properties="replicateAsynchronously=true, replicatePuts=true,
replicatePutsViaCopy=true, replicateUpdates=true, replicateUpdatesViaCopy=true, replicateRemovals=false, asynchronousReplicationIntervalMillis=5000"/>
<bootstrapCacheLoaderFactory class="net.sf.ehcache.distribution.RMIBootstrapCacheLoaderFactory"/>
</cache>
レプリケーションをブロックする可能性のあるファイアウォールがインストールされていないため、ファイアウォールが失敗する理由にはなりません。ポートが開いているかどうかも確認しました。割り当てられたポート50000が開かれ、Ehcacheがこのポートをリッスンします。問題は、キャッシュに更新がある場合、この変更が複製されないことです。
これに関する提案や説明をいただければ幸いです。
ありがとう、ワンダー!