Urgent !!! Problem to get TOMCAT/4.1.24 cluster running with sticky sessionsupport.
Lot's of thnx that U point me to the misspelled error. I've got jvmRoute added to the session cookie finally. The problem is that apache redirects the workers randomly : tomcat1 got session cookie with worker of tomcat2 sometimes. The same history with tomcat2. 2003-08-29 16:11:11 RequestDumperValve[Standalone]: cookie=JSESSIONID=6DA548CB187E7EB31B73F8DF8959C643.tomcat-worker-02 2003-08-29 16:11:11 RequestDumperValve[Standalone]: cookie=lifesensor01=US%7Cen%7Cc%7Cneutral%7Cnoname%7C0%7Cnull%7C-1%7Cwellcome%7C0%7C 03-08-29 16:11:46 RequestDumperValve[Standalone]:contextPath= 2003-08-29 16:11:46 RequestDumperValve[Standalone]: cookie=JSESSIONID=10219C0C8296E9A0629C1D9C3BF7770B.tomcat-worker-01 2003-08-29 16:11:46 RequestDumperValve[Standalone]: cookie=lifesensor01=US%7Cen%7Cc%7Cneutral%7Cnoname%7C0%7Cnull%7C-1%7Cwellcome%7C0%7C So the result is that the same session processed by both tomcat but with specified right worker: tomcat1: 2003-08-29 16:49:26 RequestDumperValve[Standalone]: cookie=JSESSIONID=19E9FD015AF34C5181322F3FEF37B0D6.tomcat-worker-01 tomcat2: 003-08-29 16:50:10 RequestDumperValve[Standalone]: header=cookie=JSESSIONID=19E9FD015AF34C5181322F3FEF37B0D6.tomcat-worker-01; this could work if session is replicated on all tomcat servers but not in a current state. So the same round-robin problem like before. ((( Which configuration files should I post in addition? What can be the problem if in workers.properties I have: worker.tomcat-worker-02.port=6007 worker.tomcat-worker-02.host=172.31.7.12 worker.tomcat-worker-02.type=ajp13 worker.tomcat-worker-02.lbfactor=50 #worker.tomcat-worker-02.cachesize=10 #worker.tomcat-worker-02.cache_timeout=600 #worker.tomcat-worker-02.socket_timeout=300 #worker.tomcat-worker-02.local_worker=1 worker.tomcat-worker-01.port=5007 worker.tomcat-worker-01.host=172.31.7.20 worker.tomcat-worker-01.type=ajp13 worker.tomcat-worker-01.lbfactor=50 #worker.tomcat-worker-01.cachesize=10 #worker.tomcat-worker-01.cache_timeout=600 #worker.tomcat-worker-01.socket_timeout=300 #worker.tomcat-worker-01.local_worker=1 # 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=tomcat-worker-01,tomcat-worker-02 worker.loadbalancer.sticky_session =1 #worker.loadbalancer.local_worker_only=1 MOD_JK.log( workers mapped to the right ips) [Fri Aug 29 14:41:43 2003] [jk_worker.c (171)]: wc_create_worker, about to validate and init tomcat-worker-01 [Fri Aug 29 14:41:43 2003] [jk_ajp_common.c (1219)]: Into jk_worker_t::validate [Fri Aug 29 14:41:43 2003] [jk_ajp_common.c (1239)]: In jk_worker_t::validate for worker tomcat-worker-01 contact is 172.31.7.20:5007 [Fri Aug 29 14:41:43 2003] [jk_ajp_common.c (1267)]: Into jk_worker_t::init [Fri Aug 29 14:41:43 2003] [jk_ajp_common.c (1287)]: In jk_worker_t::init, setting socket timeout to 0 [Fri Aug 29 14:41:43 2003] [jk_worker.c (187)]: wc_create_worker, done [Fri Aug 29 14:41:43 2003] [jk_worker.c (238)]: build_worker_map, removing old tomcat-worker-01 worker [Fri Aug 29 14:41:43 2003] [jk_worker.c (228)]: build_worker_map, creating worker tomcat-worker-02 [Fri Aug 29 14:41:43 2003] [jk_worker.c (148)]: Into wc_create_worker [Fri Aug 29 14:41:43 2003] [jk_worker.c (162)]: wc_create_worker, about to create instance tomcat-worker-02 of ajp13 [Fri Aug 29 14:41:43 2003] [jk_ajp13_worker.c (108)]: Into ajp13_worker_factory [Fri Aug 29 14:41:43 2003] [jk_worker.c (171)]: wc_create_worker, about to validate and init tomcat-worker-02 [Fri Aug 29 14:41:43 2003] [jk_ajp_common.c (1219)]: Into jk_worker_t::validate [Fri Aug 29 14:41:43 2003] [jk_ajp_common.c (1239)]: In jk_worker_t::validate for worker tomcat-worker-02 contact is 172.31.7.12:6007 [Fri Aug 29 14:41:43 2003] [jk_ajp_common.c (1267)]: Into jk_worker_t::init [Fri Aug 29 14:41:43 2003] [jk_ajp_common.c (1287)]: In jk_worker_t::init, setting socket timeout to 0 [Fri Aug 29 14:41:43 2003] [jk_worker.c (187)]: wc_create_worker, done [Fri Aug 29 14:41:43 2003] [jk_lb_worker.c (498)]: Balanced worker 0 has name tomcat-worker-01 [Fri Aug 29 14:41:43 2003] [jk_lb_worker.c (498)]: Balanced worker 1 has name tomcat-worker-02 [Fri Aug 29 14:50:01 2003] [jk_ajp_common.c (532)]: ajp_unmarshal_response: Header[1] [Set-Cookie] = [JSESSIONID=19E9FD015AF34C5181322F3FEF37B0D6.tomcat-worker-01; Path=/lifesensor] [Fri Aug 29 14:50:12 2003] [jk_ajp_common.c (532)]: ajp_unmarshal_response: Header[2] [Set-Cookie] = [JSESSIONID=EEB6757BF4A9337FD7265AA581DE8BE3.tomcat-worker-02; Path=/lifesensor] John Turner <[EMAIL PROTECTED]> 29.08.2003 14:23 Please respond to "Tomcat Users List" To: Tomcat Users List <[EMAIL PROTECTED]> cc: Subject:Re: Urgent !!! Problem to get TOMCAT/4.1.24 cluster
Urgent !!! Problem to get TOMCAT/4.1.24 cluster running with sticky sessionsupport.
Hi people, I still have no any progress , I've installed the newest version of tomcat 4.1.27 and build mod_jk from the sources. Still the same : all requests are sent to one tomcat , but if I shutdown it apache redirects the work to another one No error messages, in mod_jk.log I see that two balanced workers were found. Lots of web links say that load-balancing work , but in reallity they all point to one from Pascal Forget. I even cannot see anything added by tomcat to my session cookie. There are some conf files bellow. Any help or suggestion would be highly appreciated. P.S. My topic is still not in tomcat-users list. So what are criterias to put it there? -- Yefym MOD_JK.LOG [Fri Aug 29 08:21:47 2003] [jk_uri_worker_map.c (321)]: Into jk_uri_worker_map_t::uri_worker_map_open, match rule /ping/servlet/=loadbalancer was added [Fri Aug 29 08:21:47 2003] [jk_uri_worker_map.c (299)]: Into jk_uri_worker_map_t::uri_worker_map_open, suffix rule /ping/.jsp=loadbalancer was added [Fri Aug 29 08:21:47 2003] [jk_uri_worker_map.c (299)]: Into jk_uri_worker_map_t::uri_worker_map_open, suffix rule /ping/.do=loadbalancer was added [Fri Aug 29 08:21:47 2003] [jk_uri_worker_map.c (408)]: Into jk_uri_worker_map_t::uri_worker_map_open, there are 33 rules [Fri Aug 29 08:21:47 2003] [jk_uri_worker_map.c (422)]: jk_uri_worker_map_t::uri_worker_map_open, done [Fri Aug 29 08:21:47 2003] [jk_worker.c (88)]: Into wc_open [Fri Aug 29 08:21:47 2003] [jk_worker.c (222)]: Into build_worker_map, creating 3 workers [Fri Aug 29 08:21:47 2003] [jk_worker.c (228)]: build_worker_map, creating worker tomcat-worker-01 [Fri Aug 29 08:21:47 2003] [jk_worker.c (148)]: Into wc_create_worker [Fri Aug 29 08:21:47 2003] [jk_worker.c (162)]: wc_create_worker, about to create instance tomcat-worker-01 of ajp13 [Fri Aug 29 08:21:47 2003] [jk_ajp13_worker.c (108)]: Into ajp13_worker_factory [Fri Aug 29 08:21:47 2003] [jk_worker.c (171)]: wc_create_worker, about to validate and init tomcat-worker-01 [Fri Aug 29 08:21:47 2003] [jk_ajp_common.c (1219)]: Into jk_worker_t::validate [Fri Aug 29 08:21:47 2003] [jk_ajp_common.c (1239)]: In jk_worker_t::validate for worker tomcat-worker-01 contact is 172.31.7.20:5007 [Fri Aug 29 08:21:47 2003] [jk_ajp_common.c (1267)]: Into jk_worker_t::init [Fri Aug 29 08:21:47 2003] [jk_ajp_common.c (1287)]: In jk_worker_t::init, setting socket timeout to 300 [Fri Aug 29 08:21:47 2003] [jk_worker.c (187)]: wc_create_worker, done [Fri Aug 29 08:21:47 2003] [jk_worker.c (238)]: build_worker_map, removing old tomcat-worker-01 worker [Fri Aug 29 08:21:47 2003] [jk_worker.c (228)]: build_worker_map, creating worker tomcat-worker-02 [Fri Aug 29 08:21:47 2003] [jk_worker.c (148)]: Into wc_create_worker [Fri Aug 29 08:21:47 2003] [jk_worker.c (162)]: wc_create_worker, about to create instance tomcat-worker-02 of ajp13 [Fri Aug 29 08:21:47 2003] [jk_ajp13_worker.c (108)]: Into ajp13_worker_factory [Fri Aug 29 08:21:47 2003] [jk_worker.c (171)]: wc_create_worker, about to validate and init tomcat-worker-02 [Fri Aug 29 08:21:47 2003] [jk_ajp_common.c (1219)]: Into jk_worker_t::validate [Fri Aug 29 08:21:47 2003] [jk_ajp_common.c (1239)]: In jk_worker_t::validate for worker tomcat-worker-02 contact is 172.31.7.12:6007 [Fri Aug 29 08:21:47 2003] [jk_ajp_common.c (1267)]: Into jk_worker_t::init [Fri Aug 29 08:21:47 2003] [jk_ajp_common.c (1287)]: In jk_worker_t::init, setting socket timeout to 300 [Fri Aug 29 08:21:47 2003] [jk_worker.c (187)]: wc_create_worker, done [Fri Aug 29 08:21:47 2003] [jk_worker.c (238)]: build_worker_map, removing old tomcat-worker-02 worker [Fri Aug 29 08:21:47 2003] [jk_worker.c (228)]: build_worker_map, creating worker loadbalancer [Fri Aug 29 08:21:47 2003] [jk_worker.c (148)]: Into wc_create_worker [Fri Aug 29 08:21:47 2003] [jk_worker.c (162)]: wc_create_worker, about to create instance loadbalancer of lb [Fri Aug 29 08:21:47 2003] [jk_lb_worker.c (586)]: Into lb_worker_factory [Fri Aug 29 08:21:47 2003] [jk_worker.c (171)]: wc_create_worker, about to validate and init loadbalancer [Fri Aug 29 08:21:47 2003] [jk_lb_worker.c (420)]: Into jk_worker_t::validate [Fri Aug 29 08:21:47 2003] [jk_worker.c (148)]: Into wc_create_worker [Fri Aug 29 08:21:47 2003] [jk_worker.c (162)]: wc_create_worker, about to create instance tomcat-worker-01 of ajp13 [Fri Aug 29 08:21:47 2003] [jk_ajp13_worker.c (108)]: Into ajp13_worker_factory [Fri Aug 29 08:21:47 2003] [jk_worker.c (171)]: wc_create_worker, about to validate and init tomcat-worker-01 [Fri Aug 29 08:21:47 2003] [jk_ajp_common.c (1219)]: Into jk_worker_t::validate [Fri Aug 29 08:21:47 2003] [jk_ajp_common.c (1239)]: In jk_worker_t::validate for worker tomcat-worker-01 contact is 172.31.7.20:5007 [Fri Aug 29 08:21:47 2003] [jk_ajp_common.c (1267)]: Into jk_worker_t::init [Fri Aug 2
Urgent !!! Problem to get TOMCAT/4.1.24 cluster running with sticky sessionsupport.
Hi guys , I'm newbei here , can be that I duplicate this message. Sorry for that , but would be nice if anybody reply me :))) just to be sure that I have my chance to solve this problem I have Apache/2.0.45 running on the server A And two tomcat workers are running on B and C The problem is that I cannot get Tomcat cluster load balanced , playing around with workers.properties on Apache gave me two different situations. 1.if I have local_worker parameter equal to 1, then I have no lost sessions but also no loadbalancing . But cluster is still fail safe, if one tomcat dies - another one gets all incoming requests. 2. if I have local_worker=0 then I have a simple round- robin balancer without session affinity. So my session got lost. configuration example workers.properties: worker.list=tomcat-worker-01,tomcat-worker-02,router worker.tomcat-worker-02.port=4007 worker.tomcat-worker-02.host=xxx.xx.x.12 worker.tomcat-worker-02.type=ajp13 worker.tomcat-worker-02.lbfactor=50 worker.tomcat-worker-02.cachesize=10 worker.tomcat-worker-02.cache_timeout=600 worker.tomcat-worker-02.socket_timeout=300 worker.tomcat-worker-02.local_worker=1 worker.tomcat-worker-01.port=5007 worker.tomcat-worker-01.host=xxx.xx.x.20 worker.tomcat-worker-01.type=ajp13 worker.tomcat-worker-01.lbfactor=50 worker.tomcat-worker-01.cachesize=10 worker.tomcat-worker-01.cache_timeout=600 worker.tomcat-worker-01.socket_timeout=300 worker.tomcat-worker-01.local_worker=1 worker.router.type=lb worker.router.balanced_workers=tomcat-worker-01,tomcat-worker-02 worker.router.sticky_session =1 worker.router.local_worker_only=1 P.S. I checked the previous discussions related to server.xmlS configuration. I had there: Best Regards an thnx for your patience.) --
Urgent !!! Problem to get TOMCAT/4.1.24 cluster running with sticky sessionsupport.
Hi guys here is detail description: I have Apache/2.0.45 running on the server A And two tomcat workers are running on B and C The problem is that I cannot get Tomcat cluster load balanced , playing around with workers.properties on Apache gave me two different situations. 1.if I have local_worker parameter equal to 1, then I have no lost sessions but also no loadbalancing . But cluster is still fail safe, if one tomcat dies - another one gets all incoming requests. 2. if I have local_worker=0 then I have a simple round- robin balancer without session affinity. So my session got lost. configuration example workers.properties: worker.list=tomcat-worker-01,tomcat-worker-02,router worker.tomcat-worker-02.port=4007 worker.tomcat-worker-02.host=xxx.xx.x.12 worker.tomcat-worker-02.type=ajp13 worker.tomcat-worker-02.lbfactor=50 worker.tomcat-worker-02.cachesize=10 worker.tomcat-worker-02.cache_timeout=600 worker.tomcat-worker-02.socket_timeout=300 worker.tomcat-worker-02.local_worker=1 worker.tomcat-worker-01.port=5007 worker.tomcat-worker-01.host=xxx.xx.x.20 worker.tomcat-worker-01.type=ajp13 worker.tomcat-worker-01.lbfactor=50 worker.tomcat-worker-01.cachesize=10 worker.tomcat-worker-01.cache_timeout=600 worker.tomcat-worker-01.socket_timeout=300 worker.tomcat-worker-01.local_worker=1 worker.router.type=lb worker.router.balanced_workers=tomcat-worker-01,tomcat-worker-02 worker.router.sticky_session =1 worker.router.local_worker_only=1 P.S. I checked the previous discussions related to server.xmlS configuration. I had there: -- Yefym Dmukh developer email: [EMAIL PROTECTED]