You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by ra...@bt.com on 2007/02/02 15:28:24 UTC

[users@httpd] FW: Tomcat Clustring Problem- Session issue?

 
 
 Gents,

I have successfully installed Apache 2.2.3 in front of a couple of
Tomcat server using the mod_jk (1.2.20). I have configured the system to
perform round-robin load balancing based on sticky session principle.
The problem I have is that the Apache is trying to cross the same
session between the two tomcat servers and then through some errors.
With sticky session I was expecting that each session will be server by
one tomcat server and the session will not be duplicated across the
cluster and the load distributed on round-robin bases. I have looked at
the Tomcat Apache documents and it appears that the "jvmRoute" has been
depreciated and replaced by "route" since the release of mod_jk 1.2.20,
so I have replaced the jvmRoute with route on the server.xml
configuration files to reflect this change but the problem still there. 

It is important to note that the Apache is working fine if one of the
tomcat server shutdown (not load balancing) which suggest that there is
no problem with mounting the files (Jkmount).

I should be grateful if you could help or provide some hints.


Here is my server.xml files
For Tomcat 1 

I tried it with this line first

<Engine name="Standalone" defaultHost="localhost" jvmRoute="worker1"/>

Then replaced with:

<Engine name="Standalone" defaultHost="localhost" route="worker1"/>

For tomcat 2  

<Engine name="Standalone" defaultHost="localhost" jvmRoute="worker2/">
<Engine name="Standalone" defaultHost="localhost" route="worker2/">



Here is my workers.properties file

workers.tomcat_home=/export/home/tomcat/apache-tomca
workers.java_home=/export/home/tomcat/jre1.5.0_09
# The advanced router LB worker
#The workers that are member of load balancer do not need to appear in
the worker.list directive according to Apache Tomcat Doucementions.

worker.list=router (
# Define a worker using ajp13
worker.worker1.port=8009
# worker.worker1.host=node1.domain.org
worker.worker1.host=132.146.234.35
worker.worker1.type=ajp13
worker.worker1.lbfactor=1
# Define preferred failover node for worker1
###worker.worker1.redirect=worker2

# Define another worker using ajp13
worker.worker2.port=8009
# worker.worker2.host=node2.domain.org
worker.worker2.host=132.146.234.65
worker.worker2.type=ajp13
worker.worker2.lbfactor=1
# Disable worker2 for all requests except failover# ##

# Define the LB worker
worker.router.type=lb
worker.router.balance_workers=worker1,worker2
###worker.worker2.activation=disabled

Here is my httpd.conf

LoadModule jk_module modules/mod_jk.so
JkWorkersFile /usr/apche2/conf/workers.properties
JkLogFile /usr/apche2/logs/mod_jk.log
JkLogLevel debug
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
JkOptions +ForwardKeySize +ForwardURICompat -Forward JkRequestLogFormat
"%w %V %T"<!-- JkMount /gvp/*.* router






















---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org