所以,我只是在 apache 后面设置了两个 jboss 节点,启用了集群并设置了 ehcache 同步。现在两个节点都在运行,我在未收到请求的节点上收到以下异常:
...
JBoss_5_1_0_GA date=200905221634)] Started in 2m:16s:391ms
12:52:51,139 ERROR [NAKACK] sender 10.166.17.53:7600 not found in xmit_table
12:52:51,139 ERROR [NAKACK] range is null
12:52:51,145 INFO [RPCManagerImpl] Received new cluster view: MergeView::[10.16 6.17.52:7600|1] [10.166.17.52:7600, 10.166.17.53:7600], subgroups=[[10.166.17.52 :7600|0] [10.166.17.52:7600], [10.166.17.53:7600|0] [10.166.17.53:7600]]
12:53:10,006 WARN [NAKACK] 10.166.17.52:7600] discarded message from non-member 10.166.17.53:7600, my view is [10.166.17.52:7600|0] [10.166.17.52:7600]
12:53:10,108 WARN [NAKACK] 10.166.17.52:7600] discarded message from non-member 10.166.17.53:7600, my view is [10.166.17.52:7600|0] [10.166.17.52:7600]
12:53:10,110 ERROR [NAKACK] sender 10.166.17.53:7600 not found in xmit_table
12:53:10,110 ERROR [NAKACK] range is null
12:53:10,113 INFO [graCluster] New cluster view for partition graCluster (id: 1 , delta: 1) : [127.0.0.1:1099, 127.0.0.1:1099]
12:53:10,117 INFO [graCluster] Merging partitions...
12:53:10,118 INFO [graCluster] Dead members: 0
12:53:10,120 INFO [graCluster] Originating groups: [[10.166.17.52:7600|0] [10.1 66.17.52:7600], [10.166.17.53:7600|0] [10.166.17.53:7600]]
以下是我的 ehcache.xml 的样子:
<cacheManagerPeerProviderFactory
class="net.sf.ehcache.distribution.jgroups.JGroupsCacheManagerPeerProviderFactory"
properties="connect=TCP(start_port=7800):TCPPING(initial_hosts=10.46.49.52[7800],10.46.49.53[7800];port_range=10;timeout=3000;
num_initial_members=2;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="::"/>
最后这是我运行两个节点的方式:
./run.sh -c all -g myCluster -Djboss.default.jgroups.stack=tcp -Djgroups.tcpping.initial_hosts=10.166.17.52[7600],10.166.17.53[7600] -Djboss.messaging.ServicePeerId=1 - Djgroups.bind_addr=10.166.17.52 -Djboss.node.name=node1 -b 0.0.0.0
和
./run.sh -c all -g myCluster-Djboss.default.jgroups.stack=tcp -Djgroups.tcpping.initial_hosts=10.166.17.52[7600],10.166.17.53[7600] -Djboss.messaging.ServicePeerId=2 - Djgroups.bind_addr=10.166.17.53 -Djboss.node.name=node2 -b 0.0.0.0
服务器正在尝试相互交谈。我不确定它们是否甚至在同一个集群中。任何帮助都感激不尽。