Administer > HA Configuration > Configure the CSA node > Configure CSA on each CSA node > Configure the TCP communication channel on JGroups

Configure the TCP communication channel on JGroups

JBoss uses JGroups for communication between nodes in order to establish the cluster and manage membership of nodes in the cluster. By default, the JGroups subsystem on JBoss is configured to communicate through IP multicast messages using UDP. If the environment that you are using to set up the cluster does not support multicast messaging, the JGroups subsystem may alternatively be configured to use multiple TCP unicast messages.

To configure the TCP communication channel on JGroups, do the following:

  1. Open the CSA_HOME/jboss-as/standalone/configuration/standalone-full-ha.xml file in an editor.

  2. Update the jgroups subsystem default stack from udp to tcp. Change:

    <subsystem xmlns="urn:jboss:domain:jgroups:2.0" default-stack="udp">

    to

    <subsystem xmlns="urn:jboss:domain:jgroups:2.0" default-stack="tcp">

  3. Locate the TCP stack and do the following:

    1. Replace <protocol socket-binding="jgroups-mping" type="MPING"/> with:

      <protocol type="TCPPING">
         <property name="initial_hosts">[LIST_OF_INITIAL_HOSTS]</property>
            <property name="num_initial_members">[NUMBER_OF_INITIAL_HOSTS]</property>
            <property name="port_range">1</property>
            <property name="timeout">2000</property>
      </protocol>

      where:

      • [LIST_OF_INITIAL_HOSTS] is a comma-separated list of nodes (IP address and port) that define the cluster. It is recommended that you list all known nodes in the CSA controller cluster. Other nodes that are not listed may join the cluster and you may remove a node from the list at any time. However, at least one initial host (a node in the list of initial hosts) must be running in order for other nodes (that are not included in this list) to join the cluster. The more initial hosts listed means that there is a greater chance an initial host is running so that an unlisted node may join the cluster (if no initial hosts are running, no unlisted nodes may join the cluster). Once the cluster is running, if you update the list of initial hosts, all nodes in the cluster must be restarted. The following are examples of a list of three initial hosts: [CSA_NODE1_IP_ADDR][7600],[CSA_NODE2_IP_ADDR][7600],[CSA_NODE3_IP_ADDR][7600] or 111.222.333.444[7600],111.222.333.445[7600],111.222.333.446[7600]

      • [NUMBER_OF_INITIAL_HOSTS] is the number of initial hosts specified in the cluster.

      For example:

      <protocol type="TCPPING">
         <property name="initial_hosts">111.222.333.444[7600],111.222.333.445[7600],
      111.222.333.446[7600]
      </property>
            <property name="num_initial_members">3</property>
            <property name="port_range">1</property>
            <property name="timeout">2000</property>
      </protocol>

      A TCP-based channel may be less efficient than its UDP counterpart as the size of the cluster increases beyond four to six nodes.

    2. Under <protocol type="pbcast.NAKACK2"/> ---<Stack_name="tcp"> add:

      <protocol type="pbcast.NAKACK2">
      <property name="use_mcast_xmit">false</property>
      <property name="use_mcast_xmit_req">false</property>
      </protocol>
  4. Add the node's IP address to the public interface. Locate:

    <interface name="public">

    and add the IP address [CSA_NODE1_IP_ADDR]. For example:

    <interface name="public">
       <inet-address value="${jboss.bind.address:<CSA_Node_ip_Address>}"/>
    </interface>

  5. Reconfigure the CSA service as follows:

    Windows:

    In the \CSA_HOME\bin\service.bat file:

    1. Locate the two occurrences of standalone.bat.

    2. Replace call standalone.bat > .r.lock >> run.log 2>&1

      with

      call standalone.bat -c standalone-full-ha.xml > .r.lock >> run.log 2>&1

      Note You do not need to specify the -u [MULTICAST_ADDRESS] option.

    Linux:

    In the CSA_HOME/scripts/csa_env.conf file:

    1. Locate the Toggle below two lines to run CSA in HA mode comment.
    2. Comment out export CSA_DEPLOY_MODE=standalone.sh # Standalone Mode.
    3. Add export CSA_DEPLOY_MODE="standalone.sh -c standalone-full-ha.xml" # HA Mode.

      Note You do not need to specify the -u [MULTICAST_ADDRESS] option.