Hi Gabriel,

I think that the usage of jvmRoute wasn't build into tomcat right from the 
beginning of tc 4.x. Try to use tomcat 4.0.3.

When this doesn't work you could check out jakarta-tomcat-connectors from cvs 
and build the utils and jk part. jk2 is under development, but you may check 
this one too. After building this you get the newest mod_jk / mod_jk2 with lb 
and sticky sessions.

Bernd

Gabriel Maffia wrote:
> Hello all:
> 
> I�ve been struggling with this issue for quite a long time now, and I can�t seem to 
>find a solution.
> 
> I�m actually using this configuration:
> 
> Apache 1.3.23
> Tomcat 4.0.1
> Jboss 4.2.3
> 
> 
> I�ve used mod_jk and the loadbalancer connector to connect my web server with two 
>other tomcat servers. Both of the tomcat servers connect to the Jboss server.
> 
> The problem is that sessions are not mantained. Apache keeps sending me randomly to 
>one tomcat server or the other instead of choosing one. That makes me lose my session 
>id and get errors in my application.
> 
> 
> Regarding to the tomcat servers configuration, I have my jvmroute statement set 
>right (I think):
> 
> in server 1:
> 
>     <Engine jvmRoute="tomcat1" name="Standalone" defaultHost="foo.bar.com" debug="1">
> 
> in server 2:
> 
> 
>     <Engine jvmRoute="tomcat2" name="Standalone" defaulttHost="foo2.bar.com" 
>debug="1">
> 
> 
> 
> the workers.properties file has this configuration:
> 
> # list the workers by name
> 
> worker.list=tomcat1, tomcat2, loadbalancer
> 
> # ------------------------
> # First tomcat server
> # ------------------------
> worker.tomcat1.port=8009
> worker.tomcat1.host=foo.bar.com
> worker.tomcat1.type=ajp13#
> 
> # Specifies the load balance factor when used with
> # a load balancing worker.
> # Note:
> #  ----> lbfactor must be > 0
> #  ----> Low lbfactor means less work done by the worker.
> worker.tomcat1.lbfactor=50
> 
> # ------------------------
> # Second tomcat server
> # ------------------------
> worker.tomcat2.port=8009
> worker.tomcat2.host=foo2.bar.com
> worker.tomcat2.type=ajp13
> 
> # Specify the size of the open connection cache.
> #worker.tomcat2.cachesize
> 
> #
> # Specifies the load balance factor when used with
> # a load balancing worker.
> # Note:
> #  ----> lbfactor must be > 0
> #  ----> Low lbfactor means less work done by the worker.
> worker.tomcat2.lbfactor=50
> 
> # ------------------------
> # Load Balancer worker
> # ------------------------
> 
> #
> # The loadbalancer (type lb) worker performs weighted 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
> #        worker.
> worker.loadbalancer.type=lb
> worker.loadbalancer.balanced_workers=tomcat1, tomcat2
> 
> #
> # END workers.properties
> #
> 
> Maybe I set the lbfactor wrong? Wich numbers should I use?
> 
> Thanks a lot for all your help so far.
>  
> 
> Gabriel
> 
> PS: Here is a little graph of the distribution of the servers
> 
> 
> *************************                            ***********************
> *Apache web server  *                            * Tomcat2 server   *
> *Tomcat1 server       *----------------------------*  Jboss 2.4.3       *
> *foo.bar.com            *                            * foo2.bar.com      *
> *************************                            ***********************
> 



-- 
Dipl.-Inform. Bernd Koecke
UNIX-Entwicklung
Schlund+Partner AG
Fon: +49-721-91374-0
E-Mail: [EMAIL PROTECTED]


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to