tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hans Schmid" <Hans.Sch...@einsurance.de>
Subject Loadbalancer problems in mod_jk from 4.0.2 TC distribution when using TC 3.3
Date Fri, 15 Feb 2002 12:38:05 GMT
Hi,

I just ran into a problem with loadbalancing in mod_jk when using
the version which comes with TC 4.0.2.

I am currently using Tomcat 3.3 on Solaris 8 behind Apache 1.3.19
connectted via mod_jk 1.1.0 comming with TC 3.3.

I built mod_jk.so from the 4.0.2 connector package and replaced my
mod_jk.so (TC3.3 Version) with this one in apache/libexec (1.3.19).

By just changing a link back and forth between the two versions, I tested
our TC3.3 based application against the two versions of mod_jk.
If this is not enough and I am missing something, please let me know.
Otherwise exactly the same setup

All works perfectly with the new mod_jk when I use normal ajp13 workers
(one webapp), but fails when I use a loadbalancing worker pointing to
another webapp on a different Tomcat instance.


Note, We use the loadbalancer just for switching tomcats. Only one
instance of the two loadbalanced Tomcats is active most of the time.
(by changing the lbvalue)


Here toe parts of my mod_jk.log.


The initialisation phase (reading the workers seems identical)

apachectl graceful..

mod_jk.log 4.0.2 distribution  and 3.3

[Tue Feb 12 15:26:45 2002]  [jk_uri_worker_map.c (383)]:
jk_uri_worker_map_t::uri_worker_map_open, rule map size is 12
[Tue Feb 12 15:26:45 2002]  [jk_uri_worker_map.c (308)]: Into
jk_uri_worker_map_t::uri_worker_map_open, match rule
/einsurance/=loadbalancer was added
[Tue Feb 12 15:26:45 2002]  [jk_uri_worker_map.c (170)]: Into
jk_uri_worker_map_t::uri_worker_map_alloc
[Tue Feb 12 15:26:45 2002]  [jk_uri_worker_map.c (362)]: Into
jk_uri_worker_map_t::uri_worker_map_open
[Tue Feb 12 15:26:45 2002]  [jk_uri_worker_map.c (332)]: Into
jk_uri_worker_map_t::uri_worker_map_open, exact rule
/einsurance=loadbalancer was added

... (another 10 workers of type ajp13)

here the initialisation:  Loadbalancer loadbalances ajp13-01 and ajp13-02

[Tue Feb 12 15:26:45 2002]  [jk_uri_worker_map.c (395)]: Into
jk_uri_worker_map_t::uri_worker_map_open, there are 12 rules
[Tue Feb 12 15:26:45 2002]  [jk_uri_worker_map.c (409)]:
jk_uri_worker_map_t::uri_worker_map_open, done
[Tue Feb 12 15:26:45 2002]  [jk_worker.c (88)]: Into wc_open
[Tue Feb 12 15:26:45 2002]  [jk_worker.c (222)]: Into build_worker_map,
creating 8 workers
[Tue Feb 12 15:26:45 2002]  [jk_worker.c (228)]: build_worker_map, creating
worker loadbalancer
[Tue Feb 12 15:26:45 2002]  [jk_worker.c (148)]: Into wc_create_worker
[Tue Feb 12 15:26:45 2002]  [jk_worker.c (162)]: wc_create_worker, about to
create instance loadbalancer of lb
[Tue Feb 12 15:26:45 2002]  [jk_lb_worker.c (540)]: Into lb_worker_factory
[Tue Feb 12 15:26:45 2002]  [jk_worker.c (171)]: wc_create_worker, about to
validate and init loadbalancer
[Tue Feb 12 15:26:45 2002]  [jk_lb_worker.c (411)]: Into
jk_worker_t::validate
[Tue Feb 12 15:26:45 2002]  [jk_worker.c (148)]: Into wc_create_worker
[Tue Feb 12 15:26:45 2002]  [jk_worker.c (162)]: wc_create_worker, about to
create instance ajp13-01 of ajp13
[Tue Feb 12 15:26:45 2002]  [jk_ajp13_worker.c (108)]: Into
ajp13_worker_factory
[Tue Feb 12 15:26:45 2002]  [jk_worker.c (171)]: wc_create_worker, about to
validate and init ajp13-01
[Tue Feb 12 15:26:45 2002]  [jk_ajp_common.c (1174)]: Into
jk_worker_t::validate
[Tue Feb 12 15:26:45 2002]  [jk_ajp_common.c (1194)]: In
jk_worker_t::validate for worker ajp13-01 contact is tomcathost:9009
[Tue Feb 12 15:26:45 2002]  [jk_ajp_common.c (1222)]: Into jk_worker_t::init
[Tue Feb 12 15:26:45 2002]  [jk_worker.c (187)]: wc_create_worker, done
[Tue Feb 12 15:26:45 2002]  [jk_worker.c (187)]: wc_create_worker, done
[Tue Feb 12 15:26:45 2002]  [jk_worker.c (148)]: Into wc_create_worker
[Tue Feb 12 15:26:45 2002]  [jk_worker.c (162)]: wc_create_worker, about to
create instance ajp13-02 of ajp13
[Tue Feb 12 15:26:45 2002]  [jk_ajp13_worker.c (108)]: Into
ajp13_worker_factory
[Tue Feb 12 15:26:45 2002]  [jk_worker.c (171)]: wc_create_worker, about to
validate and init ajp13-02
[Tue Feb 12 15:26:45 2002]  [jk_ajp_common.c (1174)]: Into
jk_worker_t::validate
[Tue Feb 12 15:26:45 2002]  [jk_ajp_common.c (1194)]: In
jk_worker_t::validate for worker ajp13-02 contact is tomcathost:9019
[Tue Feb 12 15:26:45 2002]  [jk_ajp_common.c (1222)]: Into jk_worker_t::init
[Tue Feb 12 15:26:45 2002]  [jk_worker.c (187)]: wc_create_worker, done
[Tue Feb 12 15:26:45 2002]  [jk_worker.c (187)]: wc_create_worker, done
[Tue Feb 12 15:26:45 2002]  [jk_worker.c (238)]: build_worker_map, removing
old loadbalancer worker
[Tue Feb 12 15:26:45 2002]  [jk_worker.c (228)]: build_worker_map, creating
worker ajp12-01
[Tue Feb 12 15:26:45 2002]  [jk_worker.c (148)]: Into wc_create_worker
[Tue Feb 12 15:26:45 2002]  [jk_worker.c (162)]: wc_create_worker, about to
create instance ajp12-01 of ajp12
[Tue Feb 12 15:26:45 2002]  [jk_ajp12_worker.c (268)]: Into
ajp12_worker_factory
[Tue Feb 12 15:26:45 2002]  [jk_worker.c (171)]: wc_create_worker, about to
validate and init ajp12-01
[Tue Feb 12 15:26:45 2002]  [jk_ajp12_worker.c (185)]: Into
jk_worker_t::validate
[Tue Feb 12 15:26:45 2002]  [jk_ajp12_worker.c (197)]: In
jk_worker_t::validate for worker ajp12-01 contact is tomcathost:9007
[Tue Feb 12 15:26:45 2002]  [jk_worker.c (187)]: wc_create_worker, done


