-
1. Re: JBoss clustering in Different LANs
inspector Nov 9, 2012 5:16 AM (in response to madhu888m)I'm not familiar with the AS 5, but I think some more information about what you mean with "different LANs" would be helpful. How are the two LANs separeted? Routers or firewalls in between? Maybe Security requirements? Any other special requirements of the network?
-
2. Re: JBoss clustering in Different LANs
madhu888m Nov 9, 2012 6:57 AM (in response to inspector)Thanks for your reply.
One network is established with IP 192.168.0.x. And a Router is connected to create a sub-network with IP as 192.168.1.x
-
3. Re: JBoss clustering in Different LANs
inspector Nov 9, 2012 7:11 AM (in response to madhu888m)Ok. As already mentioned, I'm not familiar with the JBoss AS 5. But I think it uses multicast communication as well as the AS 7 does. So configuring the router to pass through ip-multicasts could do the job. On the other hand you should evaluate if this does mess up other network things (Usally you have some reason to use different Subnets).
Alternative: If the AS 5 uses JGroups you could switch over to the TCP stack and use TCPPING instead of MPING. But I'm not sure if JGroups is used in the AS 5 and if it is you should look if it is used by all the relevant systems, especially JMS. But be warned, depending on you cluster-size the TCP stack can be a bad performance drawback.
-
4. Re: JBoss clustering in Different LANs
madhu888m Nov 12, 2012 2:56 AM (in response to inspector)Thanks for your suggestions.
To change JGroup channel protocol i have done following steps. Both the node server started successfully. But JMS is not working properly.
Node1 (i.e. 192.168.0.115) sent a message to the Node2 (i.e 192.168.1.125)
Node2 received message properly. But if Node2 sends a message to Node1, Node1 is not received message. There are no exceptions on console.
Are there any configurations i am missing.
I changed PING to TCPPING in the \jboss-5.1.0.GA\server\MasterServer\deploy\cluster\jgroups-channelfactory.sar\META-INF\jgroups-channelfactory-stacks.xml file.
The same changes i made to both the Nodes.
Under the tcp section...
<stack name="tcp"
description="TCP based stack, with flow control and message bundling.
TCP stacks are usually used when IP multicasting cannot
be used in a network, e.g. because it is disabled (e.g.
routers discard multicast)">
- - - - - - - -
- - - - - - - -
<!-- <MPING timeout="3000"
num_initial_members="3"
mcast_addr="${jboss.partition.udpGroup:230.11.11.11}"
mcast_port="${jgroups.tcp.mping_mcast_port:45700}"
ip_ttl="${jgroups.udp.ip_ttl:2}"/> -->
<!-- Alternative 2: non multicast-based replacement for MPING. Requires a static configuration
of *all* possible cluster members. -->
<TCPPING timeout="3000"
initial_hosts="${jgroups.tcpping.initial_hosts:192.168.0.115[7600],192.168.1.125[7601]}"
port_range="1"
num_initial_members="3"/>
Under the jbm-data...
<stack name="jbm-data"
description="Stack optimized for the JBoss Messaging Data Channel">
- - - - - - - -
- - - - - - - -
<!-- <MPING timeout="5000"
mcast_addr="${jboss.partition.udpGroup:228.6.6.6}"
mcast_port="${jboss.messaging.datachanneludpport:45710}"
ip_ttl="${jboss.messaging.ipttl:8}"
num_initial_members="5"
num_ping_requests="3"/> -->
<TCPPING timeout="3000"
initial_hosts="${jgroups.tcpping.initial_hosts:192.168.0.115[7900],192.168.1.125[7900]}"
port_range="1"
num_initial_members="3"/>
Changed to
<attribute name="ControlChannelName">tcp</attribute> in \jboss-5.1.0.GA\server\MasterServer\deploy\messaging\mysql-persistence-service.xml file.
And my start commands are
run.bat -c MasterServer -b 192.168.0.115 -g MyPartition -u 239.255.100.100 -Djboss.default.jgroups.stack=tcp -Djgroups.tcpping.initial_hosts=192.168.0.115[7600],192.168.1.125[7600] -Djboss.messaging.ServerPeerID=15
run.bat -c SlaveServer -b 192.168.1.125-g MyPartition -u 239.255.100.100 -Djboss.default.jgroups.stack=tcp -Djgroups.tcpping.initial_hosts=192.168.0.115[7600],192.168.1.125[7600] -Djboss.messaging.ServerPeerID=26
Can someone help me by currecting my configurations?
Thanks in advance.
-
5. Re: JBoss clustering in Different LANs
madhu888m Nov 12, 2012 5:46 AM (in response to madhu888m)Anybody there to help?
-
6. Re: JBoss clustering in Different LANs
rhusar Nov 13, 2012 12:10 PM (in response to madhu888m)These 2 LANs do not pass UDP mutlicast traffic accross -- right?
The solution is to use TCP for both discovery and transport (this might have some performance drawbacks) for both clustering and JBM JGroups stacks. You will have to change it in few places, make sure you change all of them (i.e. wasn't there another JBM channel besides data?).
PS: there is no really master and slave server
PS2: you are missing a space after ip address in the second command
PS3: what is -u for if you dont want to use multicast
PS4: keep group names small for performance, ideally single character
PS5: the real way of solving this, which you cant do atm, is to keep both clusters in the other labs using mutlicat address, but then have the coordinators communicate, typically using TCP -- see JGroups RELAY.