tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henk Fictorie <henk.ficto...@kpn.com>
Subject RE: JK 1.2.20 - Sticky session doesn't work properly
Date Wed, 10 Jan 2007 16:49:44 GMT

mod_jk tries to find the best worker as you said for:

* searching worker for session route jmv_web1 

Thus the jvmRoute is set to jmv_web1, there is no match for jmv_web1 in the
workers.properties. So it gets a best worker by using the loadbalancing
algorithm. Which will result in a roundrobin assignment to jvm_web1 and
jvm_web2.

In the tomcat server.xml the jvmRoute is set to jvm_web1 and jvm_web2. 
But tomcat sets the sessionid route to jmv_web1. I guess you have made a
typo somewhere in the server.xml

Henk


Matteo Turra wrote:
> 
> I did not. Here is my workers definition:
> 
> JkWorkerProperty worker.list=wlb, jvm_web1, jvm_web2
> 
> JkWorkerProperty worker.wlb.type=lb
> JkWorkerProperty worker.wlb.balance_workers=jvm_web1, jvm_web2
> JkWorkerProperty worker.wlb.sticky_session=True
> 
> JkWorkerProperty worker.jvm_web1.type=ajp13
> JkWorkerProperty worker.jvm_web1.host=10.100.1.122
> JkWorkerProperty worker.jvm_web1.port=10003
> JkWorkerProperty worker.jvm_web1.socket_timeout=3 #in sec
> JkWorkerProperty worker.jvm_web1.recycle_timeout=300 
> JkWorkerProperty worker.jvm_web1.reply_timeout=90000 
> 
> JkWorkerProperty worker.jvm_web2.type=ajp13
> JkWorkerProperty worker.jvm_web2.host=10.100.1.123
> JkWorkerProperty worker.jvm_web2.port=10003
> JkWorkerProperty worker.jvm_web2.socket_timeout=3 #in sec
> JkWorkerProperty worker.jvm_web2.recycle_timeout=300 
> JkWorkerProperty worker.jvm_web2.reply_timeout=90000
> 
> web1 IP address is 10.100.1.122
> web2 IP address is 10.100.1.123
> 
> on my server.xml files I have: 
> * jvmRoute="jvm_web1" on web1 
> * jvmRoute="jvm_web2" on web2
> 
> In mod_jk.log I found:
> 
> * searching worker for session route jmv_web1 
> * get_most_suitable_worker::jk_lb_worker.c (785): found best worker
> jvm_web2 (jvm_web2) using  method 'Request'
> 
> It seams the ruote is properly stetted by tomcat, but the loadbalancer
> choose the wrong worker.
>  
> Matteo
> 
> -----Original Message-----
> From: Henk Fictorie [mailto:henk.fictorie@kpn.com] 
> Sent: mercoledì 10 gennaio 2007 16.10
> To: users@tomcat.apache.org
> Subject: Re: JK 1.2.20 - Sticky session doesn't work properly
> 
> 
> The session cookie is set to .....jmv_web1 while your worker is set to
> jvm_web2. I guess you've go jmv and jvm mixed up.
> 
> Henk
> 
> 
> Matteo Turra wrote:
>> 
>> I upgraded my apache+jk+tomcat configuration with new JK connector
>> 1.2.20
>> 
>>  
>> 
>> My system is one Apache http server and two tomcat running on two
>> different machines (say web1 and web2)
>> 
>>  
>> 
>> I put sticky session in my load balancer worker (I can see it from Jk
>> Status Manager page) but request jump between the two tomcat.
>> 
>>  
>> 
>> I check jvmRoute in server.xml in both tomcat instance and they
>> correspond to the workers names.
>> 
>>  
>> 
>> I changed the jk loglevel to debug and I see the following messages:
>> 
>>  
>> 
>> init_ws_service::mod_jk.c (584): Service protocol=HTTP/1.1 method=GET
>> host=(null) addr=10.0.0.11 name=pippo port=80 auth=(null) user=(null)
>> laddr=10.0.0.11 raddr=10.0.0.11 
>> 
>> service::jk_lb_worker.c (840): service sticky_session=1
>> id='0D8CB99EBC3F747DA5B66183C67C8BF6.jmv_web1'
>> 
>> get_most_suitable_worker::jk_lb_worker.c (733): searching worker for
>> partial sessionid 0D8CB99EBC3F747DA5B66183C67C8BF6.jmv_web1
>> 
>> get_most_suitable_worker::jk_lb_worker.c (741): searching worker for
>> session route jmv_web1 
>> 
>> get_most_suitable_worker::jk_lb_worker.c (785): found best worker
>> jvm_web2 (jvm_web2) using  method 'Request'
>> 
>> service::jk_lb_worker.c (860): service worker=jvm_web2 route=jvm_web2 
>> 
>> ajp_get_endpoint::jk_ajp_common.c (2315): acquired connection pool
>> slot=0 
>> 
>> ajp_marshal_into_msgb::jk_ajp_common.c (548): ajp marshaling done 
>> 
>> ajp_service::jk_ajp_common.c (1771): processing jvm_web2 with 2 retries
>> 
>>  
>> 
>> Does anybody knows why?
>> 
>> __________________________________________________________ 
>> 
>>   
>> 
>>  KION SpA                        Matteo TURRA
>> 
>>  Via Cristoni, 84                Sviluppo Web
>> 
>>  40033 Casalecchio di Reno (BO) 
>> 
>>  Tel. +39 (051) 6111411          diretto +39 (051) 6111430
>> 
>>  Fax  +39 (051) 570423 
>> 
>>  http://www.kion.it <http://www.kion.it/>
>> mailto:m.turra@kion.it <mailto:m.turra@kion.it>  
>> 
>>  
>> 
>> 
>> 
> 
> -- 
> View this message in context:
> http://www.nabble.com/JK-1.2.20---Sticky-session-doesn%27t-work-properly-tf2952502.html#a8258828
> Sent from the Tomcat - User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/JK-1.2.20---Sticky-session-doesn%27t-work-properly-tf2952502.html#a8261236
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message