1 2 Previous Next 18 Replies Latest reply: Jun 28, 2012 2:54 PM by Wolf-Dieter Fink RSS

JBoss AS 6 Clustering

Abdur Rahman Newbie

Hi,

 

My question is: How can I verify that a cluster set up is working properly?

 

I have installed JBoss AS 6 on two different machines (fedora 13).

 

I launched the first instance on node1 (172.16.1.10) with following command:

./run.sh -c all -g DocsPartition -u 239.255.100.100 -b 172.16.1.10 -Djboss.messaging.ServerPeerID=1

 

and the second on node2 (172.16.1.38) with following command:

./run.sh -c all -g DocsPartition -u 239.255.100.100 -b 172.16.1.38 -Djboss.messaging.ServerPeerID=2

 

While uploading an example clustered ejb, I don't see any message communication on the respective terminals.

 

Thanks

  • 1. JBoss AS 6 Clustering
    Roshan Pradeep Newbie

    Hi

     

    Once the cluster nodes are connecting to a partition (in your case "DocsPartition"), you can see the log messages in server.log file.

     

    Regarding the uploading of ejb's, use the farm service. Once the cluster is up and running, copy your EAR/WAR to the farm directory of the server node. And you can see it automatically copying to the other cluster nodes as well (how nice is it??).

     

    Thanks.

  • 2. JBoss AS 6 Clustering
    Wolf-Dieter Fink Master

    You might have a look to the JMX-console, search for jboss.jgroups and the GMS bean. here the cluster view and the coordinator is shown.

     

    BTW we do not use hot-deployment and farming in production with JBoss4/5 because of memory consumption (each hot deploy will leave a footprint in memory) and security (a touch of one file might cause a restart of many applications).

    But the memory consumption might fixed in JBoss6

  • 3. JBoss AS 6 Clustering
    Abdur Rahman Newbie

    I have looked at the server.log and JMX-console. But didn't see information about the two nodes. Further I uploaded an example clustered ejb3. But didn't see on the other node.

     

    Thanks to all.

  • 4. JBoss AS 6 Clustering
    Wolf-Dieter Fink Master

    Could you post command line and attach boot.log/server.log from startup of both nodes?

  • 5. Re: JBoss AS 6 Clustering
    Abdur Rahman Newbie

    I have attached the logs files of the two nodes. Thanks

  • 6. JBoss AS 6 Clustering
    Wolf-Dieter Fink Master

    Ok,

    within the boot.log I see the correct start of JGroups but no cluster.

    Could you check whether the JGroups test is running, see http://community.jboss.org/wiki/TestingJBoss

    It is just a small test and you can check at both systems (I think *.10 and *.38 is a different system).

    For testing use ''-Djgroups.bind_addr=' with your IP. If it works without this option the network interfaces are wrong configured for multicasting.

    Check whether a switch is in between (if you have two physical systems), maybe the multicast is supressed here.

  • 7. Re: JBoss AS 6 Clustering
    Abdur Rahman Newbie

    Thanks for assitance.

     

    I ran the following two jgroups tests:

     

    Test1:

    Works fine on the same machine:

    On one terminal:

    # cd server/all/lib/

    # java -cp jgroups.jar org.jgroups.tests.McastReceiverTest -mcast_addr 224.10.10.10 -port 54200

     

    On another terminal:

    # cd server/all/lib/

    # java -cp jgroups.jar org.jgroups.tests.McastSenderTest -mcast_addr 224.10.10.10 -port 54200

     

    The new view is information is shown on the first terminal as under:

    ...

    -------------------------------------------------------------------

    GMS: address=localhost-34400, cluster=ViewDemo, physical address=fe80:0:0:0:250:56ff:fec0:8:55200

    -------------------------------------------------------------------

    ** New view: [localhost-34400|0] [localhost-34400]

    ** New view: [localhost-34400|1] [localhost-34400, localhost-26746]

    ...

     

    But the above test does not work on different machines. I mean the view status is not reflected on the first terminal.

     

     

    Test2:

    The following jgroups test works fine:

    On one terminal:

    # cd server/all/lib/

    # java -cp ./jgroups.jar org.jgroups.tests.McastReceiverTest -mcast_addr 224.10.10.10 -port 54200

     

    On another terminal (can be different machine:

    # cd server/all/lib/

    # java -cp ./jgroups.jar org.jgroups.tests.McastReceiverTest -mcast_addr 224.10.10.10 -port 54200

     

    ..........................................................................

    I then performed steps:

    1. Allowed some ports from firewalls on both the machines specified in the jboss ports-default binding.

    2. Started jboss on node1 (172.16.1.10):

    # ./run.sh -c all -g DocsPartition -u 239.255.100.100 -b 172.16.1.10 -Djboss.messaging.ServerPeerID=1 -Djboss.service.binding.set=ports-default

     

    2. Started jboss on node2 (172.16.1.38):

    # ./run.sh -c all -g DocsPartition -u 239.255.100.100 -b 172.16.1.38 -Djboss.messaging.ServerPeerID=2 -Djboss.service.binding.set=ports-default

     

    3. The node didn't start properly. An error occured at the end. The boot.log file is attached bellow:

     

    Thanks

  • 8. JBoss AS 6 Clustering
    Wolf-Dieter Fink Master

    Looks like your network configuration is not correct.

    Try to start both JBoss without ip binding (bind to 0.0.0.0) and check whether it works.

     

    BTW, please attach the logfiles instead of posting it, it will make the thread unreadable (so edit you post and replace the boot.log output by attaching the file)

  • 9. Re: JBoss AS 6 Clustering
    Abdur Rahman Newbie

    1. On node1 I ran the following command:

    # ./run.sh -c all -g DocsPartition -u 239.255.100.100 -b 0.0.0.0 -Djboss.messaging.ServerPeerID=1 -Djboss.service.binding.set=ports-default

     

     

    2. On node2 I ran the following command:

    # ./run.sh -c all -g DocsPartition -u 239.255.100.100 -b 0.0.0.0 -Djboss.messaging.ServerPeerID=2 -Djboss.service.binding.set=ports-default

     

    3. The first node terminal displayed the messages:

     

    00:24:11,677 INFO  [org.hornetq.core.server.cluster.impl.BridgeImpl] Connecting bridge sf.my-cluster.188d26ef-224b-11e0-aaa5-001cc0db9fd2 to its destination

    00:24:12,085 INFO  [org.hornetq.core.server.cluster.impl.BridgeImpl] Bridge sf.my-cluster.188d26ef-224b-11e0-aaa5-001cc0db9fd2 is connected to its destinatio

     

    But still didn't see any further information regarding the nodes. I have attached the node1 and node2 files repectively.

     

    Thanks

  • 10. Re: JBoss AS 6 Clustering
    Abdur Rahman Newbie

    I opened the desired addresses and ports from the firewall and started the two instances. Some messages shown about the successful connection among the two nodes on the both terminals. Also saw the two nodes' information at the last two levels in the bellow hierarchy from the JBoss AS admin console:

     

    localhost.localdomain

    -JBossAS Servers

    --JBoss AS 6 (all)

    ---Infinispan Cache Managers

    ----ha-partition

    -----Infinispan Cache Managers

    ------distributed-state(repl_sync)

    ------distributed-tree(repl_sync)

     

    Is this verification enough to make sure that started nodes are parts of the same jboss cluster?

     

    Thanks

  • 11. Re: JBoss AS 6 Clustering
    Abdur Rahman Newbie

    Ok, I did it. Thanks to all. First we need to open the ports defined in the binding set. Then deploy the ejb within JBOSS_HOME\server\all\farm. The log file contians the information about the nodes.

  • 12. Re: JBoss AS 6 Clustering
    Wolf-Dieter Fink Master

    Hi Abdur,

    you should mark your threads as answered if you are satisfied to help others

  • 13. Re: JBoss AS 6 Clustering
    Abdur Rahman Newbie

    Hi Wolf-Dieter Fink, Actually I explored these older threads to change the status. But was unable to see someting like "Marke as Answered" on these orlder threads. Can you guide a little bit in this regard? Thanks.

  • 14. Re: JBoss AS 6 Clustering
    Wolf-Dieter Fink Master

    Your right,

    such old threads are opened without marked as 'question', in this case you can't mark it as answered.

    I've seen only the date (very similar to the last post) but not the year

1 2 Previous Next