JBoss 7 domain expand (new server machine outside the controller)

This post is the continuation of JBoss installation domain.

On the basis of the previous article, we will expand the domain to a new server on another machine increasing service availabilities.

The new machine will be called clu02 (IP, it will connect to clu01 (Domain Controller (DC) IP and the final structure will be:

Steps to follow:

1- (clu01) create user (the name must match the name of the host, in this case host2):

[jboss@controller bin]$ ./add-user.sh
What type of user do you wish to add?
a) Management User (mgmt-users.properties)
b) Application User (application-users.properties)
(a): a
Enter the details of the new user to add.
Realm (ManagementRealm) :
Username : host2
Password :
Re-enter Password :
About to add user 'host2' for realm 'ManagementRealm'
Is this correct yes/no? yes
Added user 'host2' to file '/vol/jboss-as-7.1.1.Final/standalone/configuration/mgmt-users.properties'
Added user 'host2' to file '/vol/jboss-as-7.1.1.Final/domain/configuration/mgmt-users.properties'

User/password defined: host2/host2user

2- (clu01) Obtain password in encrypted version Base64 with the Base64Password:

[jboss@clu01 Base64EncryptPassword]$ ./Base64Password.sh host2user
Your  Clear Text Password is :     host2user
Base64 Encrypted Password is :     aG9zdDJ1c2Vy

3- (clu02) Edit the file:


Assigned to the host name (first lines), which is equal host2 assign the user created:

<host name="host2" xmlns="urn:jboss:domain:1.2">

We define password of host2 user:

<security-realm name="ManagementRealm">
<properties path="mgmt-users.properties" relative-to="jboss.domain.config.dir"/>
<!-- Replace this with either a base64 password of your own, or use a vault with a vault expression -->
<secret value="aG9zdDJ1c2Vy"/>

We define where is the domain controller:

<!-- <local/> -->
<!-- Alternative remote domain controller configuration with a host and port -->
<!-- <remote host="${jboss.domain.master.address}" port="${jboss.domain.master.port:9999}"/> -->
<remote host="" port="9999" security-realm="ManagementRealm"/>

Modify listener interfaces:

<interface name="management">
<inet-address value="${jboss.bind.address.management:}"/>
<interface name="public">
<inet-address value="${jboss.bind.address:}"/>
<interface name="unsecure">
<!-- Used for IIOP sockets in the standard configuration.
To secure JacORB you need to setup SSL -->
<inet-address value="${jboss.bind.address.unsecure:}"/>

We define the server:

<server name="node3" group="ha-server-group" auto-start="true">
<!-- server-two avoids port conflicts by incrementing the ports in
the default socket-group declared in the server-group -->
<socket-bindings port-offset="100"/>

4- (clu02) start server:


5- (clu01) in the log we should see something like:

[org.infinispan.remoting.transport.jgroups.JGroupsTransport] (Incoming-13,null) ISPN000094: Received new cluster view: [host1-controller:node1/web|3] [host1-controller:node1/web, host1-controller:node2/web, host2:node3/web]

Indicating that it has recognized the new server.

All applications that were deployed in the group should now be served by the new server, for example:

In this situation we can only put a balancer in front.

Leave a Reply