【发布时间】:2017-11-22 13:19:35
【问题描述】:
Used jar version:
ehcache-core:2.4.2
ehcache-jgroupsreplication:1.4(exclusion ehcache-core)
我有两台服务器,一台是192.168.6.84,另一台是192.168.6.83, 我的配置是:
<cacheManagerPeerProviderFactory propertySeparator="::"
properties="connect=TCP(bind_addr=192.168.6.84;bind_port=7800):
TCPPING(initial_hosts=192.168.6.83[7800],192.168.6.84[7800];port_range=10;
timeout=3000; num_initial_members=2):
VERIFY_SUSPECT(timeout=1500):
pbcast.NAKACK(use_mcast_xmit=false;gc_lag=100;retransmit_timeout=3000;
discard_delivered_msgs=false):
pbcast.GMS(join_timeout=5000;print_local_addr=false)" class="net.sf.ehcache.distribution.jgroups.JGroupsCacheManagerPeerProviderFactory"/>
另外一个配置只改变ip地址。 而在我的测试代码中,我只做一件事:
- 一个服务器 A 总是每 2 秒将元素放入缓存中,
- 另一台服务器 B 总是每 2 秒获取一次缓存大小
B 的缓存大小始终为 0,并发出警告:
NAKACK.java:794 -- xxxx(B's computer name):dropped message from xxxx(A's computer name) (not in xmit_table),keys are xxxxx,view =[xxxx|0]
是我的配置错误吗?
【问题讨论】:
-
而且有时候也没有问题
标签: java replication ehcache jgroups