【问题标题】:Ehcache JGroups Tcp replication error:dropped message from xxx(not in xmit_table)Ehcache JGroups Tcp 复制错误:从 xxx 丢弃消息(不在 xmit_table 中)
【发布时间】: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


【解决方案1】:

首先,您的配置看起来很奇怪:您缺少UNICAST、任何故障检测协议(FD_ALL、FD_SOCK)和STABLE。缺少后者意味着您最终会耗尽内存,因为没有清除整个集群的消息!

您看到的错误意味着集群没有形成。

【讨论】:

  • 非常感谢。在哪里可以得到基于JGroups版本的标准tcp.xml?我查了jgroups官网,但没有找到。
  • JGroups 附带了一些示例配置(在 JAR 中),或查看 github.com/belaban/JGroups/tree/master/conf,例如tcp.xml,并根据您的需要进行修改(例如bind_addr)。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2018-03-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多