Hurry! 20% Off Ends SoonRegister Now

JBoss SetUp - Cluster Of Domain Servers

When you are configuring a domain server, you will find that the clustering subsystem is already part of the main configuration file, domain.xml.

As a matter of fact, the AS7 domain deals with clustering just as a different profile used by the application server. Opening the domain.xml file, you will see that the application server ships with two profiles:

  • The default profile, which can be used for non-clustered environments
  • The ha profile for clustered environments
Inclined to build a profession as JBOSS Developer? Then here is the blog post on JBOSS Training Online.

So, in order to use clustering on a domain, you have at first to configure your server groups to point to the ha profile.

As highlighted, in the socket-binding-group element, we are referencing the hasockets group, which contains all socket bindings used for a cluster: Your last effort will be defining the servers that are part of the domain (and of the cluster). To ease our work, we will reuse the same domain server list that is contained in the distribution.

AS7 cluster of standalone nodes

For each server, you have to refer, within your host.xml, to the socket binding group named ha-sockets, which we have just shown:Your clustered domain is ready for running. Launch your domain of servers using the standard batch script (domain.bat/domain.sh) and the server groups will now point to the ha profile and form a cluster of two nodes.

Frequently asked Jboss Interview Questions

Troubleshooting clustering

The clustering communication is carried out, by default, using UDP and multicasts information around the cluster. If there are problems, typically it is because of one of the following reasons:

  • The nodes are behind a firewall. If your nodes are on different machines then it is possible that the firewall is blocking the multicasts. you can test this by disabling the firewall for each node or adding the appropriate rules.
  • You are using a home network or are behind a gateway. Typically home networks will redirect any UDP traffic to the Internet Service Provider, which is then either dropped by the ISP or just lost. To fix this, you will need to add a route to the firewall/gateway that will redirect any multicast traffic back on to the local network instead.

MindMajix Youtube Channel

Actually JGroups ships with two test programs that can be used to test multicast communication: McastReceiverTest and McastSenderTest. Start McastReceiverTest, for example:
java –classpath jgroups-3.0.0.Final.jar
org.jgroups.tests.McastReceiverTest -mcast_addr 224.10.10.10 -port
5555

Then, start McastSenderTest :

java –classpath jgroups-3.0.0.Final.jar
org.jgroups.tests.McastSenderTest -mcast_addr 224.10.10.10 -port 5555

Note

The jgroups-3.0.0.Final.jar can be located in the JBOSS_HOME/modules/org/jgroups/main path of your server distribution

If multicast works correctly, you should be able to type in the McastSenderTest window and see the output in the McastReceiverTest as shown in the following screenshot:

If multicast works correctly, you should be able to type in the McastSenderTest window and see the output in the McastReceiverTest as shown in the following screenshot:

cmd prompt

Finally, if you are experiencing troubles with the default multicast address or port, you can change it at any time digging into the jgroups-udp socket binding:

Explore Jboss Sample Resumes! Download & Edit, Get Noticed by Top Employers!Download Now!

Job Support Program

Online Work Support for your on-job roles.

jobservice

Our work-support plans provide precise options as per your project tasks. Whether you are a newbie or an experienced professional seeking assistance in completing project tasks, we are here with the following plans to meet your custom needs:

  • Pay Per Hour
  • Pay Per Week
  • Monthly
Learn MoreGet Job Support
Course Schedule
NameDates
JBoss TrainingDec 24 to Jan 08View Details
JBoss TrainingDec 28 to Jan 12View Details
JBoss TrainingDec 31 to Jan 15View Details
JBoss TrainingJan 04 to Jan 19View Details
Last updated: 28 Sep 2024
About Author

Ravindra Savaram is a Technical Lead at Mindmajix.com. His passion lies in writing articles on the most popular IT platforms including Machine learning, DevOps, Data Science, Artificial Intelligence, RPA, Deep Learning, and so on. You can stay up to date on all these technologies by following him on LinkedIn and Twitter.

read less