我的集群中有四个节点,我需要同步它们。当节点 BRJGSD309173 尝试通过 JGROUP 向 BRJGSD333007 发送消息时,服务器 BRJGSD333007 通知以下消息:
11:34:07,759 WARN [org.jgroups.protocols.pbcast.NAKACK] (Incoming-2,maestroCacheManager,BRJGSD333007-24075) BRJGSD333007-24075: dropped message 4787 from BRJGSD309173-7667 (sender not in table [BRJGSD333007-24075]), view=[BRJGSD333007-24075|0] [BRJGSD333007-24075]
jgroups_tcp.xml的以下配置
<?xml version='1.0'?>
<config>
<TCP bind_port="7800"
max_bundle_size="5M" />
<TCPPING timeout="3000"
initial_hosts="brjgsm10.weg.net[7800],brjgsm11.weg.net[7800],brjgsd309173.weg.net[7800],brjgsd333007.weg.net[7800]"
port_range="10"
num_initial_members="5"/>
<VERIFY_SUSPECT timeout="1500" />
<pbcast.NAKACK use_mcast_xmit="false"
retransmit_timeout="300,600,1200,2400,4800"
discard_delivered_msgs="true"/>
<pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000" max_bytes="400000"/>
<pbcast.GMS print_local_addr="true" join_timeout="5000" view_bundling="true"/>
</config>
还有 ehcache.xml 的片段
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
updateCheck="false" xsi:noNamespaceSchemaLocation="ehcache.xsd" name="maestroCacheManager">
...
<cache
name="objectServiceExecute"
maxEntriesLocalHeap="100000"
eternal="false" >
<cacheEventListenerFactory
class="net.sf.ehcache.distribution.jgroups.JGroupsCacheReplicatorFactory"
properties="replicateAsynchronously=true, replicatePuts=true,
replicateUpdates=true, replicateUpdatesViaCopy=true, replicateRemovals=true" />
</cache>
<diskStore
path="java.io.tmpdir/ehcache" />
<cacheManagerPeerProviderFactory
class="net.sf.ehcache.distribution.jgroups.JGroupsCacheManagerPeerProviderFactory"
properties="file=jgroups_tcp.xml"
propertySeparator=";"
/>
<cache
name="org.hibernate.cache.internal.StandardQueryCache"
maxElementsInMemory="10000000"
eternal="true"
memoryStoreEvictionPolicy="LRU" />
<defaultCache
maxElementsInMemory="10000000"
eternal="true"
memoryStoreEvictionPolicy="LRU" >
<cacheEventListenerFactory
class="net.sf.ehcache.distribution.jgroups.JGroupsCacheReplicatorFactory"
properties="replicateAsynchronously=true, replicatePuts=true,
replicateUpdates=true, replicateUpdatesViaCopy=true, replicateRemovals=true" />
</defaultCache>
</ehcache>
最佳答案
这是一个非常奇怪的 JGroups 配置!您缺少故障检测协议(protocol),UNICAST3
和 MERFGE3
等!
上述错误意味着您收到了来自不在集群中的成员的消息,因此该消息被删除。为什么该成员没有加入集群尚不清楚,可能是它没有正确加入。由于您没有任何故障检测协议(protocol),因此它不可能被怀疑和驱逐。
我建议复制 JGroups 附带的 tcp.xml
并将 TCPPING
替换为您的 TCPPING
配置。另请确保在 TCP
中设置 bind_addr
,以确保 JGroups 绑定(bind)到正确的接口(interface)。
希望这有帮助, 干杯
关于java - EhCache 的 JGROUP 中出现错误,删除消息发送者不在表中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35434321/