-
Language:
English
-
Language:
English
Red Hat Training
A Red Hat training course is available for Red Hat JBoss Web Server
7.2. Install and Configure a Worker Node
7.2.1. Configure a Tomcat Worker Node
Follow this procedure to install the JBoss HTTP Connector on a JBoss Enterprise Web Server node and configure it for non-clustered operation.
Note
The supplied instructions are valid for Tomcat version 6 and 7 and do not require any changes for either of these versions.
Prerequisites
The following is a list of prerequisites for this task:
- Install a supported JBoss Enterprise Web Server.
- Understand the Proxy Configuration parameters discussed in Appendix B: Java Properties Reference.
Procedure 7.1. Configure a Worker Node for Tomcat
Add a Listener to Tomcat
Add the followingListener
element beneath the other Listener elements inJBOSS_EWS_DIST/tomcat6/conf/server.xml
.<Listener className="org.jboss.modcluster.container.catalina.standalone.ModClusterListener" advertise="true" stickySession="true" stickySessionForce="false" stickySessionRemove="true" />
Give the Worker a Unique Identity
EditJBOSS_EWS_DIST/tomcat6/conf/server.xml
and add ajvmRoute
attribute and value to theEngine
element, as shown:<Engine name="Catalina" defaultHost="localhost" jvmRoute="worker01">
Optional Step: Configure Firewall for Proxy Server Advertisements
A proxy server using the JBoss HTTP Connector can advertise itself via UDP multicast. To receive these multicast messages, open port 23364 for UDP connections on the worker node's firewall.For Linux Users/sbin/iptables -A INPUT -m state --state NEW -m udp -p udp --dport 23364 -j ACCEPT -m comment -comment "receive mod_cluster proxy server advertisements"
If Automatic Proxy Discovery is not used, configure worker nodes with a static list of proxies. In this case you can safely ignore the following warning message:[warning] mod_advertise: ServerAdvertise Address or Port not defined, Advertise disabled!!!
Set STATUS MCMP Messages frequency
The tomcat worker nodes send status messages periodically to Apache HTTP Server balancer containing their current load status. The default frequency of these messages is 10 seconds. With many active worker nodes which are in hundreds, the STATUS MCMP Messages might increase the traffic congestion on Apache HTTP Server network.To set the MCMP message frequency, modify theorg.jboss.modcluster.container.catalina.status-frequency
property. By default, the property accepts values in seconds*10. Example, value = 1 means 10 seconds.-Dorg.jboss.modcluster.container.catalina.status-frequency=6
Apache HTTP server advertising is available via UDP multicast. This is not available by default on most systems. To enable server advertising, configure the firewall settings as follows to allow multicast UDP on the required ports:
Procedure 7.2. Configuring Firewall on Microsoft Windows using PowerShell
- Switch off firewall for debug purpose to determine whether the current network behavior is related to the firewall configuration.
Start-Process "$psHome\powershell.exe" -Verb Runas -ArgumentList '-command "NetSh Advfirewall set allprofiles state off"'
- Allow UDP connections on port 23364. For example:
Start-Process "$psHome\powershell.exe" -Verb Runas -ArgumentList '-command "NetSh Advfirewall firewall add rule name="UDP Port 23364" dir=in action=allow protocol=UDP localport=23364"' Start-Process "$psHome\powershell.exe" -Verb Runas -ArgumentList '-command "NetSh Advfirewall firewall add rule name="UDP Port 23364" dir=out action=allow protocol=UDP localport=23364"'
Procedure 7.3. Configure the Firewall on Red Hat Enterprise Linux 7 to Allow mod_cluster Advertising
- To allow mod_cluster advertising on Red Hat Enterprise Linux 7, you must enable the UDP port in the firewal as follows:
firewall-cmd --permanent --zone=public --add-port=23364/udp
Note
224.0.1.105:23364 is the default address and port for mod_cluster balancer advertising UDP multicast.