Hello.


I' m working on a LB configuration with  Apache/2.4.18 (Ubuntu) mod_jk/1.2.41 
and not getting wanted results.


My workers config is:


worker.list=balanceFFG, jk-status
# tomcat-pro-03 por COLT
worker.FFG1.host=tomcat-pro-03
worker.FFG1.port=8009
worker.FFG1.type=ajp13
worker.FFG1.sticky_session=true

# tomcat-pro-06 por COLT
worker.FFG2.host=tomcat-pro-06
worker.FFG2.port=8010
worker.FFG2.type=ajp13
worker.FFG2.sticky_session=true

worker.balanceFFG.type=lb
worker.balanceFFG.balance_workers=FFG1, FFG2
worker.jk-status.type=status

VirtualHost config is:

  Header edit Set-Cookie "^(.*; Path=)/ffgonzalezarch_pro/?(.*)" $1/$2
  RewriteEngine on
  RewriteRule ^(.*)$ /ffgonzalezarch_pro$1 [PT,L]
  RewriteRule ^(.*)$ /ffgonzalezarch_pro/$1 [CO]

  JkMount /ffgonzalezarch_pro/* balanceFFG


jvmRoute set in Engine section in Tomcat server.xml

And finally, this is the result in mod_jk debug log:


[Sat Jun 30 06:52:29.565 2018] [6628:139806621300480] [debug] 
service::jk_lb_worker.c (1270): service sticky_session=1 
id='7E9778933D54A11F3D91B9AF81653C53.tomcat-pro-06'
[Sat Jun 30 06:52:29.565 2018] [6628:139806621300480] [debug] 
get_most_suitable_worker::jk_lb_worker.c (1078): searching worker for partial 
sessionid 7E9778933D54A11F3D91B9AF81653C53.tomcat-pro-06
 [Sat Jun 30 06:52:29.565 2018] [6628:139806621300480] [debug] 
get_most_suitable_worker::jk_lb_worker.c (1086): searching worker for session 
route tomcat-pro-06
[Sat Jun 30 06:52:29.565 2018] [6628:139806621300480] [debug] 
get_most_suitable_worker::jk_lb_worker.c (1136): found best worker FFG1 (FFG1) 
using method 'Request'

So, a session from FFG2(omcat-pro-06) ends in FFG1(tomcat-pro-03). Why!! 
Sessionid is telling you FFG2(omcat-pro-06)!!

Thanks for help!

Reply via email to