Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/347.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java EhCache的JGROUPs中出错,删除不在表中的邮件发件人_Java_Hibernate_Wildfly_Ehcache_Jgroups - Fatal编程技术网

Java EhCache的JGROUPs中出错,删除不在表中的邮件发件人

Java EhCache的JGROUPs中出错,删除不在表中的邮件发件人,java,hibernate,wildfly,ehcache,jgroups,Java,Hibernate,Wildfly,Ehcache,Jgroups,集群中有四个节点,需要同步它们。当节点BRJGSD309173尝试通过JGROUPs向BRJGSD3333007发送消息时,服务器BRJGSD3333007通知如下消息: 11:34:07759警告[org.jgroups.protocols.pbcast.NAKACK](传入-2,maestroCacheManager,BRJGSD33007-24075)BRJGSD33007-24075:从BRJGSD309173-7667(发送方不在表[BRJGSD33007-24075]中)删除消息47

集群中有四个节点,需要同步它们。当节点BRJGSD309173尝试通过JGROUPs向BRJGSD3333007发送消息时,服务器BRJGSD3333007通知如下消息:

11:34:07759警告[org.jgroups.protocols.pbcast.NAKACK](传入-2,maestroCacheManager,BRJGSD33007-24075)BRJGSD33007-24075:从BRJGSD309173-7667(发送方不在表[BRJGSD33007-24075]中)删除消息4787,视图=[BRJGSD33007-24075 | 0][BRJGSD33007-24075]

以下是eh 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配置!您缺少故障检测协议,
UNICAST3
MERFGE3

上面的错误意味着您收到了来自不在群集中的成员的消息,因此该消息被删除。该成员不在群集中的原因尚不清楚,可能是它没有正确加入。由于您没有任何故障检测协议,因此不可能怀疑并排除它

我建议复制JGroups附带的
tcp.xml
,并用
tcping
配置替换
tcping
。还要确保在
TCP
中设置了
bind\u addr
,以确保JGroups绑定到正确的接口

希望这有帮助,
干杯

这是一个非常棒的JGroups配置!您缺少故障检测协议,
UNICAST3
MERFGE3

上面的错误意味着您收到了来自不在群集中的成员的消息,因此该消息被删除。该成员不在群集中的原因尚不清楚,可能是它没有正确加入。由于您没有任何故障检测协议,因此不可能怀疑并排除它

我建议复制JGroups附带的
tcp.xml
,并用
tcping
配置替换
tcping
。还要确保在
TCP
中设置了
bind\u addr
,以确保JGroups绑定到正确的接口

希望这有帮助, 干杯