FAS relies on multicast to discover the elements that are in a multi-box cluster, but some deployment environments (such as Amazon AWS) do not support multicast. The following instructions show how you can configure a multi-box FAS installation to work in an environment that does not allow multicast.
Note: We recommend that multicast should be used in deployment if possible. This procedure should only be used if multicast is not an option.
You need to configure the JGroups subsystem on the master FAS node to use TCP Ping instead of UDP multicast, so that FAS uses TCP sockets to discover the other nodes. You must set the JGroups default-stack to TCP, and add TCPPING to the TCP stack configuration; the TCPPING configuration contains a list of the FAS components. You need to do this for ha, management, and lb profiles.
Note: The IP addresses and other properties in the TCPPING configurations given here are examples only; see the JGroups documentation for TCPPING for further details.
Before Changing the Configuration
-
Make a backup copy of the
<install dir>/domain/configuration/domain.xml
file -
Stop all FAS cluster nodes.
Find the Configured TCP Ports
-
Open domain.xml in a text editor, and search for the
<socket-binding-groups>
element. -
The configuration to note is the following:
<socket-binding-groups>
<socket-binding-group name="ha-sockets" default-interface="public">
...
<socket-binding name="jgroups-tcp" port="7600" />
...
</socket-binding-group>
<socket-binding-group name="lb-sockets" default-interface="public">
...
<socket-binding name="jgroups-tcp" port="7580" />
...
</socket-binding-group>
</socket-binding-groups>
-
Note the port numbers used by jgroups-tcp socket binding in both the ha-sockets and lb-sockets socket binding groups. ha-sockets maps to the ha profile, and lb-sockets to the lb profile. In the above example, the port numbers are:
-
ha-sockets - 7600
-
lb-sockets - 7580
-
Configuring the HA Profile
- Search domain.xml for the element:
<profile name="ha">
- Within the
<profile>
element find the element:
<subsystem xmlns="urn:jboss:domain:jgroups:1.1" default-stack="tcp">
You can find this line by searching for node-type="AS", and finding the <subsystem>
element which contains the <stack>
element which contains the <transport>
element which has this attribute. Note that you will find two such stacks - one for UDP and one for TCP; ensure you are working with the correct stack (the one which has the default-stack attribute is set to tcp as above).
-
Inside the
<subsystem>
element, find the<stack name="tcp">
element. -
We want to use TCPPING, rather than MPING, so remove the MPING configuration line:
<protocol type="MPING" socket-binding="jgroups-mping"/>
from the <stack>
element.
- Add the TCPPING configuration to the
<stack>
element:
<protocol type="TCPPING">
<property name="initial\_hosts">
192.168.0.1[7600],192.168.0.1[7580],192.168.0.2[7600],192.168.0.2[7580]
</property>
<property name="num\_initial\_members">1</property>
<property name="port\_range">3</property>
<property name="timeout">2000</property>
</protocol>
where the initial_hosts property is a comma-separated list of the IP addresses and port numbers of all the nodes in the cluster (including the master node) which need to be pinged (if both an LB and an AS are present on a cluster node, both will need to be pinged on the port numbers discovered in the Find the Configured TCP Ports section in this article). The num_initial_members property is the number of responses to wait for; see the JGroups documentation for TCPPING for further details.
The above example represents a two-box cluster where each box runs both an LB and an AS. TCP pings are sent to 192.168.0.1 and 192.168.0.2 on all the ports within the port_range, starting at 7600 (looking for the AS) and 7580 (looking for the LB).
Configuring the LB Profile
This procedure is essentially similar to configuring the ha profile.
- Search domain.xml for the element:
<profile name="lb">
- Within the
<profile>
element find the element:
<subsystem xmlns="urn:jboss:domain:jgroups:1.1" default-stack="tcp">
You can find this line by searching for node-type="LB", and finding the <subsystem>
element which contains the <stack>
element which contains the <transport>
element which has this attribute. Note that you will find two such stacks - one for UDP and one for TCP; ensure you are working with the correct stack (the one which has the default-stack attribute is set to tcp as above).
-
Inside the
<subsystem>
element, find the<stack name="tcp">
element. -
We want to use TCPPING, rather than MPING, so remove the MPING configuration line:
<protocol type="MPING" socket-binding="jgroups-mping"/>
from the <stack>
element.
- Add the TCPPING configuration to the
<stack>
element; e.g.:
<protocol type="TCPPING">
<property name="initial\_hosts">
192.168.0.1[7600],192.168.0.1[7580],192.168.0.2[7600],192.168.0.2[7580]
</property>
<property name="num\_initial\_members">1</property>
<property name="port\_range">3</property>
<property name="timeout">2000</property>
</protocol>
where the initial_hosts property is a comma-separated list of the IP addresses and port numbers of all the nodes in the cluster (including the master node) which need to be pinged (if both an LB and an AS are present on a cluster node, both will need to be pinged on the port numbers discovered in the Find the Configured TCP Ports section in this article). The num_initial_members property is the number of responses to wait for; see the JGroups documentation for TCPPING for further details.
The above example represents a two-box cluster where each box runs both an LB and an AS. TCP pings are sent to 192.168.0.1 and 192.168.0.2 on all the ports within the port_range, starting at 7600 (looking for the AS) and 7580 (looking for the LB).
Configuring the Management Profile
This procedure is essentially similar to configuring the ha and lb profiles.
- Search domain.xml for the element:
<profile name="management">
- Within the
<profile>
element find the element:
<subsystem xmlns="urn:jboss:domain:jgroups:1.1" default-stack="tcp">
You can find this line by searching for node-type="MGMT", and finding the <subsystem>
element which contains the <stack>
element which contains the <transport>
element which has this attribute. Note that you will find two such stacks - one for UDP and one for TCP; ensure you are working with the correct stack (the one which has the default-stack attribute is set to tcp as above).
-
Inside the
<subsystem>
element, find the<stack name="tcp">
element. -
We want to use TCPPING, rather than MPING, so remove the MPING configuration line:
<protocol type="MPING" socket-binding="jgroups-mping"/>
from the <stack>
element.
- Add the TCPPING configuration to the
<stack>
element; e.g.:
<protocol type="TCPPING">
<property name="initial\_hosts">
192.168.0.1[7600],192.168.0.1[7580],192.168.0.2[7600],192.168.0.2[7580]
</property>
<property name="num\_initial\_members">1</property>
<property name="port\_range">3</property>
<property name="timeout">2000</property>
</protocol>
where the initial_hosts property is a comma-separated list of the IP addresses and port numbers of all the nodes in the cluster (including the master node) which need to be pinged (if both an LB and an AS are present on a cluster node, both will need to be pinged on the port numbers discovered in the Find the Configured TCP Ports section in this article). The num_initial_members property is the number of responses to wait for; see the JGroups documentation for TCPPING for further details.
The above example represents a two-box cluster where each box runs both an LB and an AS. TCP pings are sent to 192.168.0.1 and 192.168.0.2 on all the ports within the port_range, starting at 7600 (looking for the AS) and 7580 (looking for the LB).
After Changing the Configuration
- Copy the edited domain.xml file to the
<install dir>/domain/configuration
directory on each of the other FAS nodes in the cluster.
This is safe - domain.xml contains no host-specific configuration
- Restart the FAS nodes (see the Managing Cluster Components article).
Comments
0 comments
Please sign in to leave a comment.