Did you set jmvRoute in server.xml?

Scott Danforth wrote:
I'm trying to use jk1.2.20 mod_jk with Apache 1.3 for load balancing two tomcat services and sticky sessions aren't working.

My application requires authentication, and displays a login on a new session. When I kill one of the tomcats, the application works fine (i.e., the authenticated session is retained and used for each subsequent request). But if both workers are running, mod_jk ping-pongs between them (which results in new sessions being created on each request).

The thing I think is most revealing is that when I run with only one worker alive (so the application works), mod_jk is still trying to round-robin the two workers.

Here's are some excerpts from mod_jk.log that clearly show mod_jk trying to use both tomcat1 and tomcat2 for the same session. (is "partial sessionid" a clue??)

What's going on, and how do I fix this?

   -- Scott.


service sticky_session=1 id='B4FE8293E8E81F8071F39EDD1E594BEC'
[Thu Feb 22 19:08:13 2007] [3786:0000] [debug] get_most_suitable_worker::jk_lb_worker.c (733): searching worker for partial sessionid B4FE8293E8E81F8071F39EDD1E594BEC [Thu Feb 22 19:08:13 2007] [3786:0000] [debug] get_most_suitable_worker::jk_lb_worker.c (785): found best worker tomcat1 (tomcat1) using method 'Request'

service sticky_session=1 id='B4FE8293E8E81F8071F39EDD1E594BEC'
[Thu Feb 22 19:08:16 2007] [3786:0000] [debug] get_most_suitable_worker::jk_lb_worker.c (733): searching worker for partial sessionid B4FE8293E8E81F8071F39EDD1E594BEC [Thu Feb 22 19:08:16 2007] [3786:0000] [debug] get_most_suitable_worker::jk_lb_worker.c (785): found best worker tomcat2 (tomcat2) using method 'Request'

service sticky_session=1 id='B4FE8293E8E81F8071F39EDD1E594BEC'
[Thu Feb 22 19:08:16 2007] [3786:0000] [debug] get_most_suitable_worker::jk_lb_worker.c (733): searching worker for partial sessionid B4FE8293E8E81F8071F39EDD1E594BEC [Thu Feb 22 19:08:16 2007] [3786:0000] [debug] get_most_suitable_worker::jk_lb_worker.c (785): found best worker tomcat1 (tomcat1) using method 'Request'

service sticky_session=1 id='B4FE8293E8E81F8071F39EDD1E594BEC'
[Thu Feb 22 19:10:47 2007] [3788:0000] [debug] get_most_suitable_worker::jk_lb_worker.c (733): searching worker for partial sessionid B4FE8293E8E81F8071F39EDD1E594BEC [Thu Feb 22 19:10:47 2007] [3788:0000] [debug] get_most_suitable_worker::jk_lb_worker.c (785): found best worker tomcat2 (tomcat2) using method 'Request' [Thu Feb 22 19:10:47 2007] [3788:0000] [debug] service::jk_lb_worker.c (860): service worker=tomcat2 route=tomcat2

service sticky_session=1 id='B4FE8293E8E81F8071F39EDD1E594BEC'
[Thu Feb 22 19:10:47 2007] [3788:0000] [debug] get_most_suitable_worker::jk_lb_worker.c (733): searching worker for partial sessionid B4FE8293E8E81F8071F39EDD1E594BEC [Thu Feb 22 19:10:47 2007] [3788:0000] [debug] get_most_suitable_worker::jk_lb_worker.c (785): found best worker tomcat1 (tomcat1) using method 'Request' [Thu Feb 22 19:10:47 2007] [3788:0000] [debug] service::jk_lb_worker.c (860): service worker=tomcat1 route=tomcat1

service sticky_session=1 id='B4FE8293E8E81F8071F39EDD1E594BEC'
[Thu Feb 22 19:11:57 2007] [3790:0000] [debug] get_most_suitable_worker::jk_lb_worker.c (733): searching worker for partial sessionid B4FE8293E8E81F8071F39EDD1E594BEC [Thu Feb 22 19:11:57 2007] [3790:0000] [debug] get_most_suitable_worker::jk_lb_worker.c (785): found best worker tomcat2 (tomcat2) using method 'Request' [Thu Feb 22 19:11:57 2007] [3790:0000] [debug] service::jk_lb_worker.c (860): service worker=tomcat2 route=tomcat2

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

Reply via email to