This was the initialisation and now the difference when I access our
application
(webapp einsurance) it:


3.3 version of mod_jk:

[Tue Feb 12 15:28:32 2002]  [jk_uri_worker_map.c (368)]: Attempting to map
URI '/einsurance/doEntry.do'
[Tue Feb 12 15:28:32 2002]  [jk_uri_worker_map.c (391)]:
jk_uri_worker_map_t::map_uri_to_worker, Found a context match loadbalan
cer -> /einsurance/
[Tue Feb 12 15:28:32 2002]  [jk_worker.c (123)]: Into wc_get_worker_for_name
loadbalancer
[Tue Feb 12 15:28:32 2002]  [jk_worker.c (127)]: wc_get_worker_for_name,
done  found a worker
[Tue Feb 12 15:28:32 2002]  [jk_lb_worker.c (471)]: Into
jk_worker_t::get_endpoint
[Tue Feb 12 15:28:32 2002]  [jk_lb_worker.c (300)]: Into
jk_endpoint_t::service
[Tue Feb 12 15:28:32 2002]  [jk_ajp13_worker.c (865)]: Into
jk_worker_t::get_endpoint
[Tue Feb 12 15:28:32 2002]  [jk_ajp13_worker.c (775)]: Into
jk_endpoint_t::service
[Tue Feb 12 15:28:32 2002]  [jk_ajp13.c (403)]: Into ajp13_marshal_into_msgb
[Tue Feb 12 15:28:32 2002]  [jk_ajp13.c (537)]: ajp13_marshal_into_msgb -
Done
[Tue Feb 12 15:28:32 2002]  [jk_connect.c (108)]: Into jk_open_socket
[Tue Feb 12 15:28:32 2002]  [jk_connect.c (115)]: jk_open_socket, try to
connect socket = 38
[Tue Feb 12 15:28:32 2002]  [jk_connect.c (124)]: jk_open_socket, after
connect ret = 0
[Tue Feb 12 15:28:32 2002]  [jk_connect.c (132)]: jk_open_socket, set
TCP_NODELAY to on
[Tue Feb 12 15:28:32 2002]  [jk_connect.c (140)]: jk_open_socket, return, sd
= 38
[Tue Feb 12 15:28:32 2002]  [jk_ajp13_worker.c (189)]: In
jk_endpoint_t::connect_to_tomcat, connected sd = 38
[Tue Feb 12 15:28:32 2002]  [jk_ajp13_worker.c (206)]: sending to ajp13 #436
[Tue Feb 12 15:28:32 2002]  [jk_ajp13_worker.c (645)]: send_request 2:
request body to send 0 - request body to resend 0
[Tue Feb 12 15:28:34 2002]  [jk_ajp13_worker.c (258)]: received from ajp13
#82

