Not able to form a cluster of two nodes using Infinispan server

别来无恙 提交于 2019-12-06 11:46:08

问题


I am planning to use Infinispan as the remote cache cluster that will sit between my application and database. Now I am planning to make a cluster of few nodes, let's say 2 nodes.

I started the Infinispan server using the bin/clustered.sh script on both of my Ubuntu machines.

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

Below is the result I got on both of my machines console after starting the infinispan server using the bin/clustered.sh. Now how do I make sure that they are forming a cluster of two nodes? And on which mode they have formed a cluster, how do I figure that one out?

Machine 1 console-

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 '<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)

Machine 2 console (And then I started Infinispan server on machine 2 after I started on machine 1)

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 '<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)

As per the above logs, I don't think so they are forming a cluster of two nodes. Something is wrong for sure. Can anyone help me out here? And also how do I make sure multicast is enabled on my network interfaces and infrastructure?

I am pretty much sure, there should be some settings that I need to have to enable the cluster of two nodes..


回答1:


Both machines are bound to 127.0.0.1. Impossible to create a cluster with another machine if bound to that address :)

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]

Pass -b <IP/host> so that both machines bind to the NIC that links them with each other.



来源:https://stackoverflow.com/questions/17753107/not-able-to-form-a-cluster-of-two-nodes-using-infinispan-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!