无法使用Infinispan服务器形成两个节点的集群

我打算使用Infinispan作为远程缓存集群,它将位于我的应用程序和数据库之间。 现在我打算制作一个包含几个节点的集群,比如说2个节点。

我在两台Ubuntu机器上使用bin/clustered.sh脚本启动了Infinispan服务器。

 rkost@rj-vm9-14105:~/infinispan/infinispan-server-6.0.0.Alpha1/bin$ uname -a Linux rj-vm9-14105 2.6.35-22-server #33-Ubuntu SMP Sun Sep 19 20:48:58 UTC 2010 x86_64 GNU/Linux 

下面是我使用bin/clustered.sh启动infinispan服务器后在我的两台计算机控制台上获得的结果。 现在我如何确保它们形成两个节点的集群? 他们在哪种模式下形成了一个集群,我该如何计算出一个集群?

机器1控制台 –

 root@rj-raptor-vm1-14938:/home/rkost/infinispan/infinispan-server-6.0.0.Alpha1/bin# sh clustered.sh ========================================================================= JBoss Bootstrap Environment JBOSS_HOME: /home/rkost/infinispan/infinispan-server-6.0.0.Alpha1 JAVA: java JAVA_OPTS: -server -XX:+UseCompressedOops -XX:+TieredCompilation -Xms1303m -Xmx1303m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Djboss.server.default.config=clustered.xml -Dsun.nio.ch.bugLevel='' ========================================================================= 23:16:14,426 INFO [org.jboss.modules] (main) JBoss Modules version 1.2.0.CR1 23:16:14,874 INFO [org.jboss.msc] (main) JBoss MSC version 1.0.4.GA 23:16:14,934 INFO [org.jboss.as] (MSC service thread 1-7) JBAS015899: JBoss Infinispan Server 6.0.0.Alpha1 (AS 7.2.0.Final) starting 23:16:15,784 INFO [org.xnio] (MSC service thread 1-5) XNIO Version 3.0.7.GA 23:16:15,788 INFO [org.jboss.as.server] (Controller Boot Thread) JBAS015888: Creating http management service using socket-binding (management-http) 23:16:15,792 INFO [org.xnio.nio] (MSC service thread 1-5) XNIO NIO Implementation Version 3.0.7.GA 23:16:15,799 INFO [org.jboss.remoting] (MSC service thread 1-5) JBoss Remoting version 3.2.14.GA 23:16:15,865 INFO [org.jboss.as.clustering.jgroups] (ServerService Thread Pool -- 22) JBAS010260: Activating JGroups subsystem. 23:16:15,865 INFO [org.jboss.as.security] (ServerService Thread Pool -- 27) JBAS013171: Activating Security Subsystem 23:16:15,868 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 19) JBAS010280: Activating Infinispan subsystem. 23:16:15,876 INFO [org.jboss.as.security] (MSC service thread 1-4) JBAS013170: Current PicketBox version=4.0.15.Final 23:16:15,879 INFO [org.jboss.as.naming] (ServerService Thread Pool -- 25) JBAS011800: Activating Naming Subsystem 23:16:15,921 INFO [org.jboss.as.connector.logging] (MSC service thread 1-6) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.15.Final) 23:16:15,926 INFO [org.jboss.as.jsf] (ServerService Thread Pool -- 31) JBAS012605: Activated the following JSF Implementations: [main, 1.2] 23:16:15,957 INFO [org.jboss.as.naming] (MSC service thread 1-9) JBAS011802: Starting Naming Service 23:16:16,073 INFO [org.apache.coyote.http11] (MSC service thread 1-3) JBWEB003001: Coyote HTTP/1.1 initializing on : http-/127.0.0.1:8080 23:16:16,080 INFO [org.apache.coyote.ajp] (MSC service thread 1-16) JBWEB003046: Starting Coyote AJP/1.3 on ajp-/127.0.0.1:8009 23:16:16,087 INFO [org.apache.coyote.http11] (MSC service thread 1-3) JBWEB003000: Coyote HTTP/1.1 starting on: http-/127.0.0.1:8080 23:16:16,106 INFO [org.jboss.modcluster.ModClusterService] (ServerService Thread Pool -- 32) Initializing mod_cluster 1.2.3.Final 23:16:16,135 INFO [org.jboss.modcluster.advertise.impl.AdvertiseListenerImpl] (ServerService Thread Pool -- 32) Listening to proxy advertisements on 224.0.1.115:23,364 23:16:16,253 INFO [org.jboss.as.remoting] (MSC service thread 1-16) JBAS017100: Listening on 127.0.0.1:4447 23:16:16,253 INFO [org.jboss.as.remoting] (MSC service thread 1-4) JBAS017100: Listening on 127.0.0.1:9999 23:16:16,407 INFO [org.infinispan.factories.GlobalComponentRegistry] (MSC service thread 1-3) ISPN000128: Infinispan version: Infinispan '' 6.0.0.Alpha1 23:16:16,416 INFO [org.infinispan.server.endpoint] (MSC service thread 1-6) JDGS010000: WebSocketServer starting 23:16:16,416 INFO [org.infinispan.server.endpoint] (MSC service thread 1-11) JDGS010000: HotRodServer starting 23:16:16,416 INFO [org.infinispan.server.endpoint] (MSC service thread 1-6) JDGS010001: WebSocketServer listening on 127.0.0.1:8181 23:16:16,416 INFO [org.infinispan.server.endpoint] (MSC service thread 1-11) JDGS010001: HotRodServer listening on 127.0.0.1:11222 23:16:16,512 INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service thread 1-15) ISPN000078: Starting JGroups Channel 23:16:16,523 WARN [org.jgroups.protocols.UDP] (MSC service thread 1-15) [JGRP00015] the send buffer of socket DatagramSocket was set to 640KB, but the OS only allocated 131.07KB. This might lead to performance problems. Please set your max send buffer in the OS correctly (eg net.core.wmem_max on Linux) 23:16:16,524 WARN [org.jgroups.protocols.UDP] (MSC service thread 1-15) [JGRP00015] the receive buffer of socket DatagramSocket was set to 20MB, but the OS only allocated 131.07KB. This might lead to performance problems. Please set your max receive buffer in the OS correctly (eg net.core.rmem_max on Linux) 23:16:16,524 WARN [org.jgroups.protocols.UDP] (MSC service thread 1-15) [JGRP00015] the send buffer of socket MulticastSocket was set to 640KB, but the OS only allocated 131.07KB. This might lead to performance problems. Please set your max send buffer in the OS correctly (eg net.core.wmem_max on Linux) 23:16:16,525 WARN [org.jgroups.protocols.UDP] (MSC service thread 1-15) [JGRP00015] the receive buffer of socket MulticastSocket was set to 25MB, but the OS only allocated 131.07KB. This might lead to performance problems. Please set your max receive buffer in the OS correctly (eg net.core.rmem_max on Linux) 23:16:16,528 INFO [stdout] (MSC service thread 1-15) 23:16:16,528 INFO [stdout] (MSC service thread 1-15) ------------------------------------------------------------------- 23:16:16,528 INFO [stdout] (MSC service thread 1-15) GMS: address=rj-raptor-vm1-14938/clustered, cluster=clustered, physical address=127.0.0.1:55200 23:16:16,528 INFO [stdout] (MSC service thread 1-15) ------------------------------------------------------------------- 23:16:16,550 INFO [org.infinispan.jmx.CacheJmxRegistration] (MSC service thread 1-7) ISPN000031: MBeans were successfully registered to the platform MBean server. 23:16:16,550 INFO [org.infinispan.jmx.CacheJmxRegistration] (MSC service thread 1-3) ISPN000031: MBeans were successfully registered to the platform MBean server. 23:16:16,552 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1-7) JBAS010281: Started jboss-web-policy cache from security container 23:16:16,552 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1-3) JBAS010281: Started other cache from security container 23:16:16,561 INFO [org.infinispan.server.endpoint] (MSC service thread 1-8) JDGS010000: REST starting 23:16:16,756 INFO [org.infinispan.server.endpoint] (MSC service thread 1-8) JDGS010002: REST mapped to /rest 23:16:21,546 INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service thread 1-15) ISPN000094: Received new cluster view: [rj-raptor-vm1-14938/clustered|0] [rj-raptor-vm1-14938/clustered] 23:16:21,620 INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service thread 1-15) ISPN000079: Cache local address is rj-raptor-vm1-14938/clustered, physical addresses are [127.0.0.1:55200] 23:16:21,664 INFO [org.infinispan.jmx.CacheJmxRegistration] (MSC service thread 1-15) ISPN000031: MBeans were successfully registered to the platform MBean server. 23:16:21,664 INFO [org.infinispan.jmx.CacheJmxRegistration] (MSC service thread 1-2) ISPN000031: MBeans were successfully registered to the platform MBean server. 23:16:21,665 INFO [org.infinispan.jmx.CacheJmxRegistration] (MSC service thread 1-16) ISPN000031: MBeans were successfully registered to the platform MBean server. 23:16:21,675 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1-2) JBAS010281: Started memcachedCache cache from clustered container 23:16:21,675 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1-15) JBAS010281: Started default cache from clustered container 23:16:21,675 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1-16) JBAS010281: Started namedCache cache from clustered container 23:16:21,676 INFO [org.infinispan.server.endpoint] (MSC service thread 1-3) JDGS010000: MemcachedServer starting 23:16:21,677 INFO [org.infinispan.server.endpoint] (MSC service thread 1-3) JDGS010001: MemcachedServer listening on 127.0.0.1:11211 23:16:22,216 INFO [org.infinispan.jmx.CacheJmxRegistration] (MSC service thread 1-11) ISPN000031: MBeans were successfully registered to the platform MBean server. 23:16:22,220 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1-11) JBAS010281: Started ___hotRodTopologyCache cache from clustered container 23:16:22,319 INFO [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on http://127.0.0.1:9990/management 23:16:22,320 INFO [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.0.0.1:9990 23:16:22,320 INFO [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss Infinispan Server 6.0.0.Alpha1 (AS 7.2.0.Final) started in 8264ms - Started 93 of 142 services (49 services are passive or on-demand) 

