Bill_Patton

Migrate JBoss 6.1 Cluster types Multicast to Unicast and journal files to shared repository

Blog Post created by Bill_Patton Employee on Aug 1, 2015

I still need to clean up  the formatting of this post.

 

1: Uprading a JBoss 6.1 Cluster from 12.6.2

This section contains the following topics:

Migrate a Multicast JBoss 6.1 Cluster
to Unicast (see page 5)

Migrate Journal Files on a Shared
Store to Replication (see page 7)

Migrate
a Multicast JBoss 6.1 Cluster to Unicast

If you have an installation of CA IdentityMinder on JBoss
6.1 EAP, you can change the use of multicast communication to unicast.

Using this procedure, you configure HornetQ to use a
JGroups channel for broadcast and discovery groups. This configuration allows
two nodes to form a cluster and send JMS messages to each other. Only one
HornetQ instance per node may bind to a JGroups channel. For example, in a cluster  of Live and Backup HornetQ instances running
in each node, configure 3 JGroups channels.

■      A live channel configured in all Live HornetQ
instances.

■      A node1_live_to_node2_backup channel configured
in the node1 Live HornetQ and node2 Backup HornetQ.

■      A node2_live_to_node1_backup channel configured
in the node2 Live HornetQ and node2 Backup HornetQ.

Therefore, in a cluster of N nodes, you configure the live
channel and N live->backup channels .

Follow these steps:

1. Upgrade the CA IdentityMinder server to 12.6.3 on all systems where it is installed.

The Upgrade Wizard starts.

a. Click Launch Upgrade from the Upgrade Wizard.

b. Select the Full Upgrade option.

c. Respond to the prompts that appear.

Repeat these steps on the other systems where CA
IdentityMinder was installed.


The installation is upgraded.

2.      On
the first node, navigate to the following location:

jboss_home/standalone/configuration

3.      Edit
the standalone.bat or standalone.sh file.

4.      Locate
the <hornetq-server> section of the file.

5.      Find
the line that contains the following text:

-u %MULTI_CAST_ADDRESS%

6.      Replace
this text with the following text:

-Djgroups.tcpping.initial_hosts=%JGROUPS_INITIAL_HOSTS%

7.      Add
a definition for JGROUPS_INITIAL_HOSTS in the variables section. For example:

set "JGROUPS_INITIAL_HOSTS=10.1.1.1[7600],10.1.1.2[7600]"

This preceding line is a list of IP addresses for each
node in the cluster that is associated with a port. The default port is 7600,
but you can have multiple nodes on the same system using different ports.

8.      Navigate
to the following location:

jboss_home/standalone/configuration

9.      Edit
the standalone-full-ha.xml file.

a.      Locate
the jgroups subsystem

b.      Set
the default-stack to TCP as follows:

default-stack="tcp"

c.       Edit
the tcp stack by replacing the MPING protocol with the following protocol:

<protocol type="TCPPING">
<property
name="initial_hosts">${jgroups.tcpping.initial_hosts}</property>
<property
name="num_initial_members">2</property>
<property
name="port_range">1</property>
<property
name="timeout">2000</property>
</protocol>

num_initial_members

is the number of nodes before the cluster is
complete.

port_range

specifies the range of ports to ping on each host
in the initial_hosts list.

10.   Locate
the live HornetQ server instance under the messaging subsystem:


This server has no name attribute. However, the backup
server has a name="backup" attribute. For the broadcast-group and
discovery-group, locate this text:


<socket-binding>messaging-group</socket-binding>

 


11.   Replace
the preceding text with the following text:


<jgroups-stack>tcp</jgroups-stack>
<jgroups-channel>live</jgroups-channel>

 


12.   Locate
the backup server occurrence of the following text:


<socket-binding>messaging-group</socket-binding>


13.   Replace
the preceding text with the following text:


<jgroups-stack>tcp</jgroups-stack>
<jgroups-channel>node2_live_to_node1_backup</jgroups-channel>

 


14.   In
the live HornetQ modified in step c, add a second broadcast-group and
discovery-group.


<broadcast-group name="bg-group2">

<jgroups-stack>tcp</jgroups-stack>
  <jgroups-channel>node1_live_to_node2_backup</jgroups-channel>


<broadcast-period>5000</broadcast-period>
  <connector-ref>

     netty
  </connector-ref>

</broadcast-group>

 

 


<discovery-group name="dg-group2">

<jgroups-stack>tcp</jgroups-stack>
  <jgroups-channel>node1_live_to_node2_backup</jgroups-channel>


<refresh-timeout>10000</refresh-timeout>
</discovery-group>

15.   Repeat
the above steps for the second node replacing node1 with node2
and node2 with node1.


16.   If
you have 3 or more nodes, follow a similar procedure to link the nodes.

 


Migrate
Journal Files on a Shared Store to Replication


If you have an installation of CA IdentityMinder 12.6.3 on
JBoss 6.1 EAP, you can change the use a shared store for journal files to use
replication. This change eliminates the need for a Storage Area Network (SAN)
server.


Follow these steps:


1.      On
the first node, navigate to the following location:


jboss_home/standalone/configuration

 


2.      Edit
the standalone-full-ha.xml file.


3.      Locate
the <hornetq-server> section of the file.

 


4.      In
both the Live and Backup HornetQ instances, replace
<shared-store>true</shared-store> with
<shared-store>false</shared-store>.

 


5.      In
the Live HornetQ instance, edit the following section which appears immediately
after the <shared-store> element. Switch this element from a shared store
to replication.


<backup-group-name>node1</backup-group-name>


<check-for-live-server>true</check-for-live-server>


<paging-directory
path="live-hornetq/paging"/>


<bindings-directory
path="live-hornetq/bindings"/>


<journal-directory path="live-hornetq/journal"/>


<large-messages-directory
path="live-hornetq/large-messages"/>

 


6.      In
the backup HornetQ Instance, edit this section to switch this element from a
shared store to replication:


<backup-group-name>node2</backup-group-name>


<paging-directory
path="backup-hornetq/paging"/>


<bindings-directory
path="backup-hornetq/bindings"/>


<journal-directory
path="backup-hornetq/journal"/>


<large-messages-directory
path="backup-hornetq/large-messages"/>


7.      Repeat
for second node replacing node1 with node2 and node2 with
node1.

Outcomes