2013-07-19 30 views
2

我打算將Infinispan用作位於我的應用程序和數據庫之間的遠程緩存集羣。現在我正在計劃創建一個少數節點的集羣,我們假設有2個節點。無法使用Infinispan服務器形成兩個節點的集羣

我在兩臺Ubuntu機器上都使用bin/clustered.sh腳本啓動了Infinispan服務器。

[email protected]:~/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控制檯 -

[email protected]:/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 '<TBD>' 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 (e.g. 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 (e.g. 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 (e.g. 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 (e.g. 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控制檯(然後我機2上啓動的Infinispan服務器後,我開始上機1)

[email protected]:/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 '<TBD>' 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 (e.g. 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 (e.g. 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 (e.g. 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 (e.g. 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) 

則根據上面日誌,我不這麼認爲他們正在形成兩個節點的集羣。確實有些事情是錯誤的。有人可以幫我從這裏出去嗎?另外我如何確保我的網絡接口和基礎設施上啓用了組播?

我非常肯定,應該有一些設置,我需要有能夠在兩個節點的集羣..

回答

3

這兩款機器綁定到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 <IP/host>,使兩臺機器綁定到相互連接它們的網卡。

+0

非常感謝您的幫助。讚賞你的幫助。我對Infinispan來說是全新的,我花了好幾天的時間來弄清楚爲什麼集羣沒有形成,仍然無法做到這一點。您能否提供我應該從我的ubuntu控制檯發出的完整命令。這會幫助我很多。我現在仍然確定我應該在這裏通過什麼IP地址。任何幫助將不勝感激高爾德。 – ferhan

+0

這是網絡101;)。您需要找出與連接兩臺機器的網卡相關的IP地址。檢查每個服務器中'ifconfg'命令的輸出,並使用與eth0或eth1相關聯的IP或任何設置的IP ... –

相關問題