everything works fine :)


But here the 4.0.2 version of mod_jk:

Please note the difference after
[Tue Feb 12 15:27:02 2002]  [jk_ajp_common.c (280)]: Into
ajp_marshal_into_msgb

No Done is printed


[Tue Feb 12 15:27:02 2002]  [jk_uri_worker_map.c (464)]: Attempting to map
URI '/einsurance/doEntry.do'
[Tue Feb 12 15:27:02 2002]  [jk_uri_worker_map.c (489)]:
jk_uri_worker_map_t::map_uri_to_worker, Found a context match
loadbalancer -> /einsurance/
[Tue Feb 12 15:27:02 2002]  [jk_worker.c (132)]: Into wc_get_worker_for_name
loadbalancer
[Tue Feb 12 15:27:02 2002]  [jk_worker.c (136)]: wc_get_worker_for_name,
done  found a worker
[Tue Feb 12 15:27:02 2002]  [jk_lb_worker.c (487)]: Into
jk_worker_t::get_endpoint
[Tue Feb 12 15:27:02 2002]  [jk_lb_worker.c (306)]: Into
jk_endpoint_t::service
[Tue Feb 12 15:27:02 2002]  [jk_ajp_common.c (1345)]: Into
jk_worker_t::get_endpoint
[Tue Feb 12 15:27:02 2002]  [jk_ajp_common.c (1075)]: Into
jk_endpoint_t::service
[Tue Feb 12 15:27:02 2002]  [jk_ajp_common.c (280)]: Into
ajp_marshal_into_msgb
[Tue Feb 12 15:27:02 2002]  [jk_uri_worker_map.c (447)]: Into
jk_uri_worker_map_t::map_uri_to_worker
[Tue Feb 12 15:27:02 2002]  [jk_uri_worker_map.c (464)]: Attempting to map
URI '/einsurance/doEntry.do'
[Tue Feb 12 15:27:02 2002]  [jk_uri_worker_map.c (489)]:
jk_uri_worker_map_t::map_uri_to_worker, Found a context match
loadbalancer -> /einsurance/
[Tue Feb 12 15:27:02 2002]  [jk_worker.c (132)]: Into wc_get_worker_for_name
loadbalancer
[Tue Feb 12 15:27:02 2002]  [jk_worker.c (136)]: wc_get_worker_for_name,
done  found a worker
[Tue Feb 12 15:27:02 2002]  [jk_lb_worker.c (487)]: Into
jk_worker_t::get_endpoint
[Tue Feb 12 15:27:02 2002]  [jk_lb_worker.c (306)]: Into
jk_endpoint_t::service
[Tue Feb 12 15:27:02 2002]  [jk_ajp_common.c (1345)]: Into
jk_worker_t::get_endpoint
[Tue Feb 12 15:27:02 2002]  [jk_ajp_common.c (1075)]: Into
jk_endpoint_t::service
[Tue Feb 12 15:27:02 2002]  [jk_ajp_common.c (280)]: Into
ajp_marshal_into_msgb
[Tue Feb 12 15:27:02 2002]  [jk_uri_worker_map.c (447)]: Into
jk_uri_worker_map_t::map_uri_to_worker
[Tue Feb 12 15:27:02 2002]  [jk_uri_worker_map.c (464)]: Attempting to map
URI '/einsurance/doEntry.do'
[Tue Feb 12 15:27:02 2002]  [jk_uri_worker_map.c (489)]:
jk_uri_worker_map_t::map_uri_to_worker, Found a context match
loadbalancer -> /einsurance/
[Tue Feb 12 15:27:02 2002]  [jk_worker.c (132)]: Into wc_get_worker_for_name
loadbalancer
[Tue Feb 12 15:27:02 2002]  [jk_worker.c (136)]: wc_get_worker_for_name,
done  found a worker
[Tue Feb 12 15:27:02 2002]  [jk_lb_worker.c (487)]: Into
jk_worker_t::get_endpoint
[Tue Feb 12 15:27:02 2002]  [jk_lb_worker.c (306)]: Into
jk_endpoint_t::service
[Tue Feb 12 15:27:02 2002]  [jk_ajp_common.c (1345)]: Into
jk_worker_t::get_endpoint
[Tue Feb 12 15:27:02 2002]  [jk_ajp_common.c (1075)]: Into
jk_endpoint_t::service
[Tue Feb 12 15:27:02 2002]  [jk_ajp_common.c (280)]: Into
ajp_marshal_into_msgb
[Tue Feb 12 15:27:02 2002]  [jk_uri_worker_map.c (447)]: Into
jk_uri_worker_map_t::map_uri_to_worker


Is loadbalancing supposed to work with TC 3.3 ?

Thanks a lot for looking into this,

Best Regards,
Hans



--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message