azrael6619 2013-11-28 11:04 采纳率: 0%
浏览 3412

java使用ehcache jgroups 无法数据同步问题

网上找不到答案,求帮忙。

我现在用ehcache jgroups在两台服务器上无法同步(同一台上也不行),tcp和udp都不行,但是单机是可以,而且用rmi是可以的。

 **下面我贴上我的udp的配置文件,两台服务器配置相同** 

xsi:noNamespaceSchemaLocation="ehcache.xsd">

<diskStore path="E:/database" />  
<cacheManagerPeerProviderFactory  
    class="net.sf.ehcache.distribution.jgroups.JGroupsCacheManagerPeerProviderFactory"  
    properties="connect=UDP(mcast_addr=231.12.21.132;mcast_port=45566;ip_ttl=32;  
        mcast_send_buf_size=150000;mcast_recv_buf_size=80000):  
        PING(timeout=2000;num_initial_members=6):  
        MERGE2(min_interval=5000;max_interval=10000):  
        FD_SOCK:VERIFY_SUSPECT(timeout=1500):  
        pbcast.NAKACK(gc_lag=10;retransmit_timeout=3000):  
        UNICAST(timeout=5000):  
        pbcast.STABLE(desired_avg_gossip=20000):  
        FRAG:  
        pbcast.GMS(join_timeout=5000;join_retry_timeout=2000;  
        shun=false;print_local_addr=true)"  
    propertySeparator="::" />  
<cache name="UserCache" maxEntriesLocalHeap="1000"  
    eternal="false" timeToIdleSeconds="1000" timeToLiveSeconds="1000"  
    overflowToDisk="false">  
    <cacheEventListenerFactory  
        class="net.sf.ehcache.distribution.jgroups.JGroupsCacheReplicatorFactory"  
        properties="replicateAsynchronously=true, replicatePuts=true,replicateUpdates=true, replicateUpdatesViaCopy=true,replicateRemovals=true" />  
    <!--   
    <bootstrapCacheLoaderFactory class="net.sf.ehcache.distribution.jgroups.JGroupsBootstrapCacheLoaderFactory"/>  
     -->  
</cache>  

 **下面我贴上我的tcp的配置文件,两台服务器配置相同** 

xsi:noNamespaceSchemaLocation="ehcache.xsd">

<cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.jgroups.JGroupsCacheManagerPeerProviderFactory"  
    properties="connect=TCP(start_port=7800):  
    TCPPING(initial_hosts=192.2.2.57[7800],192.2.2.59[7800];port_range=10;timeout=3000;  
    num_initial_members=3;up_thread=true;down_thread=true):  
    VERIFY_SUSPECT(timeout=1500;down_thread=false;up_thread=false):  
    pbcast.NAKACK(down_thread=true;up_thread=true;gc_lag=100;retransmit_timeout=3000):  
    pbcast.GMS(join_timeout=5000;join_retry_timeout=2000;shun=false;  
    print_local_addr=false;down_thread=true;up_thread=true)"   
    propertySeparator="::" />  

<defaultCache maxElementsInMemory="10000" eternal="true"  
    overflowToDisk="true" timeToIdleSeconds="0" timeToLiveSeconds="0"  
    diskPersistent="false" diskExpiryThreadIntervalSeconds="120">  
    <cacheEventListenerFactory class="net.sf.ehcache.distribution.jgroups.JGroupsCacheReplicatorFactory"  
        properties="replicateAsynchronously=true, replicatePuts=true,  
            replicateUpdates=true, replicateUpdatesViaCopy=false, replicateRemovals=true"/>  
</defaultCache>  

<cache name="UserCache" maxElementsInMemory="10000" eternal="true"  
    overflowToDisk="true" timeToIdleSeconds="0" timeToLiveSeconds="0"  
    diskPersistent="false" diskExpiryThreadIntervalSeconds="120">  
    <cacheEventListenerFactory class="net.sf.ehcache.distribution.jgroups.JGroupsCacheReplicatorFactory"  
        properties="replicateAsynchronously=true, replicatePuts=true,  
            replicateUpdates=true, replicateUpdatesViaCopy=false, replicateRemovals=true"/>  
</cache>  

好心人帮忙解答下,谢谢!

单机都可以用,同步就不行。

  • 写回答

1条回答 默认 最新

  • azrael6619 2013-12-02 02:24
    关注

    怎么没一个人呀。。求帮忙

    评论

报告相同问题?

悬赏问题

  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!