机器2控制台(然后我在机器1上启动后在机器2上启动了Infinispan服务器)

 root@rj-raptor-vm2-14939:/home/rkost/infinispan/infinispan-server-6.0.0.Alpha1/bin# sh clustered.sh ========================================================================= JBoss Bootstrap Environment JBOSS_HOME: /home/rkost/infinispan/infinispan-server-6.0.0.Alpha1 JAVA: java JAVA_OPTS: -server -XX:+UseCompressedOops -XX:+TieredCompilation -Xms1303m -Xmx1303m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Djboss.server.default.config=clustered.xml -Dsun.nio.ch.bugLevel='' ========================================================================= 22:45:59,604 INFO [org.jboss.modules] (main) JBoss Modules version 1.2.0.CR1 22:45:59,855 INFO [org.jboss.msc] (main) JBoss MSC version 1.0.4.GA 22:45:59,917 INFO [org.jboss.as] (MSC service thread 1-8) JBAS015899: JBoss Infinispan Server 6.0.0.Alpha1 (AS 7.2.0.Final) starting 22:46:00,731 INFO [org.xnio] (MSC service thread 1-16) XNIO Version 3.0.7.GA 22:46:00,734 INFO [org.jboss.as.server] (Controller Boot Thread) JBAS015888: Creating http management service using socket-binding (management-http) 22:46:00,740 INFO [org.xnio.nio] (MSC service thread 1-16) XNIO NIO Implementation Version 3.0.7.GA 22:46:00,748 INFO [org.jboss.remoting] (MSC service thread 1-16) JBoss Remoting version 3.2.14.GA 22:46:00,773 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 19) JBAS010280: Activating Infinispan subsystem. 22:46:00,797 INFO [org.jboss.as.clustering.jgroups] (ServerService Thread Pool -- 22) JBAS010260: Activating JGroups subsystem. 22:46:00,800 INFO [org.jboss.as.security] (ServerService Thread Pool -- 27) JBAS013171: Activating Security Subsystem 22:46:00,801 INFO [org.jboss.as.naming] (ServerService Thread Pool -- 25) JBAS011800: Activating Naming Subsystem 22:46:00,803 INFO [org.jboss.as.jsf] (ServerService Thread Pool -- 31) JBAS012605: Activated the following JSF Implementations: [main, 1.2] 22:46:00,809 INFO [org.jboss.as.security] (MSC service thread 1-14) JBAS013170: Current PicketBox version=4.0.15.Final 22:46:00,824 INFO [org.jboss.as.connector.logging] (MSC service thread 1-4) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.15.Final) 22:46:00,828 INFO [org.jboss.as.naming] (MSC service thread 1-5) JBAS011802: Starting Naming Service 22:46:00,948 INFO [org.apache.coyote.http11] (MSC service thread 1-6) JBWEB003001: Coyote HTTP/1.1 initializing on : http-/127.0.0.1:8080 22:46:00,951 INFO [org.apache.coyote.ajp] (MSC service thread 1-9) JBWEB003046: Starting Coyote AJP/1.3 on ajp-/127.0.0.1:8009 22:46:00,960 INFO [org.apache.coyote.http11] (MSC service thread 1-6) JBWEB003000: Coyote HTTP/1.1 starting on: http-/127.0.0.1:8080 22:46:00,986 INFO [org.jboss.modcluster.ModClusterService] (ServerService Thread Pool -- 32) Initializing mod_cluster 1.2.3.Final 22:46:00,995 INFO [org.jboss.modcluster.advertise.impl.AdvertiseListenerImpl] (ServerService Thread Pool -- 32) Listening to proxy advertisements on 224.0.1.115:23,364 22:46:01,181 INFO [org.jboss.as.remoting] (MSC service thread 1-4) JBAS017100: Listening on 127.0.0.1:9999 22:46:01,181 INFO [org.jboss.as.remoting] (MSC service thread 1-7) JBAS017100: Listening on 127.0.0.1:4447 22:46:01,302 INFO [org.infinispan.factories.GlobalComponentRegistry] (MSC service thread 1-13) ISPN000128: Infinispan version: Infinispan '' 6.0.0.Alpha1 22:46:01,355 INFO [org.infinispan.server.endpoint] (MSC service thread 1-5) JDGS010000: HotRodServer starting 22:46:01,356 INFO [org.infinispan.server.endpoint] (MSC service thread 1-5) JDGS010001: HotRodServer listening on 127.0.0.1:11222 22:46:01,357 INFO [org.infinispan.server.endpoint] (MSC service thread 1-15) JDGS010000: WebSocketServer starting 22:46:01,358 INFO [org.infinispan.server.endpoint] (MSC service thread 1-15) JDGS010001: WebSocketServer listening on 127.0.0.1:8181 22:46:01,458 INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service thread 1-12) ISPN000078: Starting JGroups Channel 22:46:01,472 WARN [org.jgroups.protocols.UDP] (MSC service thread 1-12) [JGRP00015] the send buffer of socket DatagramSocket was set to 640KB, but the OS only allocated 131.07KB. This might lead to performance problems. Please set your max send buffer in the OS correctly (eg net.core.wmem_max on Linux) 22:46:01,473 WARN [org.jgroups.protocols.UDP] (MSC service thread 1-12) [JGRP00015] the receive buffer of socket DatagramSocket was set to 20MB, but the OS only allocated 131.07KB. This might lead to performance problems. Please set your max receive buffer in the OS correctly (eg net.core.rmem_max on Linux) 22:46:01,474 WARN [org.jgroups.protocols.UDP] (MSC service thread 1-12) [JGRP00015] the send buffer of socket MulticastSocket was set to 640KB, but the OS only allocated 131.07KB. This might lead to performance problems. Please set your max send buffer in the OS correctly (eg net.core.wmem_max on Linux) 22:46:01,474 WARN [org.jgroups.protocols.UDP] (MSC service thread 1-12) [JGRP00015] the receive buffer of socket MulticastSocket was set to 25MB, but the OS only allocated 131.07KB. This might lead to performance problems. Please set your max receive buffer in the OS correctly (eg net.core.rmem_max on Linux) 22:46:01,478 INFO [stdout] (MSC service thread 1-12) 22:46:01,478 INFO [stdout] (MSC service thread 1-12) ------------------------------------------------------------------- 22:46:01,478 INFO [stdout] (MSC service thread 1-12) GMS: address=rj-raptor-vm2-14939/clustered, cluster=clustered, physical address=127.0.0.1:55200 22:46:01,478 INFO [stdout] (MSC service thread 1-12) ------------------------------------------------------------------- 22:46:01,483 INFO [org.infinispan.jmx.CacheJmxRegistration] (MSC service thread 1-8) ISPN000031: MBeans were successfully registered to the platform MBean server. 22:46:01,483 INFO [org.infinispan.jmx.CacheJmxRegistration] (MSC service thread 1-13) ISPN000031: MBeans were successfully registered to the platform MBean server. 22:46:01,486 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1-8) JBAS010281: Started jboss-web-policy cache from security container 22:46:01,486 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1-13) JBAS010281: Started other cache from security container 22:46:01,495 INFO [org.infinispan.server.endpoint] (MSC service thread 1-1) JDGS010000: REST starting 22:46:01,707 INFO [org.infinispan.server.endpoint] (MSC service thread 1-1) JDGS010002: REST mapped to /rest 22:46:06,495 INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service thread 1-12) ISPN000094: Received new cluster view: [rj-raptor-vm2-14939/clustered|0] [rj-raptor-vm2-14939/clustered] 22:46:06,572 INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service thread 1-12) ISPN000079: Cache local address is rj-raptor-vm2-14939/clustered, physical addresses are [127.0.0.1:55200] 22:46:06,618 INFO [org.infinispan.jmx.CacheJmxRegistration] (MSC service thread 1-12) ISPN000031: MBeans were successfully registered to the platform MBean server. 22:46:06,618 INFO [org.infinispan.jmx.CacheJmxRegistration] (MSC service thread 1-3) ISPN000031: MBeans were successfully registered to the platform MBean server. 22:46:06,618 INFO [org.infinispan.jmx.CacheJmxRegistration] (MSC service thread 1-6) ISPN000031: MBeans were successfully registered to the platform MBean server. 22:46:06,628 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1-12) JBAS010281: Started memcachedCache cache from clustered container 22:46:06,628 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1-3) JBAS010281: Started namedCache cache from clustered container 22:46:06,628 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1-6) JBAS010281: Started default cache from clustered container 22:46:06,628 INFO [org.infinispan.server.endpoint] (MSC service thread 1-16) JDGS010000: MemcachedServer starting 22:46:06,628 INFO [org.infinispan.server.endpoint] (MSC service thread 1-16) JDGS010001: MemcachedServer listening on 127.0.0.1:11211 22:46:07,052 INFO [org.infinispan.jmx.CacheJmxRegistration] (MSC service thread 1-5) ISPN000031: MBeans were successfully registered to the platform MBean server. 22:46:07,056 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1-5) JBAS010281: Started ___hotRodTopologyCache cache from clustered containerReply to original post 22:46:07,143 INFO [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on http://127.0.0.1:9990/management 22:46:07,144 INFO [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.0.0.1:9990 22:46:07,144 INFO [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss Infinispan Server 6.0.0.Alpha1 (AS 7.2.0.Final) started in 7780ms - Started 93 of 142 services (49 services are passive or on-demand) 

根据上面的日志,我不认为他们正在形成一个由两个节点组成的集群。 确实有问题。 有人可以帮我从这里出去吗? 此外,我如何确保在我的网络接口和基础设施上启用了多播?

我非常确定,应该有一些设置,我需要启用两个节点的集群..

两台机器都绑定到127.0.0.1。 如果绑定到该地址,则无法使用另一台计算机创建集群:)

 23:16:21,620 INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service thread 1-15) ISPN000079: Cache local address is rj-raptor-vm1-14938/clustered, physical addresses are [127.0.0.1:55200] 22:46:06,572 INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service thread 1-12) ISPN000079: Cache local address is rj-raptor-vm2-14939/clustered, physical addresses are [127.0.0.1:55200] 

传递-b 以便两台计算机都绑定到彼此链接它们的NIC。