7.2. Install and Configure a Worker Node
7.2.1. Configure a Tomcat Worker Node Copy linkLink copied to clipboard!
Note
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 followingListenerelement 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" />
<Listener className="org.jboss.modcluster.container.catalina.standalone.ModClusterListener" advertise="true" stickySession="true" stickySessionForce="false" stickySessionRemove="true" />Copy to Clipboard Copied! Toggle word wrap Toggle overflow Give the Worker a Unique Identity
EditJBOSS_EWS_DIST/tomcat6/conf/server.xmland add ajvmRouteattribute and value to theEngineelement, as shown:<Engine name="Catalina" defaultHost="localhost" jvmRoute="worker01">
<Engine name="Catalina" defaultHost="localhost" jvmRoute="worker01">Copy to Clipboard Copied! Toggle word wrap Toggle overflow 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"
/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"Copy to Clipboard Copied! Toggle word wrap Toggle overflow 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!!!
[warning] mod_advertise: ServerAdvertise Address or Port not defined, Advertise disabled!!!Copy to Clipboard Copied! Toggle word wrap Toggle overflow 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-frequencyproperty. By default, the property accepts values in seconds*10. Example, value = 1 means 10 seconds.-Dorg.jboss.modcluster.container.catalina.status-frequency=6
-Dorg.jboss.modcluster.container.catalina.status-frequency=6Copy to Clipboard Copied! Toggle word wrap Toggle overflow 
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"'
Start-Process "$psHome\powershell.exe" -Verb Runas -ArgumentList '-command "NetSh Advfirewall set allprofiles state off"'Copy to Clipboard Copied! Toggle word wrap Toggle overflow  - 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"'
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"'Copy to Clipboard Copied! Toggle word wrap Toggle overflow  
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
firewall-cmd --permanent --zone=public --add-port=23364/udpCopy to Clipboard Copied! Toggle word wrap Toggle overflow Note
224.0.1.105:23364 is the default address and port for mod_cluster balancer advertising UDP multicast.