JBoss AS7 cluster with mod_cluster setup howto

In this article, I would like to show you how to setup JBoss AS7 in domain mode and enable clustering so we could get HA and session replication among the nodes.

Preparation


We need to prepare three hosts (or virtual hosts) to do the experiment. We will use these three hosts as following:

Scenario


Here are some details on what we are going to do:

jboss-cluster

Download JBoss AS7

If everything ok we should see AS7 successfully startup in domain mode.

Now exit as7 and let us repeat the same steps on slave host. Finally we get AS7 run on both master and slave, then we could move on to next step.

Domain Configuration

Interface config on master


In this section we will setup both master and slave for them to run in domain mode. And we will configure master to be the domain controller.

Interface config on slave


Security Configuration

If you start as7 on both master and slave now, you will see the slave as7 cannot be started with following error:

[Host Controller] 20:31:24,575 ERROR [org.jboss.remoting.remote] (Remoting "endpoint" read-1) JBREM000200: Remote connection failed: javax.security.sasl.SaslException: Authentication failed: all available authentication mechanisms failed
[Host Controller] 20:31:24,579 WARN  [org.jboss.as.host.controller] (Controller Boot Thread) JBAS010900: Could not connect to remote domain controller 10.211.55.7:9999
[Host Controller] 20:31:24,582 ERROR [org.jboss.as.host.controller] (Controller Boot Thread) JBAS010901: Could not connect to master. Aborting. Error was: java.lang.IllegalStateException: JBAS010942: Unable to connect due to authentication failure.

Because we have not properly set up the authentication between master and slave. Now let us work on it:

Master


We will use this user for slave as7 host to connect to master. Notice that the username must be equal to the name given in the slaves host element. That mean for each additional host you need a user.

Slave


Dry Run


Cluster Configuration

http://www.jboss.org/mod_cluster/downloads

http://downloads.jboss.org/mod_cluster//1.2.0.Final/mod_cluster-1.2.0.Final-linux2-x64-ssl.tar.gz

Deployment

Testing

Refence docs

Cheers!

2220 Words 01 November 2012 Suzhou, China