Jul 122011

Make Sure all below given settings  are available in Apache configurations:

Apache WebServer Configurations Required:
Make Sure all below configurations are present in files present at <APACHE_HOME>/conf directory.
If not present then add them.

1. httpd.conf:
# Include mod_jk's specific configuration file
Include conf/mod-jk.conf

2. mod-jk.conf:
# Load mod_jk module
# Specify the filename of the mod_jk lib
LoadModule jk_module modules/mod_jk.so
# Where to find workers.properties
JkWorkersFile conf/workers.properties
# Where to put jk logs
JkLogFile logs/mod_jk.log
# Set the jk log level [debug/error/info]
JkLogLevel info
# Select the log format
JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"
# JkOptions indicates to send SSK KEY SIZE
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
# JkRequestLogFormat
JkRequestLogFormat "%w %V %T"
# Mount your applications
JkMount /myapp/* loadbalancer
JkMount /jspellhtml2k4/* loadbalancer
JkMount /jspelliframe2k4/* loadbalancer
JkMount /jspellhtml2k4 loadbalancer
JkMount /jspelliframe2k4 loadbalancer

# You can use external file for mount points.
# It will be checked for updates each 60 seconds.
# The format of the file is: /url=worker
# /examples/*=loadbalancer
JkMountFile conf/uriworkermap.properties

# Add shared memory.
# This directive is present with 1.2.10 and
# later versions of mod_jk, and is needed for
# for load balancing to work properly
# Note: Replaced JkShmFile logs/jk.shm due to SELinux issues. Refer to
# https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=225452
JkShmFile run/jk.shm

# Add jkstatus for managing runtime data
<Location /jkstatus>
JkMount status
Order deny,allow
Deny from all
Allow from

2. uriworkermap.properties
# Simple worker configuration file
# Mount the Servlet context to the ajp13 worker

3. workers.properties
# The configuration directives are valid
# for the mod_jk version 1.2.18 and later

# Define Node1
# modify the host as your host IP or DNS name.

# Define Node2
# modify the host as your host IP or DNS name.

# Load-balancing behaviour

# Status worker for managing load balancer

2.    Make Sure all below given settings are available in JBoss configurations in all nodes of  Jboss cluster.

JBoss Server Side Configuration Changes:

1. Remove/comment out below two ports from jacorb.properties file.
vi /opt/jboss/jboss-eap-4.3.0.GA_CP06/jboss-as/server/template_cluster/conf/jacorb.properties
Search for below two lines
Commentout both lines like below and save the file.

2. Add jvmRoute
vi /opt/jboss/jboss-eap-4.3.0.GA_CP06/jboss-as/server/template_cluster/deploy/jboss-web.deployer/server.xml

Search For Below Text:
<Engine name="jboss.web" defaultHost="localhost">
Change it to:
<Engine name="jboss.web" defaultHost="localhost" jvmRoute="node1">

Note: This configuration needs to be done in all the nodes and all the configuration files need to be changed accordingly.
Check the workers.properties file to know which host is node1 or nodex
Example: For node2 the jvmRoute will be node2(HostName can be found out from workers.properties file)
<Engine name="jboss.web" defaultHost="localhost" jvmRoute="node2">

3. Change UseJK to true
vi /opt/jboss/jboss-eap-4.3.0.GA_CP06/jboss-as/server/template_cluster/deploy/jboss-web.deployer/META-INF/jboss-service.xml

Search For Below Text:
<attribute name="UseJK">false</attribute>
Change it to:
<attribute name="UseJK">true</attribute>

Note: This configuration needs to be done in all the nodes and all the configuration files need to be changed accordingly.

4. Make Sure Below properties are present in jboss-service.xml config file.
vi /opt/jboss/jboss-eap-4.3.0.GA_CP06/jboss-as/server/template_cluster/deploy/jboss-web-cluster.sar/META-INF/jboss-service.xml

<mbean code="org.jboss.cache.aop.TreeCacheAop" name="jboss.cache:service=TomcatClusteringCache">
<attribute name="TransactionManagerLookupClass">org.jboss.cache.BatchModeTransactionManagerLookup</attribute>
<attribute name="IsolationLevel">REPEATABLE_READ</attribute>
<attribute name="CacheMode">REPL_ASYNC</attribute>
<attribute name="ClusterName">Tomcat-${jboss.partition.name:Cluster}</attribute>
<attribute name="UseMarshalling">false</attribute>
<attribute name="InactiveOnStartup">false</attribute>
<attribute name="ClusterConfig">
... ...
<attribute name="LockAcquisitionTimeout">15000</attribute>

© Incase of any copyright infringements please check copyrights page for faster resolutions.

Leave a Reply

Show Buttons
Hide Buttons