How to run a cluster of EPP 5 or JPP 6 instances with TCP only
Environment
- JBoss Enterprise Portal Platform (EPP)
- 5.1.x
- 5.2.x
- JBoss Portal Platform (JPP)
- 6.0.x
Issue
- We need to run our EPP 5 / JPP 6 cluster based on TCP only, instead of using UDP multicast. Please let us know which configuration changes are needed, as adding
-Djboss.default.jgroups.stack=tcp
to the startup options seems to be insufficient.
Resolution
Applying only the instructions from EAP for TCP based clustering is not sufficient for EPP/JPP. Please follow the steps as shown below:
General prerequisites:
- Follow the configuration steps listed in the Installation Guide of EPP 5 1 or JPP 6 2 to set up a cluster of EPP instances.
- Follow the general instructions on switching to TCP based clustering for EAP 5 3 or EAP 6 4.
Version specific instructions:
EPP 5.1.x
To use TCP based clustering with the EPP 5.1.x versions, it is required to apply a couple of manual changes to different configuration files. As this is a complex and error-prone change, we recommend to upgrade to EPP 5.2 to use TCP based clustering.
EPP 5.2 / JPP 6.0
Switching from UDP to TCP in EPP 5.2 or JPP 6.0 can be done by adding the following configuration parameter to the startup parameters:
-Dgatein.default.jgroups.stack=tcp
Optionally switch the default TCP channels from multicast UDP discovery to a hard-coded server list:
- In the
$EPP5_HOME/jboss-as/server/$CONFIG/deploy/gatein.ear/02portal.war/WEB-INF/classes/jgroups/gatein-tcp.xml
or$JPP6_HOME/gatein/gatein.ear/portal.war/WEB_INF/classes/jgroups/gatein-tcp.xml
config file comment out theMPING
protocol and uncommentTCPPING
. For example:
<!-- Alternative 1: multicast-based automatic discovery. -->
<!--
<MPING timeout="3000"
num_initial_members="3"
mcast_addr="${gatein.jgroups.tcp.mping_mcast_addr:235.15.15.15}"
mcast_port="${gatein.tcp.mping_mcast_port:46700}"
ip_ttl="${jgroups.udp.ip_ttl:2}"/>
-->
<!-- Alternative 2: non multicast-based replacement for MPING. Requires a static configuration
of *all* possible cluster members.
-->
<TCPPING timeout="3000"
initial_hosts="${gatein.jgroups.tcp.tcpping.initial_hosts:localhost[8600],localhost[8601]}"
port_range="1"
num_initial_members="3"/>
- Add the system property
gatein.jgroups.tcp.tcpping.initial_hosts
to the list of cluster members. For example:
-Dgatein.jgroups.tcp.tcpping.initial_hosts="hostA[8600],hostB[8600]"
-
EPP 5.2 Installation Guide - 6.9. Clustering Configuration
https://access.redhat.com/knowledge/docs/en-US/JBoss_Enterprise_Portal_Platform/5.2/html/Installation_Guide/Clustering_Configuration.html ↩︎ -
JPP 6 Installation Guide - 6.5. Clustering in JBoss Portal Platform
https://access.redhat.com/knowledge/docs/en-US/JBoss_Portal_Platform/6/html/Installation_Guide/Clustering_in_JBoss_Portal_Platform.html ↩︎ -
How do I switch clustering to TCP instead of multicast UDP in JBoss 5.x ?
https://access.redhat.com/site/solutions/21160 ↩︎ -
How do I switch clustering to TCP instead of multicast UDP in EAP 6.x?
https://access.redhat.com/knowledge/solutions/140103 ↩︎
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments