You have to use two connectors firstable, the first to shutdown the tomcat
(ajpv12) and the second ajpv13 and both in different ports, the fact you use
two ports doesnt mean that every port is for a host, it is to make some
balancing, you have to use JkMount in httpd.conf for every host but for only
one connector: for example:
<vitrualhost1>
JkMount /*.jsp ajp13://virtualhost1
</virtualhost1>
<virtualhost2>
JkMount /*.jsp ajp13://virtualhost2
</virtualhost2>
and in server.xml implement also the two connectors (ajp12 y 13) and the
virtualhost directive, that's it, I have done it many times with every new
version on Tomcat 3.a.b
Guido.
-----Original Message-----
From: Jerry Chen [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 21, 2001 3:37 PM
To: [EMAIL PROTECTED]
Subject: Load Balance problem
Hi , Folks
I've some question about the mod_jk load balance . I'hv 3 linux box right
now , the 1st is running apache 1.3.12 , others are running tomcat 3.2.1, I
try to config the tomcat load balance with those 2 tomcat box . But I found
all the request from the apache box is redirect to the first tomcat box that
I define in the works.properties(tomcat1) , if I just shutdown that tomcat
box , I got error 500 Internal Server error from Apache .
That seems the load balance doesn't work , please help me
Thanks alot
This is part of my httpd.conf
=====================================================
LoadModule jk_module libexec/mod_jk.so
JkWorkersFile /etc/httpd/conf/workers.properties
JkLogFile /var/log/httpd/mod_jk.log
JkLogLevel error
JkMount /*.jsp loadbalancer
======================================================
This is my works.properties
# The workers that your plugins should create and work with
#
worker.list=loadbalancer
#
#------ DEFAULT ajp12 WORKER DEFINITION ------------------------------
#---------------------------------------------------------------------
#------ DEFAULT ajp13 WORKER DEFINITION ------------------------------
#---------------------------------------------------------------------
#
#
# Defining a worker named ajp13 and of type ajp13
# Note that the name and the type do not have to match.
#
worker.tomcat1.port=8009
worker.tomcat1.host=tomsrv1
worker.tomcat1.type=ajp13
worker.tomcat1.lbfactor=1
worker.tomcat1.cachesize=10
worker.tomcat2.prot=8009
worker.tomcat2.host=tomsrv2
worker.tomcat2.type=ajp13
worker.tomcat2.lbfactor=1
worker.tomcat2.cachesize=10
#
#------ DEFAULT LOAD BALANCER WORKER DEFINITION ----------------------
#---------------------------------------------------------------------
#
#
# The loadbalancer (type lb) workers perform wighted round-robin
# load balancing with sticky sessions.
# Note:
# ----> If a worker dies, the load balancer will check its state
# once in a while. Until then all work is redirected to peer
# workers.
worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=tomcat1, tomcat2
#
--
To unsubscribe: <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>