You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Carlos Campos <kl...@hotmail.com> on 2007/01/09 20:28:49 UTC
Help with Tomcat 5.5 mod_jk 1.2.20 loadbalancing sticky session issue
Hi,
I have installed one instance of apache 2.2.3 with mod_jk 1.2.20, two
instances of tomcat 5.5, and Java 1.5.0
I m trying to set up a loadbalancer that supports sticky sessions.
However what I m getting when i access the test.jsp via
(http://somedomain.com/carlos.jsp) round robin hits on the tomcats setup,
with a new session id being created for each access.
1st hit: sessionId: 11EB9613AAE1BD6E1903CAFEAD9469C4.jvm1
2nd hit: sessionId: DAA0ECBF06B2A8C4543BEBF61C2C8787.jvm2
3rd hit: sessionId: 9CF6BCE52886C82E777E1F76917DDCB4.jvm1
.... and so on
Can anyone point out what I m doing wrong? I m trying to setup the system
so that the client browser is always sent to the same tomcat instance.
I have tried setting the directive "worker.loadbalancer.sticky_session=True"
as "worker.loadbalancer.sticky_session=1" but I still get the same
result. I even tried adding: worker.jvm1.domain=jvm1 ,
worker.jvm2.domain=jvm2. as suggested in some of the threads but that
didn't help.
Thanks.
Carlos.
TEST JSP
========
<%
HttpSession session22 = request.getSession(false);
if ( session22 != null )
{
String id = session22.getId();
out.println("sessionId: " + id);
}
%>
JAVA VERSION
============
[root@web1 admin]# java -version
java version "1.5.0_10"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_10-b03)
Java HotSpot(TM) Server VM (build 1.5.0_10-b03, mixed mode)
SOME HTTP DETAILS
=================
[root@web1 bin]# ./httpd -V
Server version: Apache/2.2.3
Server built: Dec 18 2006 10:56:49
Server's Module Magic Number: 20051115:3
Server loaded: APR 1.2.7, APR-Util 1.2.7
Compiled using: APR 1.2.7, APR-Util 1.2.7
Architecture: 32-bit
Server MPM: Prefork
threaded: no
forked: yes (variable process count)
Server compiled with....
-D APACHE_MPM_DIR="server/mpm/prefork"
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=128
-D HTTPD_ROOT="/usr/httpd"
-D SUEXEC_BIN="/usr/httpd/bin/suexec"
-D DEFAULT_PIDLOG="logs/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_LOCKFILE="logs/accept.lock"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="conf/mime.types"
-D SERVER_CONFIG_FILE="conf/httpd.conf"
[root@web1 bin]# ./httpd -l
Compiled in modules:
core.c
mod_authn_file.c
mod_authn_default.c
mod_authz_host.c
mod_authz_groupfile.c
mod_authz_user.c
mod_authz_default.c
mod_auth_basic.c
mod_include.c
mod_filter.c
mod_log_config.c
mod_env.c
mod_setenvif.c
mod_ssl.c
prefork.c
http_core.c
mod_mime.c
mod_status.c
mod_autoindex.c
mod_asis.c
mod_cgi.c
mod_negotiation.c
mod_dir.c
mod_actions.c
mod_userdir.c
mod_alias.c
mod_so.c
HTTPD.CONF
==========
<IfDefine mod_jk_module>
LoadModule jk_module modules/mod_jk.so
</IfDefine>
<IfModule mod_jk.c>
JkWorkersFile /usr/httpd/conf/extra/workers.properties
JkLogFile /usr/httpd/logs/mod_jk.log
JkLogLevel debug
JkMount /*.jsp loadbalancer
JkMount /servlet/* loadbalancer
JkMount /*.xml loadbalancer
JkMount /jkmanager/* jkstatus
JkShmFile /usr/httpd/logs/jk.shm
AddType text/xml .xml
</IfModule>
WORKERS.PROPERTIES
==================
worker.list=loadbalancer,jkstatus
worker.maintain=60
worker.jvm1.port=18007
worker.jvm1.host=localhost
worker.jvm1.type=ajp13
worker.jvm1.lbfactor=1
worker.jvm1.socket_timeout=1
worker.jvm1.retries=1
worker.jvm1.domain=jvm1 (I even tried this to see if it would help, but it
didn't -- removed)
worker.jvm2.port=18009
worker.jvm2.host=localhost
worker.jvm2.type=ajp13
worker.jvm2.lbfactor=1
worker.jvm2.socket_timeout=1
worker.jvm2.retries=1
worker.jvm2.domain=jvm2 (I even tried this to see if it would help, but it
didn't -- removed)
worker.jkstatus.type=status
worker.loadbalancer.type=lb
worker.loadbalancer.balance_workers=jvm1,jvm2
worker.loadbalancer.sticky_session=True
worker.loadbalancer.sticky_session_force=False
worker.loadbalancer.method=B
TOMCAT1 SERVER.XML (the diff vs the orginal config file)
==============================
<Connector port="18009" enableLookups="false" redirectPort="8443"
protocol="AJP/1.3" />
<Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
TOMCAT2 SERVER.XML (the diff vs the orginal config file)
==============================
<Connector port="18007" enableLookups="false" redirectPort="8443"
protocol="AJP/1.3" />
<Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm2">
MOD_JK.LOG
===========
1st access to jsp (http://domainame.com/carlos.jsp) =====> sessionId:
11EB9613AAE1BD6E1903CAFEAD9469C4.jvm1
*****************
[Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
map_uri_to_worker::jk_uri_worker_map.c (575): Attempting to map URI
'/carlos.jsp' from 4 maps
[Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
map_uri_to_worker::jk_uri_worker_map.c (587): Attempting to map context URI
'/jkmanager/*=jkstatus' source 'JkMount'
[Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
map_uri_to_worker::jk_uri_worker_map.c (587): Attempting to map context URI
'/servlet/*=loadbalancer' sour ce 'JkMount'
[Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
map_uri_to_worker::jk_uri_worker_map.c (587): Attempting to map context URI
'/*.jsp=loadbalancer' source ' JkMount'
[Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
map_uri_to_worker::jk_uri_worker_map.c (602): Found a wildchar match
'/*.jsp=loadbalancer'
[Tue Jan 09 09:05:02 2007] [30637:14016] [debug] jk_handler::mod_jk.c
(1999): Into handler jakarta-servlet worker=loadbalancer r->proxyreq=0
[Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
wc_get_worker_for_name::jk_worker.c (114): found a worker loadbalancer
[Tue Jan 09 09:05:02 2007] [30637:14016] [debug] wc_maintain::jk_worker.c
(321): Maintaining worker loadbalancer
[Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
wc_get_name_for_type::jk_worker.c (290): Found worker type 'lb'
[Tue Jan 09 09:05:02 2007] [30637:14016] [debug] init_ws_service::mod_jk.c
(584): Service protocol=HTTP/1.1 method=GET host=(null) addr=69.230.90.148
name= web1.somedomain.com port=80 auth=(null) user=(null) laddr=x.x.209.93
raddr=69.230.90.148
[Tue Jan 09 09:05:02 2007] [30637:14016] [debug] service::jk_lb_worker.c
(840): service sticky_session=1 id='2D2484891C4306E185A372BD9C1CFDAC.jvm2'
[Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
get_most_suitable_worker::jk_lb_worker.c (733): searching worker for partial
sessionid 2D2484891C4306E185A 372BD9C1CFDAC.jvm2
[Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
get_most_suitable_worker::jk_lb_worker.c (741): searching worker for session
route jvm2
[Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
get_most_suitable_worker::jk_lb_worker.c (754): found worker jvm2 (jvm2) for
route jvm2 and partial sessio nid 2D2484891C4306E185A372BD9C1CFDAC.jvm2
[Tue Jan 09 09:05:02 2007] [30637:14016] [debug] service::jk_lb_worker.c
(860): service worker=jvm2 route=jvm2
[Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
ajp_get_endpoint::jk_ajp_common.c (2315): acquired connection pool slot=0
[Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
ajp_marshal_into_msgb::jk_ajp_common.c (548): ajp marshaling done
[Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
ajp_service::jk_ajp_common.c (1771): processing jvm2 with 1 retries
[Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (893): sending to ajp13
pos=4 len=956 max=8192
....
[Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
ajp_unmarshal_response::jk_ajp_common.c (603): status = 200
[Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
ajp_unmarshal_response::jk_ajp_common.c (610): Number of headers is = 3
[Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
ajp_unmarshal_response::jk_ajp_common.c (666): Header[0] [Set-Cookie] =
[JSESSIONID=11EB9613AAE1BD6E1903CA FEAD9469C4.jvm1; Path=/]
[Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
ajp_unmarshal_response::jk_ajp_common.c (666): Header[1] [Content-Type] =
[text/html;charset=ISO-8859-1]
[Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
ajp_unmarshal_response::jk_ajp_common.c (666): Header[2] [Content-Length] =
[62]
[Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
ajp_connection_tcp_get_message::jk_ajp_common.c (1029): received from ajp13
pos=0 len=66 max=8192
....
[Tue Jan 09 09:05:02 2007] [30637:14016] [debug] ws_write::mod_jk.c (436):
written 62 out of 62
[Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
ajp_connection_tcp_get_message::jk_ajp_common.c (1029): received from ajp13
pos=0 len=2 max=8192
[Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
ajp_connection_tcp_get_message::jk_ajp_common.c (1029): 0000 05 01 00 00
00 00 00 00 00 00 00 00 00 00 00 00 - ................
[Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
ajp_process_callback::jk_ajp_common.c (1491): AJP13 protocol: Reuse is OK
[Tue Jan 09 09:05:02 2007] [30637:14016] [debug] ajp_done::jk_ajp_common.c
(2258): recycling connection pool slot=0 for worker jvm2
[Tue Jan 09 09:05:02 2007] [30637:14016] [debug] jk_handler::mod_jk.c
(2126): Service finished with status=200 for worker=loadbalancer
2nd access to same jsp (http://domainame.com/carlos.jsp) =======>
sessionId: DAA0ECBF06B2A8C4543BEBF61C2C8787.jvm2
**********************
[Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
map_uri_to_worker::jk_uri_worker_map.c (575): Attempting to map URI
'/carlos.jsp' from 4 maps
[Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
map_uri_to_worker::jk_uri_worker_map.c (587): Attempting to map context URI
'/jkmanager/*=jkstatus' source 'JkMount'
[Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
map_uri_to_worker::jk_uri_worker_map.c (587): Attempting to map context URI
'/servlet/*=loadbalancer' source 'JkMount'
[Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
map_uri_to_worker::jk_uri_worker_map.c (587): Attempting to map context URI
'/*.jsp=loadbalancer' source 'JkMount'
[Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
map_uri_to_worker::jk_uri_worker_map.c (602): Found a wildchar match
'/*.jsp=loadbalancer'
[Tue Jan 09 09:11:42 2007] [31550:14016] [debug] jk_handler::mod_jk.c
(1999): Into handler jakarta-servlet worker=loadbalancer r->proxyreq=0
[Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
wc_get_worker_for_name::jk_worker.c (114): found a worker loadbalancer
[Tue Jan 09 09:11:42 2007] [31550:14016] [debug] wc_maintain::jk_worker.c
(321): Maintaining worker loadbalancer
[Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
maintain_workers::jk_lb_worker.c (509): decay with 2^7
[Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
wc_get_name_for_type::jk_worker.c (290): Found worker type 'lb'
[Tue Jan 09 09:11:42 2007] [31550:14016] [debug] init_ws_service::mod_jk.c
(584): Service protocol=HTTP/1.1 method=GET host=(null) addr=69.230.90.148
name=web1.somedomain.com port=80 auth=(null) user=(null) laddr=x.x.209.93
raddr=69.230.90.148
[Tue Jan 09 09:11:42 2007] [31550:14016] [debug] service::jk_lb_worker.c
(840): service sticky_session=1 id='11EB9613AAE1BD6E1903CAFEAD9469C4.jvm1'
[Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
get_most_suitable_worker::jk_lb_worker.c (733): searching worker for partial
sessionid 11EB9613AAE1BD6E1903CAFEAD9469C4.jvm1
[Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
get_most_suitable_worker::jk_lb_worker.c (741): searching worker for session
route jvm1
[Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
get_most_suitable_worker::jk_lb_worker.c (754): found worker jvm1 (jvm1) for
route jvm1 and partial sessionid 11EB9613AAE1BD6E1903CAFEAD9469C4.jvm1
[Tue Jan 09 09:11:42 2007] [31550:14016] [debug] service::jk_lb_worker.c
(860): service worker=jvm1 route=jvm1
[Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
ajp_get_endpoint::jk_ajp_common.c (2315): acquired connection pool slot=0
[Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
ajp_marshal_into_msgb::jk_ajp_common.c (548): ajp marshaling done
[Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
ajp_service::jk_ajp_common.c (1771): processing jvm1 with 1 retries
[Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
jk_open_socket::jk_connect.c (335): socket TCP_NODELAY set to On
[Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
jk_open_socket::jk_connect.c (398): timeout 1 set for socket=20
[Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
jk_open_socket::jk_connect.c (433): trying to connect socket 20 to
127.0.0.1:18007
[Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
jk_open_socket::jk_connect.c (459): socket 20 connected to 127.0.0.1:18007
[Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
ajp_connect_to_endpoint::jk_ajp_common.c (847): Connected socket 20 to
(127.0.0.1:18007)
[Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (893): sending to ajp13
pos=4 len=956 max=8192
....
[Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
ajp_send_request::jk_ajp_common.c (1273): request body to send 0 - request
body to resend 0
[Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
ajp_connection_tcp_get_message::jk_ajp_common.c (1029): received from ajp13
pos=0 len=150 max=8192
....
[Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
ajp_unmarshal_response::jk_ajp_common.c (603): status = 200
[Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
ajp_unmarshal_response::jk_ajp_common.c (610): Number of headers is = 3
[Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
ajp_unmarshal_response::jk_ajp_common.c (666): Header[0] [Set-Cookie] =
[JSESSIONID=DAA0ECBF06B2A8C4543BEBF61C2C8787.jvm2; Path=/]
[Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
ajp_unmarshal_response::jk_ajp_common.c (666): Header[1] [Content-Type] =
[text/html;charset=ISO-8859-1]
[Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
ajp_unmarshal_response::jk_ajp_common.c (666): Header[2] [Content-Length] =
[62]
[Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
ajp_connection_tcp_get_message::jk_ajp_common.c (1029): received from ajp13
pos=0 len=66 max=8192
....
[Tue Jan 09 09:11:42 2007] [31550:14016] [debug] ws_write::mod_jk.c (436):
written 62 out of 62
[Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
ajp_connection_tcp_get_message::jk_ajp_common.c (1029): received from ajp13
pos=0 len=2 max=8192
[Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
ajp_connection_tcp_get_message::jk_ajp_common.c (1029): 0000 05 01 00 00
00 00 00 00 00 00 00 00 00 00 00 00 - ................
[Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
ajp_process_callback::jk_ajp_common.c (1491): AJP13 protocol: Reuse is OK
[Tue Jan 09 09:11:42 2007] [31550:14016] [debug] ajp_done::jk_ajp_common.c
(2258): recycling connection pool slot=0 for worker jvm1
[Tue Jan 09 09:11:42 2007] [31550:14016] [debug] jk_handler::mod_jk.c
(2126): Service finished with status=200 for worker=loadbalancer
3rd access to same jsp (http://domainame.com/carlos.jsp) ======>
sessionId: 9CF6BCE52886C82E777E1F76917DDCB4.jvm1
[Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
map_uri_to_worker::jk_uri_worker_map.c (575): Attempting to map URI
'/carlos.jsp' from 4 maps
[Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
map_uri_to_worker::jk_uri_worker_map.c (587): Attempting to map context URI
'/jkmanager/*=jkstatus' source 'JkMount'
[Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
map_uri_to_worker::jk_uri_worker_map.c (587): Attempting to map context URI
'/servlet/*=loadbalancer' source 'JkMount'
[Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
map_uri_to_worker::jk_uri_worker_map.c (587): Attempting to map context URI
'/*.jsp=loadbalancer' source 'JkMount'
[Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
map_uri_to_worker::jk_uri_worker_map.c (602): Found a wildchar match
'/*.jsp=loadbalancer'
[Tue Jan 09 09:15:20 2007] [30638:14016] [debug] jk_handler::mod_jk.c
(1999): Into handler jakarta-servlet worker=loadbalancer r->proxyreq=0
[Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
wc_get_worker_for_name::jk_worker.c (114): found a worker loadbalancer
[Tue Jan 09 09:15:20 2007] [30638:14016] [debug] wc_maintain::jk_worker.c
(321): Maintaining worker loadbalancer
[Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
maintain_workers::jk_lb_worker.c (509): decay with 2^3
[Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
wc_get_name_for_type::jk_worker.c (290): Found worker type 'lb'
[Tue Jan 09 09:15:20 2007] [30638:14016] [debug] init_ws_service::mod_jk.c
(584): Service protocol=HTTP/1.1 method=GET host=(null) addr=69.230.90.148
name=web1.somedomain.com port=80 auth=(null) user=(null)
laddr=111.111.111.111 raddr=69.230.90.148
[Tue Jan 09 09:15:20 2007] [30638:14016] [debug] service::jk_lb_worker.c
(840): service sticky_session=1 id='DAA0ECBF06B2A8C4543BEBF61C2C8787.jvm2'
[Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
get_most_suitable_worker::jk_lb_worker.c (733): searching worker for partial
sessionid DAA0ECBF06B2A8C4543BEBF61C2C8787.jvm2
[Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
get_most_suitable_worker::jk_lb_worker.c (741): searching worker for session
route jvm2
[Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
get_most_suitable_worker::jk_lb_worker.c (754): found worker jvm2 (jvm2) for
route jvm2 and partial sessionid DAA0ECBF06B2A8C4543BEBF61C2C8787.jvm2
[Tue Jan 09 09:15:20 2007] [30638:14016] [debug] service::jk_lb_worker.c
(860): service worker=jvm2 route=jvm2
[Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
ajp_get_endpoint::jk_ajp_common.c (2315): acquired connection pool slot=0
[Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
ajp_marshal_into_msgb::jk_ajp_common.c (548): ajp marshaling done
[Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
ajp_service::jk_ajp_common.c (1771): processing jvm2 with 1 retries
[Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (893): sending to ajp13
pos=4 len=956 max=8192
....
[Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
ajp_send_request::jk_ajp_common.c (1273): request body to send 0 - request
body to resend 0
[Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
ajp_connection_tcp_get_message::jk_ajp_common.c (1029): received from ajp13
pos=0 len=150 max=8192
....
[Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
ajp_unmarshal_response::jk_ajp_common.c (603): status = 200
[Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
ajp_unmarshal_response::jk_ajp_common.c (610): Number of headers is = 3
[Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
ajp_unmarshal_response::jk_ajp_common.c (666): Header[0] [Set-Cookie] =
[JSESSIONID=9CF6BCE52886C82E777E1F76917DDCB4.jvm1; Path=/]
[Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
ajp_unmarshal_response::jk_ajp_common.c (666): Header[1] [Content-Type] =
[text/html;charset=ISO-8859-1]
[Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
ajp_unmarshal_response::jk_ajp_common.c (666): Header[2] [Content-Length] =
[62]
[Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
ajp_connection_tcp_get_message::jk_ajp_common.c (1029): received from ajp13
pos=0 len=66 max=8192
....
[Tue Jan 09 09:15:20 2007] [30638:14016] [debug] ws_write::mod_jk.c (436):
written 62 out of 62
[Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
ajp_connection_tcp_get_message::jk_ajp_common.c (1029): received from ajp13
pos=0 len=2 max=8192
[Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
ajp_connection_tcp_get_message::jk_ajp_common.c (1029): 0000 05 01 00 00
00 00 00 00 00 00 00 00 00 00 00 00 - ................
[Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
ajp_process_callback::jk_ajp_common.c (1491): AJP13 protocol: Reuse is OK
[Tue Jan 09 09:15:20 2007] [30638:14016] [debug] ajp_done::jk_ajp_common.c
(2258): recycling connection pool slot=0 for worker jvm2
[Tue Jan 09 09:15:20 2007] [30638:14016] [debug] jk_handler::mod_jk.c
(2126): Service finished with status=200 for worker=loadbalancer
_________________________________________________________________
Dave vs. Carl: The Insignificant Championship Series. Who will win?
http://clk.atdmt.com/MSN/go/msnnkwsp0070000001msn/direct/01/?href=http://davevscarl.spaces.live.com/?icid=T001MSN38C07001
---------------------------------------------------------------------
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
Re: Help with Tomcat 5.5 mod_jk 1.2.20 loadbalancing sticky session issue
Posted by Carlos Campos <kl...@hotmail.com>.
Thank You for your quick reply!!
that was it, it works now
Carlos.
----Original Message Follows----
From: Rainer Jung <ra...@kippdata.de>
Reply-To: "Tomcat Users List" <us...@tomcat.apache.org>
To: Tomcat Users List <us...@tomcat.apache.org>
Subject: Re: Help with Tomcat 5.5 mod_jk 1.2.20 loadbalancing sticky session
issue
Date: Tue, 09 Jan 2007 21:58:52 +0100
This one is easy: you've got a twist in the routing config:
mod_jk: jvm1=port 18007, jvm2=port 18009
Tomcat: jvm1=port 18009, jvm1=port 18007
Hope this helps, have fun with mod_jk :)
Rainer
Carlos Campos schrieb:
> Hi,
>
> I have installed one instance of apache 2.2.3 with mod_jk 1.2.20, two
> instances of tomcat 5.5, and Java 1.5.0
>
> I m trying to set up a loadbalancer that supports sticky sessions.
> However what I m getting when i access the test.jsp via
> (http://somedomain.com/carlos.jsp) round robin hits on the tomcats
> setup, with a new session id being created for each access.
>
> 1st hit: sessionId: 11EB9613AAE1BD6E1903CAFEAD9469C4.jvm1
>
> 2nd hit: sessionId: DAA0ECBF06B2A8C4543BEBF61C2C8787.jvm2
>
> 3rd hit: sessionId: 9CF6BCE52886C82E777E1F76917DDCB4.jvm1
>
> .... and so on
>
> Can anyone point out what I m doing wrong? I m trying to setup the
> system so that the client browser is always sent to the same tomcat
> instance.
> I have tried setting the directive
> "worker.loadbalancer.sticky_session=True" as
> "worker.loadbalancer.sticky_session=1" but I still get the same
> result. I even tried adding: worker.jvm1.domain=jvm1 ,
> worker.jvm2.domain=jvm2. as suggested in some of the threads but that
> didn't help.
>
> Thanks.
>
> Carlos.
>
>
> TEST JSP
> ========
> <%
>
> HttpSession session22 = request.getSession(false);
> if ( session22 != null )
> {
> String id = session22.getId();
> out.println("sessionId: " + id);
> }
> %>
>
>
>
> JAVA VERSION
> ============
> [root@web1 admin]# java -version
> java version "1.5.0_10"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_10-b03)
> Java HotSpot(TM) Server VM (build 1.5.0_10-b03, mixed mode)
>
>
>
> SOME HTTP DETAILS
> =================
>
> [root@web1 bin]# ./httpd -V
> Server version: Apache/2.2.3
> Server built: Dec 18 2006 10:56:49
> Server's Module Magic Number: 20051115:3
> Server loaded: APR 1.2.7, APR-Util 1.2.7
> Compiled using: APR 1.2.7, APR-Util 1.2.7
> Architecture: 32-bit
> Server MPM: Prefork
> threaded: no
> forked: yes (variable process count)
> Server compiled with....
> -D APACHE_MPM_DIR="server/mpm/prefork"
> -D APR_HAS_SENDFILE
> -D APR_HAS_MMAP
> -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
> -D APR_USE_SYSVSEM_SERIALIZE
> -D APR_USE_PTHREAD_SERIALIZE
> -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
> -D APR_HAS_OTHER_CHILD
> -D AP_HAVE_RELIABLE_PIPED_LOGS
> -D DYNAMIC_MODULE_LIMIT=128
> -D HTTPD_ROOT="/usr/httpd"
> -D SUEXEC_BIN="/usr/httpd/bin/suexec"
> -D DEFAULT_PIDLOG="logs/httpd.pid"
> -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
> -D DEFAULT_LOCKFILE="logs/accept.lock"
> -D DEFAULT_ERRORLOG="logs/error_log"
> -D AP_TYPES_CONFIG_FILE="conf/mime.types"
> -D SERVER_CONFIG_FILE="conf/httpd.conf"
>
>
>
> [root@web1 bin]# ./httpd -l
> Compiled in modules:
> core.c
> mod_authn_file.c
> mod_authn_default.c
> mod_authz_host.c
> mod_authz_groupfile.c
> mod_authz_user.c
> mod_authz_default.c
> mod_auth_basic.c
> mod_include.c
> mod_filter.c
> mod_log_config.c
> mod_env.c
> mod_setenvif.c
> mod_ssl.c
> prefork.c
> http_core.c
> mod_mime.c
> mod_status.c
> mod_autoindex.c
> mod_asis.c
> mod_cgi.c
> mod_negotiation.c
> mod_dir.c
> mod_actions.c
> mod_userdir.c
> mod_alias.c
> mod_so.c
>
>
>
> HTTPD.CONF
> ==========
>
> <IfDefine mod_jk_module>
> LoadModule jk_module modules/mod_jk.so
> </IfDefine>
>
> <IfModule mod_jk.c>
> JkWorkersFile /usr/httpd/conf/extra/workers.properties
> JkLogFile /usr/httpd/logs/mod_jk.log
> JkLogLevel debug
> JkMount /*.jsp loadbalancer
> JkMount /servlet/* loadbalancer
> JkMount /*.xml loadbalancer
> JkMount /jkmanager/* jkstatus
> JkShmFile /usr/httpd/logs/jk.shm
> AddType text/xml .xml
> </IfModule>
>
>
> WORKERS.PROPERTIES
> ==================
>
> worker.list=loadbalancer,jkstatus
> worker.maintain=60
>
> worker.jvm1.port=18007
> worker.jvm1.host=localhost
> worker.jvm1.type=ajp13
> worker.jvm1.lbfactor=1
> worker.jvm1.socket_timeout=1
> worker.jvm1.retries=1
> worker.jvm1.domain=jvm1 (I even tried this to see if it would help, but
> it didn't -- removed)
>
> worker.jvm2.port=18009
> worker.jvm2.host=localhost
> worker.jvm2.type=ajp13
> worker.jvm2.lbfactor=1
> worker.jvm2.socket_timeout=1
> worker.jvm2.retries=1
> worker.jvm2.domain=jvm2 (I even tried this to see if it would help, but
> it didn't -- removed)
>
> worker.jkstatus.type=status
> worker.loadbalancer.type=lb
> worker.loadbalancer.balance_workers=jvm1,jvm2
> worker.loadbalancer.sticky_session=True
> worker.loadbalancer.sticky_session_force=False
> worker.loadbalancer.method=B
>
>
>
> TOMCAT1 SERVER.XML (the diff vs the orginal config file)
> ==============================
> <Connector port="18009" enableLookups="false" redirectPort="8443"
> protocol="AJP/1.3" />
> <Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
>
>
> TOMCAT2 SERVER.XML (the diff vs the orginal config file)
> ==============================
>
> <Connector port="18007" enableLookups="false" redirectPort="8443"
> protocol="AJP/1.3" />
> <Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm2">
>
>
> MOD_JK.LOG
> ===========
>
>
> 1st access to jsp (http://domainame.com/carlos.jsp) =====> sessionId:
> 11EB9613AAE1BD6E1903CAFEAD9469C4.jvm1
> *****************
>
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> map_uri_to_worker::jk_uri_worker_map.c (575): Attempting to map URI
> '/carlos.jsp' from 4 maps
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> map_uri_to_worker::jk_uri_worker_map.c (587): Attempting to map context
> URI '/jkmanager/*=jkstatus' source 'JkMount'
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> map_uri_to_worker::jk_uri_worker_map.c (587): Attempting to map context
> URI '/servlet/*=loadbalancer' sour ce 'JkMount'
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> map_uri_to_worker::jk_uri_worker_map.c (587): Attempting to map context
> URI '/*.jsp=loadbalancer' source ' JkMount'
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> map_uri_to_worker::jk_uri_worker_map.c (602): Found a wildchar match
> '/*.jsp=loadbalancer'
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug] jk_handler::mod_jk.c
> (1999): Into handler jakarta-servlet worker=loadbalancer r->proxyreq=0
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> wc_get_worker_for_name::jk_worker.c (114): found a worker loadbalancer
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> wc_maintain::jk_worker.c (321): Maintaining worker loadbalancer
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> wc_get_name_for_type::jk_worker.c (290): Found worker type 'lb'
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> init_ws_service::mod_jk.c (584): Service protocol=HTTP/1.1 method=GET
> host=(null) addr=69.230.90.148 name= web1.somedomain.com port=80
> auth=(null) user=(null) laddr=x.x.209.93 raddr=69.230.90.148
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug] service::jk_lb_worker.c
> (840): service sticky_session=1
id='2D2484891C4306E185A372BD9C1CFDAC.jvm2'
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> get_most_suitable_worker::jk_lb_worker.c (733): searching worker for
> partial sessionid 2D2484891C4306E185A 372BD9C1CFDAC.jvm2
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> get_most_suitable_worker::jk_lb_worker.c (741): searching worker for
> session route jvm2
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> get_most_suitable_worker::jk_lb_worker.c (754): found worker jvm2 (jvm2)
> for route jvm2 and partial sessio nid
> 2D2484891C4306E185A372BD9C1CFDAC.jvm2
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug] service::jk_lb_worker.c
> (860): service worker=jvm2 route=jvm2
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> ajp_get_endpoint::jk_ajp_common.c (2315): acquired connection pool slot=0
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> ajp_marshal_into_msgb::jk_ajp_common.c (548): ajp marshaling done
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> ajp_service::jk_ajp_common.c (1771): processing jvm2 with 1 retries
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> ajp_connection_tcp_send_message::jk_ajp_common.c (893): sending to ajp13
> pos=4 len=956 max=8192
> ....
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> ajp_unmarshal_response::jk_ajp_common.c (603): status = 200
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> ajp_unmarshal_response::jk_ajp_common.c (610): Number of headers is = 3
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> ajp_unmarshal_response::jk_ajp_common.c (666): Header[0] [Set-Cookie] =
> [JSESSIONID=11EB9613AAE1BD6E1903CA FEAD9469C4.jvm1; Path=/]
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> ajp_unmarshal_response::jk_ajp_common.c (666): Header[1] [Content-Type]
> = [text/html;charset=ISO-8859-1]
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> ajp_unmarshal_response::jk_ajp_common.c (666): Header[2]
> [Content-Length] = [62]
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> ajp_connection_tcp_get_message::jk_ajp_common.c (1029): received from
> ajp13 pos=0 len=66 max=8192
> ....
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug] ws_write::mod_jk.c
> (436): written 62 out of 62
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> ajp_connection_tcp_get_message::jk_ajp_common.c (1029): received from
> ajp13 pos=0 len=2 max=8192
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> ajp_connection_tcp_get_message::jk_ajp_common.c (1029): 0000 05 01 00
> 00 00 00 00 00 00 00 00 00 00 00 00 00 - ................
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> ajp_process_callback::jk_ajp_common.c (1491): AJP13 protocol: Reuse is OK
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> ajp_done::jk_ajp_common.c (2258): recycling connection pool slot=0 for
> worker jvm2
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug] jk_handler::mod_jk.c
> (2126): Service finished with status=200 for worker=loadbalancer
>
> 2nd access to same jsp (http://domainame.com/carlos.jsp) =======>
> sessionId: DAA0ECBF06B2A8C4543BEBF61C2C8787.jvm2
> **********************
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> map_uri_to_worker::jk_uri_worker_map.c (575): Attempting to map URI
> '/carlos.jsp' from 4 maps
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> map_uri_to_worker::jk_uri_worker_map.c (587): Attempting to map context
> URI '/jkmanager/*=jkstatus' source 'JkMount'
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> map_uri_to_worker::jk_uri_worker_map.c (587): Attempting to map context
> URI '/servlet/*=loadbalancer' source 'JkMount'
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> map_uri_to_worker::jk_uri_worker_map.c (587): Attempting to map context
> URI '/*.jsp=loadbalancer' source 'JkMount'
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> map_uri_to_worker::jk_uri_worker_map.c (602): Found a wildchar match
> '/*.jsp=loadbalancer'
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug] jk_handler::mod_jk.c
> (1999): Into handler jakarta-servlet worker=loadbalancer r->proxyreq=0
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> wc_get_worker_for_name::jk_worker.c (114): found a worker loadbalancer
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> wc_maintain::jk_worker.c (321): Maintaining worker loadbalancer
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> maintain_workers::jk_lb_worker.c (509): decay with 2^7
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> wc_get_name_for_type::jk_worker.c (290): Found worker type 'lb'
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> init_ws_service::mod_jk.c (584): Service protocol=HTTP/1.1 method=GET
> host=(null) addr=69.230.90.148 name=web1.somedomain.com port=80
> auth=(null) user=(null) laddr=x.x.209.93 raddr=69.230.90.148
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug] service::jk_lb_worker.c
> (840): service sticky_session=1
id='11EB9613AAE1BD6E1903CAFEAD9469C4.jvm1'
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> get_most_suitable_worker::jk_lb_worker.c (733): searching worker for
> partial sessionid 11EB9613AAE1BD6E1903CAFEAD9469C4.jvm1
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> get_most_suitable_worker::jk_lb_worker.c (741): searching worker for
> session route jvm1
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> get_most_suitable_worker::jk_lb_worker.c (754): found worker jvm1 (jvm1)
> for route jvm1 and partial sessionid
11EB9613AAE1BD6E1903CAFEAD9469C4.jvm1
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug] service::jk_lb_worker.c
> (860): service worker=jvm1 route=jvm1
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> ajp_get_endpoint::jk_ajp_common.c (2315): acquired connection pool slot=0
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> ajp_marshal_into_msgb::jk_ajp_common.c (548): ajp marshaling done
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> ajp_service::jk_ajp_common.c (1771): processing jvm1 with 1 retries
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> jk_open_socket::jk_connect.c (335): socket TCP_NODELAY set to On
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> jk_open_socket::jk_connect.c (398): timeout 1 set for socket=20
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> jk_open_socket::jk_connect.c (433): trying to connect socket 20 to
> 127.0.0.1:18007
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> jk_open_socket::jk_connect.c (459): socket 20 connected to
127.0.0.1:18007
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> ajp_connect_to_endpoint::jk_ajp_common.c (847): Connected socket 20 to
> (127.0.0.1:18007)
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> ajp_connection_tcp_send_message::jk_ajp_common.c (893): sending to ajp13
> pos=4 len=956 max=8192
> ....
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> ajp_send_request::jk_ajp_common.c (1273): request body to send 0 -
> request body to resend 0
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> ajp_connection_tcp_get_message::jk_ajp_common.c (1029): received from
> ajp13 pos=0 len=150 max=8192
> ....
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> ajp_unmarshal_response::jk_ajp_common.c (603): status = 200
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> ajp_unmarshal_response::jk_ajp_common.c (610): Number of headers is = 3
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> ajp_unmarshal_response::jk_ajp_common.c (666): Header[0] [Set-Cookie] =
> [JSESSIONID=DAA0ECBF06B2A8C4543BEBF61C2C8787.jvm2; Path=/]
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> ajp_unmarshal_response::jk_ajp_common.c (666): Header[1] [Content-Type]
> = [text/html;charset=ISO-8859-1]
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> ajp_unmarshal_response::jk_ajp_common.c (666): Header[2]
> [Content-Length] = [62]
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> ajp_connection_tcp_get_message::jk_ajp_common.c (1029): received from
> ajp13 pos=0 len=66 max=8192
> ....
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug] ws_write::mod_jk.c
> (436): written 62 out of 62
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> ajp_connection_tcp_get_message::jk_ajp_common.c (1029): received from
> ajp13 pos=0 len=2 max=8192
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> ajp_connection_tcp_get_message::jk_ajp_common.c (1029): 0000 05 01 00
> 00 00 00 00 00 00 00 00 00 00 00 00 00 - ................
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> ajp_process_callback::jk_ajp_common.c (1491): AJP13 protocol: Reuse is OK
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> ajp_done::jk_ajp_common.c (2258): recycling connection pool slot=0 for
> worker jvm1
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug] jk_handler::mod_jk.c
> (2126): Service finished with status=200 for worker=loadbalancer
>
> 3rd access to same jsp (http://domainame.com/carlos.jsp) ======>
> sessionId: 9CF6BCE52886C82E777E1F76917DDCB4.jvm1
>
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> map_uri_to_worker::jk_uri_worker_map.c (575): Attempting to map URI
> '/carlos.jsp' from 4 maps
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> map_uri_to_worker::jk_uri_worker_map.c (587): Attempting to map context
> URI '/jkmanager/*=jkstatus' source 'JkMount'
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> map_uri_to_worker::jk_uri_worker_map.c (587): Attempting to map context
> URI '/servlet/*=loadbalancer' source 'JkMount'
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> map_uri_to_worker::jk_uri_worker_map.c (587): Attempting to map context
> URI '/*.jsp=loadbalancer' source 'JkMount'
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> map_uri_to_worker::jk_uri_worker_map.c (602): Found a wildchar match
> '/*.jsp=loadbalancer'
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug] jk_handler::mod_jk.c
> (1999): Into handler jakarta-servlet worker=loadbalancer r->proxyreq=0
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> wc_get_worker_for_name::jk_worker.c (114): found a worker loadbalancer
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> wc_maintain::jk_worker.c (321): Maintaining worker loadbalancer
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> maintain_workers::jk_lb_worker.c (509): decay with 2^3
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> wc_get_name_for_type::jk_worker.c (290): Found worker type 'lb'
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> init_ws_service::mod_jk.c (584): Service protocol=HTTP/1.1 method=GET
> host=(null) addr=69.230.90.148 name=web1.somedomain.com port=80
> auth=(null) user=(null) laddr=111.111.111.111 raddr=69.230.90.148
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug] service::jk_lb_worker.c
> (840): service sticky_session=1
id='DAA0ECBF06B2A8C4543BEBF61C2C8787.jvm2'
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> get_most_suitable_worker::jk_lb_worker.c (733): searching worker for
> partial sessionid DAA0ECBF06B2A8C4543BEBF61C2C8787.jvm2
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> get_most_suitable_worker::jk_lb_worker.c (741): searching worker for
> session route jvm2
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> get_most_suitable_worker::jk_lb_worker.c (754): found worker jvm2 (jvm2)
> for route jvm2 and partial sessionid
DAA0ECBF06B2A8C4543BEBF61C2C8787.jvm2
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug] service::jk_lb_worker.c
> (860): service worker=jvm2 route=jvm2
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> ajp_get_endpoint::jk_ajp_common.c (2315): acquired connection pool slot=0
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> ajp_marshal_into_msgb::jk_ajp_common.c (548): ajp marshaling done
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> ajp_service::jk_ajp_common.c (1771): processing jvm2 with 1 retries
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> ajp_connection_tcp_send_message::jk_ajp_common.c (893): sending to ajp13
> pos=4 len=956 max=8192
> ....
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> ajp_send_request::jk_ajp_common.c (1273): request body to send 0 -
> request body to resend 0
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> ajp_connection_tcp_get_message::jk_ajp_common.c (1029): received from
> ajp13 pos=0 len=150 max=8192
> ....
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> ajp_unmarshal_response::jk_ajp_common.c (603): status = 200
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> ajp_unmarshal_response::jk_ajp_common.c (610): Number of headers is = 3
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> ajp_unmarshal_response::jk_ajp_common.c (666): Header[0] [Set-Cookie] =
> [JSESSIONID=9CF6BCE52886C82E777E1F76917DDCB4.jvm1; Path=/]
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> ajp_unmarshal_response::jk_ajp_common.c (666): Header[1] [Content-Type]
> = [text/html;charset=ISO-8859-1]
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> ajp_unmarshal_response::jk_ajp_common.c (666): Header[2]
> [Content-Length] = [62]
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> ajp_connection_tcp_get_message::jk_ajp_common.c (1029): received from
> ajp13 pos=0 len=66 max=8192
> ....
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug] ws_write::mod_jk.c
> (436): written 62 out of 62
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> ajp_connection_tcp_get_message::jk_ajp_common.c (1029): received from
> ajp13 pos=0 len=2 max=8192
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> ajp_connection_tcp_get_message::jk_ajp_common.c (1029): 0000 05 01 00
> 00 00 00 00 00 00 00 00 00 00 00 00 00 - ................
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> ajp_process_callback::jk_ajp_common.c (1491): AJP13 protocol: Reuse is OK
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> ajp_done::jk_ajp_common.c (2258): recycling connection pool slot=0 for
> worker jvm2
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug] jk_handler::mod_jk.c
> (2126): Service finished with status=200 for worker=loadbalancer
>
> _________________________________________________________________
> Dave vs. Carl: The Insignificant Championship Series. Who will win?
>
http://clk.atdmt.com/MSN/go/msnnkwsp0070000001msn/direct/01/?href=http://davevscarl.spaces.live.com/?icid=T001MSN38C07001
>
>
>
> ---------------------------------------------------------------------
> 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
_________________________________________________________________
Your Hotmail address already works to sign into Windows Live Messenger! Get
it now
http://clk.atdmt.com/MSN/go/msnnkwme0020000001msn/direct/01/?href=http://get.live.com/messenger/overview
---------------------------------------------------------------------
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
urgent : unsubscribe please
Posted by Christian Mennequin <ch...@barclays.fr>.
Cordialement,
Christian Mennequin
Barclays IRCB / DI
183 avenue Daumesnil 75575 Paris Cedex 12
Phone : 0033 (0)1.55.78.43.05
Email : christian.mennequin@barclays.fr
Rainer Jung <ra...@kippdata.de>
09/01/2007 21:58
Veuillez répondre à
"Tomcat Users List" <us...@tomcat.apache.org>
A
Tomcat Users List <us...@tomcat.apache.org>
cc
Objet
Re: Help with Tomcat 5.5 mod_jk 1.2.20 loadbalancing sticky session issue
This one is easy: you've got a twist in the routing config:
mod_jk: jvm1=port 18007, jvm2=port 18009
Tomcat: jvm1=port 18009, jvm1=port 18007
Hope this helps, have fun with mod_jk :)
Rainer
Carlos Campos schrieb:
> Hi,
>
> I have installed one instance of apache 2.2.3 with mod_jk 1.2.20, two
> instances of tomcat 5.5, and Java 1.5.0
>
> I m trying to set up a loadbalancer that supports sticky sessions.
> However what I m getting when i access the test.jsp via
> (http://somedomain.com/carlos.jsp) round robin hits on the tomcats
> setup, with a new session id being created for each access.
>
> 1st hit: sessionId: 11EB9613AAE1BD6E1903CAFEAD9469C4.jvm1
>
> 2nd hit: sessionId: DAA0ECBF06B2A8C4543BEBF61C2C8787.jvm2
>
> 3rd hit: sessionId: 9CF6BCE52886C82E777E1F76917DDCB4.jvm1
>
> .... and so on
>
> Can anyone point out what I m doing wrong? I m trying to setup the
> system so that the client browser is always sent to the same tomcat
> instance.
> I have tried setting the directive
> "worker.loadbalancer.sticky_session=True" as
> "worker.loadbalancer.sticky_session=1" but I still get the same
> result. I even tried adding: worker.jvm1.domain=jvm1 ,
> worker.jvm2.domain=jvm2. as suggested in some of the threads but that
> didn't help.
>
> Thanks.
>
> Carlos.
>
>
> TEST JSP
> ========
> <%
>
> HttpSession session22 = request.getSession(false);
> if ( session22 != null )
> {
> String id = session22.getId();
> out.println("sessionId: " + id);
> }
> %>
>
>
>
> JAVA VERSION
> ============
> [root@web1 admin]# java -version
> java version "1.5.0_10"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_10-b03)
> Java HotSpot(TM) Server VM (build 1.5.0_10-b03, mixed mode)
>
>
>
> SOME HTTP DETAILS
> =================
>
> [root@web1 bin]# ./httpd -V
> Server version: Apache/2.2.3
> Server built: Dec 18 2006 10:56:49
> Server's Module Magic Number: 20051115:3
> Server loaded: APR 1.2.7, APR-Util 1.2.7
> Compiled using: APR 1.2.7, APR-Util 1.2.7
> Architecture: 32-bit
> Server MPM: Prefork
> threaded: no
> forked: yes (variable process count)
> Server compiled with....
> -D APACHE_MPM_DIR="server/mpm/prefork"
> -D APR_HAS_SENDFILE
> -D APR_HAS_MMAP
> -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
> -D APR_USE_SYSVSEM_SERIALIZE
> -D APR_USE_PTHREAD_SERIALIZE
> -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
> -D APR_HAS_OTHER_CHILD
> -D AP_HAVE_RELIABLE_PIPED_LOGS
> -D DYNAMIC_MODULE_LIMIT=128
> -D HTTPD_ROOT="/usr/httpd"
> -D SUEXEC_BIN="/usr/httpd/bin/suexec"
> -D DEFAULT_PIDLOG="logs/httpd.pid"
> -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
> -D DEFAULT_LOCKFILE="logs/accept.lock"
> -D DEFAULT_ERRORLOG="logs/error_log"
> -D AP_TYPES_CONFIG_FILE="conf/mime.types"
> -D SERVER_CONFIG_FILE="conf/httpd.conf"
>
>
>
> [root@web1 bin]# ./httpd -l
> Compiled in modules:
> core.c
> mod_authn_file.c
> mod_authn_default.c
> mod_authz_host.c
> mod_authz_groupfile.c
> mod_authz_user.c
> mod_authz_default.c
> mod_auth_basic.c
> mod_include.c
> mod_filter.c
> mod_log_config.c
> mod_env.c
> mod_setenvif.c
> mod_ssl.c
> prefork.c
> http_core.c
> mod_mime.c
> mod_status.c
> mod_autoindex.c
> mod_asis.c
> mod_cgi.c
> mod_negotiation.c
> mod_dir.c
> mod_actions.c
> mod_userdir.c
> mod_alias.c
> mod_so.c
>
>
>
> HTTPD.CONF
> ==========
>
> <IfDefine mod_jk_module>
> LoadModule jk_module modules/mod_jk.so
> </IfDefine>
>
> <IfModule mod_jk.c>
> JkWorkersFile /usr/httpd/conf/extra/workers.properties
> JkLogFile /usr/httpd/logs/mod_jk.log
> JkLogLevel debug
> JkMount /*.jsp loadbalancer
> JkMount /servlet/* loadbalancer
> JkMount /*.xml loadbalancer
> JkMount /jkmanager/* jkstatus
> JkShmFile /usr/httpd/logs/jk.shm
> AddType text/xml .xml
> </IfModule>
>
>
> WORKERS.PROPERTIES
> ==================
>
> worker.list=loadbalancer,jkstatus
> worker.maintain=60
>
> worker.jvm1.port=18007
> worker.jvm1.host=localhost
> worker.jvm1.type=ajp13
> worker.jvm1.lbfactor=1
> worker.jvm1.socket_timeout=1
> worker.jvm1.retries=1
> worker.jvm1.domain=jvm1 (I even tried this to see if it would help, but
> it didn't -- removed)
>
> worker.jvm2.port=18009
> worker.jvm2.host=localhost
> worker.jvm2.type=ajp13
> worker.jvm2.lbfactor=1
> worker.jvm2.socket_timeout=1
> worker.jvm2.retries=1
> worker.jvm2.domain=jvm2 (I even tried this to see if it would help, but
> it didn't -- removed)
>
> worker.jkstatus.type=status
> worker.loadbalancer.type=lb
> worker.loadbalancer.balance_workers=jvm1,jvm2
> worker.loadbalancer.sticky_session=True
> worker.loadbalancer.sticky_session_force=False
> worker.loadbalancer.method=B
>
>
>
> TOMCAT1 SERVER.XML (the diff vs the orginal config file)
> ==============================
> <Connector port="18009" enableLookups="false" redirectPort="8443"
> protocol="AJP/1.3" />
> <Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
>
>
> TOMCAT2 SERVER.XML (the diff vs the orginal config file)
> ==============================
>
> <Connector port="18007" enableLookups="false" redirectPort="8443"
> protocol="AJP/1.3" />
> <Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm2">
>
>
> MOD_JK.LOG
> ===========
>
>
> 1st access to jsp (http://domainame.com/carlos.jsp) =====> sessionId:
> 11EB9613AAE1BD6E1903CAFEAD9469C4.jvm1
> *****************
>
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> map_uri_to_worker::jk_uri_worker_map.c (575): Attempting to map URI
> '/carlos.jsp' from 4 maps
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> map_uri_to_worker::jk_uri_worker_map.c (587): Attempting to map context
> URI '/jkmanager/*=jkstatus' source 'JkMount'
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> map_uri_to_worker::jk_uri_worker_map.c (587): Attempting to map context
> URI '/servlet/*=loadbalancer' sour ce 'JkMount'
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> map_uri_to_worker::jk_uri_worker_map.c (587): Attempting to map context
> URI '/*.jsp=loadbalancer' source ' JkMount'
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> map_uri_to_worker::jk_uri_worker_map.c (602): Found a wildchar match
> '/*.jsp=loadbalancer'
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug] jk_handler::mod_jk.c
> (1999): Into handler jakarta-servlet worker=loadbalancer r->proxyreq=0
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> wc_get_worker_for_name::jk_worker.c (114): found a worker loadbalancer
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> wc_maintain::jk_worker.c (321): Maintaining worker loadbalancer
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> wc_get_name_for_type::jk_worker.c (290): Found worker type 'lb'
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> init_ws_service::mod_jk.c (584): Service protocol=HTTP/1.1 method=GET
> host=(null) addr=69.230.90.148 name= web1.somedomain.com port=80
> auth=(null) user=(null) laddr=x.x.209.93 raddr=69.230.90.148
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug] service::jk_lb_worker.c
> (840): service sticky_session=1
id='2D2484891C4306E185A372BD9C1CFDAC.jvm2'
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> get_most_suitable_worker::jk_lb_worker.c (733): searching worker for
> partial sessionid 2D2484891C4306E185A 372BD9C1CFDAC.jvm2
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> get_most_suitable_worker::jk_lb_worker.c (741): searching worker for
> session route jvm2
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> get_most_suitable_worker::jk_lb_worker.c (754): found worker jvm2 (jvm2)
> for route jvm2 and partial sessio nid
> 2D2484891C4306E185A372BD9C1CFDAC.jvm2
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug] service::jk_lb_worker.c
> (860): service worker=jvm2 route=jvm2
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> ajp_get_endpoint::jk_ajp_common.c (2315): acquired connection pool
slot=0
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> ajp_marshal_into_msgb::jk_ajp_common.c (548): ajp marshaling done
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> ajp_service::jk_ajp_common.c (1771): processing jvm2 with 1 retries
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> ajp_connection_tcp_send_message::jk_ajp_common.c (893): sending to ajp13
> pos=4 len=956 max=8192
> ....
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> ajp_unmarshal_response::jk_ajp_common.c (603): status = 200
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> ajp_unmarshal_response::jk_ajp_common.c (610): Number of headers is = 3
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> ajp_unmarshal_response::jk_ajp_common.c (666): Header[0] [Set-Cookie] =
> [JSESSIONID=11EB9613AAE1BD6E1903CA FEAD9469C4.jvm1; Path=/]
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> ajp_unmarshal_response::jk_ajp_common.c (666): Header[1] [Content-Type]
> = [text/html;charset=ISO-8859-1]
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> ajp_unmarshal_response::jk_ajp_common.c (666): Header[2]
> [Content-Length] = [62]
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> ajp_connection_tcp_get_message::jk_ajp_common.c (1029): received from
> ajp13 pos=0 len=66 max=8192
> ....
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug] ws_write::mod_jk.c
> (436): written 62 out of 62
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> ajp_connection_tcp_get_message::jk_ajp_common.c (1029): received from
> ajp13 pos=0 len=2 max=8192
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> ajp_connection_tcp_get_message::jk_ajp_common.c (1029): 0000 05 01 00
> 00 00 00 00 00 00 00 00 00 00 00 00 00 - ................
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> ajp_process_callback::jk_ajp_common.c (1491): AJP13 protocol: Reuse is
OK
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> ajp_done::jk_ajp_common.c (2258): recycling connection pool slot=0 for
> worker jvm2
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug] jk_handler::mod_jk.c
> (2126): Service finished with status=200 for worker=loadbalancer
>
> 2nd access to same jsp (http://domainame.com/carlos.jsp) =======>
> sessionId: DAA0ECBF06B2A8C4543BEBF61C2C8787.jvm2
> **********************
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> map_uri_to_worker::jk_uri_worker_map.c (575): Attempting to map URI
> '/carlos.jsp' from 4 maps
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> map_uri_to_worker::jk_uri_worker_map.c (587): Attempting to map context
> URI '/jkmanager/*=jkstatus' source 'JkMount'
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> map_uri_to_worker::jk_uri_worker_map.c (587): Attempting to map context
> URI '/servlet/*=loadbalancer' source 'JkMount'
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> map_uri_to_worker::jk_uri_worker_map.c (587): Attempting to map context
> URI '/*.jsp=loadbalancer' source 'JkMount'
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> map_uri_to_worker::jk_uri_worker_map.c (602): Found a wildchar match
> '/*.jsp=loadbalancer'
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug] jk_handler::mod_jk.c
> (1999): Into handler jakarta-servlet worker=loadbalancer r->proxyreq=0
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> wc_get_worker_for_name::jk_worker.c (114): found a worker loadbalancer
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> wc_maintain::jk_worker.c (321): Maintaining worker loadbalancer
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> maintain_workers::jk_lb_worker.c (509): decay with 2^7
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> wc_get_name_for_type::jk_worker.c (290): Found worker type 'lb'
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> init_ws_service::mod_jk.c (584): Service protocol=HTTP/1.1 method=GET
> host=(null) addr=69.230.90.148 name=web1.somedomain.com port=80
> auth=(null) user=(null) laddr=x.x.209.93 raddr=69.230.90.148
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug] service::jk_lb_worker.c
> (840): service sticky_session=1
id='11EB9613AAE1BD6E1903CAFEAD9469C4.jvm1'
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> get_most_suitable_worker::jk_lb_worker.c (733): searching worker for
> partial sessionid 11EB9613AAE1BD6E1903CAFEAD9469C4.jvm1
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> get_most_suitable_worker::jk_lb_worker.c (741): searching worker for
> session route jvm1
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> get_most_suitable_worker::jk_lb_worker.c (754): found worker jvm1 (jvm1)
> for route jvm1 and partial sessionid
11EB9613AAE1BD6E1903CAFEAD9469C4.jvm1
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug] service::jk_lb_worker.c
> (860): service worker=jvm1 route=jvm1
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> ajp_get_endpoint::jk_ajp_common.c (2315): acquired connection pool
slot=0
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> ajp_marshal_into_msgb::jk_ajp_common.c (548): ajp marshaling done
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> ajp_service::jk_ajp_common.c (1771): processing jvm1 with 1 retries
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> jk_open_socket::jk_connect.c (335): socket TCP_NODELAY set to On
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> jk_open_socket::jk_connect.c (398): timeout 1 set for socket=20
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> jk_open_socket::jk_connect.c (433): trying to connect socket 20 to
> 127.0.0.1:18007
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> jk_open_socket::jk_connect.c (459): socket 20 connected to
127.0.0.1:18007
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> ajp_connect_to_endpoint::jk_ajp_common.c (847): Connected socket 20 to
> (127.0.0.1:18007)
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> ajp_connection_tcp_send_message::jk_ajp_common.c (893): sending to ajp13
> pos=4 len=956 max=8192
> ....
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> ajp_send_request::jk_ajp_common.c (1273): request body to send 0 -
> request body to resend 0
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> ajp_connection_tcp_get_message::jk_ajp_common.c (1029): received from
> ajp13 pos=0 len=150 max=8192
> ....
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> ajp_unmarshal_response::jk_ajp_common.c (603): status = 200
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> ajp_unmarshal_response::jk_ajp_common.c (610): Number of headers is = 3
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> ajp_unmarshal_response::jk_ajp_common.c (666): Header[0] [Set-Cookie] =
> [JSESSIONID=DAA0ECBF06B2A8C4543BEBF61C2C8787.jvm2; Path=/]
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> ajp_unmarshal_response::jk_ajp_common.c (666): Header[1] [Content-Type]
> = [text/html;charset=ISO-8859-1]
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> ajp_unmarshal_response::jk_ajp_common.c (666): Header[2]
> [Content-Length] = [62]
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> ajp_connection_tcp_get_message::jk_ajp_common.c (1029): received from
> ajp13 pos=0 len=66 max=8192
> ....
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug] ws_write::mod_jk.c
> (436): written 62 out of 62
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> ajp_connection_tcp_get_message::jk_ajp_common.c (1029): received from
> ajp13 pos=0 len=2 max=8192
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> ajp_connection_tcp_get_message::jk_ajp_common.c (1029): 0000 05 01 00
> 00 00 00 00 00 00 00 00 00 00 00 00 00 - ................
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> ajp_process_callback::jk_ajp_common.c (1491): AJP13 protocol: Reuse is
OK
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> ajp_done::jk_ajp_common.c (2258): recycling connection pool slot=0 for
> worker jvm1
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug] jk_handler::mod_jk.c
> (2126): Service finished with status=200 for worker=loadbalancer
>
> 3rd access to same jsp (http://domainame.com/carlos.jsp) ======>
> sessionId: 9CF6BCE52886C82E777E1F76917DDCB4.jvm1
>
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> map_uri_to_worker::jk_uri_worker_map.c (575): Attempting to map URI
> '/carlos.jsp' from 4 maps
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> map_uri_to_worker::jk_uri_worker_map.c (587): Attempting to map context
> URI '/jkmanager/*=jkstatus' source 'JkMount'
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> map_uri_to_worker::jk_uri_worker_map.c (587): Attempting to map context
> URI '/servlet/*=loadbalancer' source 'JkMount'
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> map_uri_to_worker::jk_uri_worker_map.c (587): Attempting to map context
> URI '/*.jsp=loadbalancer' source 'JkMount'
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> map_uri_to_worker::jk_uri_worker_map.c (602): Found a wildchar match
> '/*.jsp=loadbalancer'
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug] jk_handler::mod_jk.c
> (1999): Into handler jakarta-servlet worker=loadbalancer r->proxyreq=0
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> wc_get_worker_for_name::jk_worker.c (114): found a worker loadbalancer
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> wc_maintain::jk_worker.c (321): Maintaining worker loadbalancer
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> maintain_workers::jk_lb_worker.c (509): decay with 2^3
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> wc_get_name_for_type::jk_worker.c (290): Found worker type 'lb'
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> init_ws_service::mod_jk.c (584): Service protocol=HTTP/1.1 method=GET
> host=(null) addr=69.230.90.148 name=web1.somedomain.com port=80
> auth=(null) user=(null) laddr=111.111.111.111 raddr=69.230.90.148
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug] service::jk_lb_worker.c
> (840): service sticky_session=1
id='DAA0ECBF06B2A8C4543BEBF61C2C8787.jvm2'
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> get_most_suitable_worker::jk_lb_worker.c (733): searching worker for
> partial sessionid DAA0ECBF06B2A8C4543BEBF61C2C8787.jvm2
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> get_most_suitable_worker::jk_lb_worker.c (741): searching worker for
> session route jvm2
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> get_most_suitable_worker::jk_lb_worker.c (754): found worker jvm2 (jvm2)
> for route jvm2 and partial sessionid
DAA0ECBF06B2A8C4543BEBF61C2C8787.jvm2
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug] service::jk_lb_worker.c
> (860): service worker=jvm2 route=jvm2
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> ajp_get_endpoint::jk_ajp_common.c (2315): acquired connection pool
slot=0
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> ajp_marshal_into_msgb::jk_ajp_common.c (548): ajp marshaling done
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> ajp_service::jk_ajp_common.c (1771): processing jvm2 with 1 retries
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> ajp_connection_tcp_send_message::jk_ajp_common.c (893): sending to ajp13
> pos=4 len=956 max=8192
> ....
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> ajp_send_request::jk_ajp_common.c (1273): request body to send 0 -
> request body to resend 0
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> ajp_connection_tcp_get_message::jk_ajp_common.c (1029): received from
> ajp13 pos=0 len=150 max=8192
> ....
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> ajp_unmarshal_response::jk_ajp_common.c (603): status = 200
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> ajp_unmarshal_response::jk_ajp_common.c (610): Number of headers is = 3
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> ajp_unmarshal_response::jk_ajp_common.c (666): Header[0] [Set-Cookie] =
> [JSESSIONID=9CF6BCE52886C82E777E1F76917DDCB4.jvm1; Path=/]
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> ajp_unmarshal_response::jk_ajp_common.c (666): Header[1] [Content-Type]
> = [text/html;charset=ISO-8859-1]
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> ajp_unmarshal_response::jk_ajp_common.c (666): Header[2]
> [Content-Length] = [62]
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> ajp_connection_tcp_get_message::jk_ajp_common.c (1029): received from
> ajp13 pos=0 len=66 max=8192
> ....
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug] ws_write::mod_jk.c
> (436): written 62 out of 62
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> ajp_connection_tcp_get_message::jk_ajp_common.c (1029): received from
> ajp13 pos=0 len=2 max=8192
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> ajp_connection_tcp_get_message::jk_ajp_common.c (1029): 0000 05 01 00
> 00 00 00 00 00 00 00 00 00 00 00 00 00 - ................
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> ajp_process_callback::jk_ajp_common.c (1491): AJP13 protocol: Reuse is
OK
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> ajp_done::jk_ajp_common.c (2258): recycling connection pool slot=0 for
> worker jvm2
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug] jk_handler::mod_jk.c
> (2126): Service finished with status=200 for worker=loadbalancer
>
> _________________________________________________________________
> Dave vs. Carl: The Insignificant Championship Series. Who will win?
>
http://clk.atdmt.com/MSN/go/msnnkwsp0070000001msn/direct/01/?href=http://davevscarl.spaces.live.com/?icid=T001MSN38C07001
>
>
>
> ---------------------------------------------------------------------
> 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
Ce courriel et ses éventuelles pièces attachées sont confidentiels et ne concernent que le destinataire.
Si vous nêtes pas le destinataire ou si vous lavez reçu par erreur, informez en immédiatement lémetteur,
effacez le de votre ordinateur et nen faites aucune copie ni diffusion.
Ceci sapplique à tout ou partie du document ainsi quaux pièces attachées.
La communication à travers le réseau Internet ne présente aucune garantie de sécurité ni de protection
contre les virus. Le groupe Barclays nest pas responsable en cas de perte résultant de laction
dun tiers par des accès non autorisés, par des interventions sur les moyens de communication ou par la
transmission de virus. Barclays se réserve un droit de surveillance sur les réponses qui pourront être
faites à ce message.
Toute information ou opinion, contenue dans ce courriel ou dans ses pièces attachées,
qui serait sans rapport avec lactivité commerciale du groupe Barclays doit être considérée comme
personnelle à lémetteur et nengage en aucune façon le groupe Barclays.
Re: Help with Tomcat 5.5 mod_jk 1.2.20 loadbalancing sticky session
issue
Posted by Rainer Jung <ra...@kippdata.de>.
This one is easy: you've got a twist in the routing config:
mod_jk: jvm1=port 18007, jvm2=port 18009
Tomcat: jvm1=port 18009, jvm1=port 18007
Hope this helps, have fun with mod_jk :)
Rainer
Carlos Campos schrieb:
> Hi,
>
> I have installed one instance of apache 2.2.3 with mod_jk 1.2.20, two
> instances of tomcat 5.5, and Java 1.5.0
>
> I m trying to set up a loadbalancer that supports sticky sessions.
> However what I m getting when i access the test.jsp via
> (http://somedomain.com/carlos.jsp) round robin hits on the tomcats
> setup, with a new session id being created for each access.
>
> 1st hit: sessionId: 11EB9613AAE1BD6E1903CAFEAD9469C4.jvm1
>
> 2nd hit: sessionId: DAA0ECBF06B2A8C4543BEBF61C2C8787.jvm2
>
> 3rd hit: sessionId: 9CF6BCE52886C82E777E1F76917DDCB4.jvm1
>
> .... and so on
>
> Can anyone point out what I m doing wrong? I m trying to setup the
> system so that the client browser is always sent to the same tomcat
> instance.
> I have tried setting the directive
> "worker.loadbalancer.sticky_session=True" as
> "worker.loadbalancer.sticky_session=1" but I still get the same
> result. I even tried adding: worker.jvm1.domain=jvm1 ,
> worker.jvm2.domain=jvm2. as suggested in some of the threads but that
> didn't help.
>
> Thanks.
>
> Carlos.
>
>
> TEST JSP
> ========
> <%
>
> HttpSession session22 = request.getSession(false);
> if ( session22 != null )
> {
> String id = session22.getId();
> out.println("sessionId: " + id);
> }
> %>
>
>
>
> JAVA VERSION
> ============
> [root@web1 admin]# java -version
> java version "1.5.0_10"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_10-b03)
> Java HotSpot(TM) Server VM (build 1.5.0_10-b03, mixed mode)
>
>
>
> SOME HTTP DETAILS
> =================
>
> [root@web1 bin]# ./httpd -V
> Server version: Apache/2.2.3
> Server built: Dec 18 2006 10:56:49
> Server's Module Magic Number: 20051115:3
> Server loaded: APR 1.2.7, APR-Util 1.2.7
> Compiled using: APR 1.2.7, APR-Util 1.2.7
> Architecture: 32-bit
> Server MPM: Prefork
> threaded: no
> forked: yes (variable process count)
> Server compiled with....
> -D APACHE_MPM_DIR="server/mpm/prefork"
> -D APR_HAS_SENDFILE
> -D APR_HAS_MMAP
> -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
> -D APR_USE_SYSVSEM_SERIALIZE
> -D APR_USE_PTHREAD_SERIALIZE
> -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
> -D APR_HAS_OTHER_CHILD
> -D AP_HAVE_RELIABLE_PIPED_LOGS
> -D DYNAMIC_MODULE_LIMIT=128
> -D HTTPD_ROOT="/usr/httpd"
> -D SUEXEC_BIN="/usr/httpd/bin/suexec"
> -D DEFAULT_PIDLOG="logs/httpd.pid"
> -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
> -D DEFAULT_LOCKFILE="logs/accept.lock"
> -D DEFAULT_ERRORLOG="logs/error_log"
> -D AP_TYPES_CONFIG_FILE="conf/mime.types"
> -D SERVER_CONFIG_FILE="conf/httpd.conf"
>
>
>
> [root@web1 bin]# ./httpd -l
> Compiled in modules:
> core.c
> mod_authn_file.c
> mod_authn_default.c
> mod_authz_host.c
> mod_authz_groupfile.c
> mod_authz_user.c
> mod_authz_default.c
> mod_auth_basic.c
> mod_include.c
> mod_filter.c
> mod_log_config.c
> mod_env.c
> mod_setenvif.c
> mod_ssl.c
> prefork.c
> http_core.c
> mod_mime.c
> mod_status.c
> mod_autoindex.c
> mod_asis.c
> mod_cgi.c
> mod_negotiation.c
> mod_dir.c
> mod_actions.c
> mod_userdir.c
> mod_alias.c
> mod_so.c
>
>
>
> HTTPD.CONF
> ==========
>
> <IfDefine mod_jk_module>
> LoadModule jk_module modules/mod_jk.so
> </IfDefine>
>
> <IfModule mod_jk.c>
> JkWorkersFile /usr/httpd/conf/extra/workers.properties
> JkLogFile /usr/httpd/logs/mod_jk.log
> JkLogLevel debug
> JkMount /*.jsp loadbalancer
> JkMount /servlet/* loadbalancer
> JkMount /*.xml loadbalancer
> JkMount /jkmanager/* jkstatus
> JkShmFile /usr/httpd/logs/jk.shm
> AddType text/xml .xml
> </IfModule>
>
>
> WORKERS.PROPERTIES
> ==================
>
> worker.list=loadbalancer,jkstatus
> worker.maintain=60
>
> worker.jvm1.port=18007
> worker.jvm1.host=localhost
> worker.jvm1.type=ajp13
> worker.jvm1.lbfactor=1
> worker.jvm1.socket_timeout=1
> worker.jvm1.retries=1
> worker.jvm1.domain=jvm1 (I even tried this to see if it would help, but
> it didn't -- removed)
>
> worker.jvm2.port=18009
> worker.jvm2.host=localhost
> worker.jvm2.type=ajp13
> worker.jvm2.lbfactor=1
> worker.jvm2.socket_timeout=1
> worker.jvm2.retries=1
> worker.jvm2.domain=jvm2 (I even tried this to see if it would help, but
> it didn't -- removed)
>
> worker.jkstatus.type=status
> worker.loadbalancer.type=lb
> worker.loadbalancer.balance_workers=jvm1,jvm2
> worker.loadbalancer.sticky_session=True
> worker.loadbalancer.sticky_session_force=False
> worker.loadbalancer.method=B
>
>
>
> TOMCAT1 SERVER.XML (the diff vs the orginal config file)
> ==============================
> <Connector port="18009" enableLookups="false" redirectPort="8443"
> protocol="AJP/1.3" />
> <Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
>
>
> TOMCAT2 SERVER.XML (the diff vs the orginal config file)
> ==============================
>
> <Connector port="18007" enableLookups="false" redirectPort="8443"
> protocol="AJP/1.3" />
> <Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm2">
>
>
> MOD_JK.LOG
> ===========
>
>
> 1st access to jsp (http://domainame.com/carlos.jsp) =====> sessionId:
> 11EB9613AAE1BD6E1903CAFEAD9469C4.jvm1
> *****************
>
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> map_uri_to_worker::jk_uri_worker_map.c (575): Attempting to map URI
> '/carlos.jsp' from 4 maps
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> map_uri_to_worker::jk_uri_worker_map.c (587): Attempting to map context
> URI '/jkmanager/*=jkstatus' source 'JkMount'
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> map_uri_to_worker::jk_uri_worker_map.c (587): Attempting to map context
> URI '/servlet/*=loadbalancer' sour ce 'JkMount'
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> map_uri_to_worker::jk_uri_worker_map.c (587): Attempting to map context
> URI '/*.jsp=loadbalancer' source ' JkMount'
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> map_uri_to_worker::jk_uri_worker_map.c (602): Found a wildchar match
> '/*.jsp=loadbalancer'
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug] jk_handler::mod_jk.c
> (1999): Into handler jakarta-servlet worker=loadbalancer r->proxyreq=0
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> wc_get_worker_for_name::jk_worker.c (114): found a worker loadbalancer
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> wc_maintain::jk_worker.c (321): Maintaining worker loadbalancer
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> wc_get_name_for_type::jk_worker.c (290): Found worker type 'lb'
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> init_ws_service::mod_jk.c (584): Service protocol=HTTP/1.1 method=GET
> host=(null) addr=69.230.90.148 name= web1.somedomain.com port=80
> auth=(null) user=(null) laddr=x.x.209.93 raddr=69.230.90.148
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug] service::jk_lb_worker.c
> (840): service sticky_session=1 id='2D2484891C4306E185A372BD9C1CFDAC.jvm2'
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> get_most_suitable_worker::jk_lb_worker.c (733): searching worker for
> partial sessionid 2D2484891C4306E185A 372BD9C1CFDAC.jvm2
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> get_most_suitable_worker::jk_lb_worker.c (741): searching worker for
> session route jvm2
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> get_most_suitable_worker::jk_lb_worker.c (754): found worker jvm2 (jvm2)
> for route jvm2 and partial sessio nid
> 2D2484891C4306E185A372BD9C1CFDAC.jvm2
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug] service::jk_lb_worker.c
> (860): service worker=jvm2 route=jvm2
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> ajp_get_endpoint::jk_ajp_common.c (2315): acquired connection pool slot=0
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> ajp_marshal_into_msgb::jk_ajp_common.c (548): ajp marshaling done
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> ajp_service::jk_ajp_common.c (1771): processing jvm2 with 1 retries
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> ajp_connection_tcp_send_message::jk_ajp_common.c (893): sending to ajp13
> pos=4 len=956 max=8192
> ....
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> ajp_unmarshal_response::jk_ajp_common.c (603): status = 200
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> ajp_unmarshal_response::jk_ajp_common.c (610): Number of headers is = 3
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> ajp_unmarshal_response::jk_ajp_common.c (666): Header[0] [Set-Cookie] =
> [JSESSIONID=11EB9613AAE1BD6E1903CA FEAD9469C4.jvm1; Path=/]
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> ajp_unmarshal_response::jk_ajp_common.c (666): Header[1] [Content-Type]
> = [text/html;charset=ISO-8859-1]
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> ajp_unmarshal_response::jk_ajp_common.c (666): Header[2]
> [Content-Length] = [62]
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> ajp_connection_tcp_get_message::jk_ajp_common.c (1029): received from
> ajp13 pos=0 len=66 max=8192
> ....
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug] ws_write::mod_jk.c
> (436): written 62 out of 62
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> ajp_connection_tcp_get_message::jk_ajp_common.c (1029): received from
> ajp13 pos=0 len=2 max=8192
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> ajp_connection_tcp_get_message::jk_ajp_common.c (1029): 0000 05 01 00
> 00 00 00 00 00 00 00 00 00 00 00 00 00 - ................
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> ajp_process_callback::jk_ajp_common.c (1491): AJP13 protocol: Reuse is OK
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug]
> ajp_done::jk_ajp_common.c (2258): recycling connection pool slot=0 for
> worker jvm2
> [Tue Jan 09 09:05:02 2007] [30637:14016] [debug] jk_handler::mod_jk.c
> (2126): Service finished with status=200 for worker=loadbalancer
>
> 2nd access to same jsp (http://domainame.com/carlos.jsp) =======>
> sessionId: DAA0ECBF06B2A8C4543BEBF61C2C8787.jvm2
> **********************
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> map_uri_to_worker::jk_uri_worker_map.c (575): Attempting to map URI
> '/carlos.jsp' from 4 maps
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> map_uri_to_worker::jk_uri_worker_map.c (587): Attempting to map context
> URI '/jkmanager/*=jkstatus' source 'JkMount'
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> map_uri_to_worker::jk_uri_worker_map.c (587): Attempting to map context
> URI '/servlet/*=loadbalancer' source 'JkMount'
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> map_uri_to_worker::jk_uri_worker_map.c (587): Attempting to map context
> URI '/*.jsp=loadbalancer' source 'JkMount'
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> map_uri_to_worker::jk_uri_worker_map.c (602): Found a wildchar match
> '/*.jsp=loadbalancer'
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug] jk_handler::mod_jk.c
> (1999): Into handler jakarta-servlet worker=loadbalancer r->proxyreq=0
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> wc_get_worker_for_name::jk_worker.c (114): found a worker loadbalancer
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> wc_maintain::jk_worker.c (321): Maintaining worker loadbalancer
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> maintain_workers::jk_lb_worker.c (509): decay with 2^7
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> wc_get_name_for_type::jk_worker.c (290): Found worker type 'lb'
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> init_ws_service::mod_jk.c (584): Service protocol=HTTP/1.1 method=GET
> host=(null) addr=69.230.90.148 name=web1.somedomain.com port=80
> auth=(null) user=(null) laddr=x.x.209.93 raddr=69.230.90.148
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug] service::jk_lb_worker.c
> (840): service sticky_session=1 id='11EB9613AAE1BD6E1903CAFEAD9469C4.jvm1'
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> get_most_suitable_worker::jk_lb_worker.c (733): searching worker for
> partial sessionid 11EB9613AAE1BD6E1903CAFEAD9469C4.jvm1
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> get_most_suitable_worker::jk_lb_worker.c (741): searching worker for
> session route jvm1
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> get_most_suitable_worker::jk_lb_worker.c (754): found worker jvm1 (jvm1)
> for route jvm1 and partial sessionid 11EB9613AAE1BD6E1903CAFEAD9469C4.jvm1
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug] service::jk_lb_worker.c
> (860): service worker=jvm1 route=jvm1
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> ajp_get_endpoint::jk_ajp_common.c (2315): acquired connection pool slot=0
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> ajp_marshal_into_msgb::jk_ajp_common.c (548): ajp marshaling done
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> ajp_service::jk_ajp_common.c (1771): processing jvm1 with 1 retries
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> jk_open_socket::jk_connect.c (335): socket TCP_NODELAY set to On
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> jk_open_socket::jk_connect.c (398): timeout 1 set for socket=20
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> jk_open_socket::jk_connect.c (433): trying to connect socket 20 to
> 127.0.0.1:18007
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> jk_open_socket::jk_connect.c (459): socket 20 connected to 127.0.0.1:18007
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> ajp_connect_to_endpoint::jk_ajp_common.c (847): Connected socket 20 to
> (127.0.0.1:18007)
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> ajp_connection_tcp_send_message::jk_ajp_common.c (893): sending to ajp13
> pos=4 len=956 max=8192
> ....
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> ajp_send_request::jk_ajp_common.c (1273): request body to send 0 -
> request body to resend 0
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> ajp_connection_tcp_get_message::jk_ajp_common.c (1029): received from
> ajp13 pos=0 len=150 max=8192
> ....
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> ajp_unmarshal_response::jk_ajp_common.c (603): status = 200
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> ajp_unmarshal_response::jk_ajp_common.c (610): Number of headers is = 3
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> ajp_unmarshal_response::jk_ajp_common.c (666): Header[0] [Set-Cookie] =
> [JSESSIONID=DAA0ECBF06B2A8C4543BEBF61C2C8787.jvm2; Path=/]
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> ajp_unmarshal_response::jk_ajp_common.c (666): Header[1] [Content-Type]
> = [text/html;charset=ISO-8859-1]
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> ajp_unmarshal_response::jk_ajp_common.c (666): Header[2]
> [Content-Length] = [62]
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> ajp_connection_tcp_get_message::jk_ajp_common.c (1029): received from
> ajp13 pos=0 len=66 max=8192
> ....
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug] ws_write::mod_jk.c
> (436): written 62 out of 62
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> ajp_connection_tcp_get_message::jk_ajp_common.c (1029): received from
> ajp13 pos=0 len=2 max=8192
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> ajp_connection_tcp_get_message::jk_ajp_common.c (1029): 0000 05 01 00
> 00 00 00 00 00 00 00 00 00 00 00 00 00 - ................
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> ajp_process_callback::jk_ajp_common.c (1491): AJP13 protocol: Reuse is OK
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug]
> ajp_done::jk_ajp_common.c (2258): recycling connection pool slot=0 for
> worker jvm1
> [Tue Jan 09 09:11:42 2007] [31550:14016] [debug] jk_handler::mod_jk.c
> (2126): Service finished with status=200 for worker=loadbalancer
>
> 3rd access to same jsp (http://domainame.com/carlos.jsp) ======>
> sessionId: 9CF6BCE52886C82E777E1F76917DDCB4.jvm1
>
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> map_uri_to_worker::jk_uri_worker_map.c (575): Attempting to map URI
> '/carlos.jsp' from 4 maps
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> map_uri_to_worker::jk_uri_worker_map.c (587): Attempting to map context
> URI '/jkmanager/*=jkstatus' source 'JkMount'
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> map_uri_to_worker::jk_uri_worker_map.c (587): Attempting to map context
> URI '/servlet/*=loadbalancer' source 'JkMount'
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> map_uri_to_worker::jk_uri_worker_map.c (587): Attempting to map context
> URI '/*.jsp=loadbalancer' source 'JkMount'
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> map_uri_to_worker::jk_uri_worker_map.c (602): Found a wildchar match
> '/*.jsp=loadbalancer'
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug] jk_handler::mod_jk.c
> (1999): Into handler jakarta-servlet worker=loadbalancer r->proxyreq=0
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> wc_get_worker_for_name::jk_worker.c (114): found a worker loadbalancer
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> wc_maintain::jk_worker.c (321): Maintaining worker loadbalancer
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> maintain_workers::jk_lb_worker.c (509): decay with 2^3
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> wc_get_name_for_type::jk_worker.c (290): Found worker type 'lb'
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> init_ws_service::mod_jk.c (584): Service protocol=HTTP/1.1 method=GET
> host=(null) addr=69.230.90.148 name=web1.somedomain.com port=80
> auth=(null) user=(null) laddr=111.111.111.111 raddr=69.230.90.148
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug] service::jk_lb_worker.c
> (840): service sticky_session=1 id='DAA0ECBF06B2A8C4543BEBF61C2C8787.jvm2'
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> get_most_suitable_worker::jk_lb_worker.c (733): searching worker for
> partial sessionid DAA0ECBF06B2A8C4543BEBF61C2C8787.jvm2
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> get_most_suitable_worker::jk_lb_worker.c (741): searching worker for
> session route jvm2
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> get_most_suitable_worker::jk_lb_worker.c (754): found worker jvm2 (jvm2)
> for route jvm2 and partial sessionid DAA0ECBF06B2A8C4543BEBF61C2C8787.jvm2
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug] service::jk_lb_worker.c
> (860): service worker=jvm2 route=jvm2
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> ajp_get_endpoint::jk_ajp_common.c (2315): acquired connection pool slot=0
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> ajp_marshal_into_msgb::jk_ajp_common.c (548): ajp marshaling done
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> ajp_service::jk_ajp_common.c (1771): processing jvm2 with 1 retries
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> ajp_connection_tcp_send_message::jk_ajp_common.c (893): sending to ajp13
> pos=4 len=956 max=8192
> ....
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> ajp_send_request::jk_ajp_common.c (1273): request body to send 0 -
> request body to resend 0
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> ajp_connection_tcp_get_message::jk_ajp_common.c (1029): received from
> ajp13 pos=0 len=150 max=8192
> ....
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> ajp_unmarshal_response::jk_ajp_common.c (603): status = 200
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> ajp_unmarshal_response::jk_ajp_common.c (610): Number of headers is = 3
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> ajp_unmarshal_response::jk_ajp_common.c (666): Header[0] [Set-Cookie] =
> [JSESSIONID=9CF6BCE52886C82E777E1F76917DDCB4.jvm1; Path=/]
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> ajp_unmarshal_response::jk_ajp_common.c (666): Header[1] [Content-Type]
> = [text/html;charset=ISO-8859-1]
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> ajp_unmarshal_response::jk_ajp_common.c (666): Header[2]
> [Content-Length] = [62]
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> ajp_connection_tcp_get_message::jk_ajp_common.c (1029): received from
> ajp13 pos=0 len=66 max=8192
> ....
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug] ws_write::mod_jk.c
> (436): written 62 out of 62
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> ajp_connection_tcp_get_message::jk_ajp_common.c (1029): received from
> ajp13 pos=0 len=2 max=8192
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> ajp_connection_tcp_get_message::jk_ajp_common.c (1029): 0000 05 01 00
> 00 00 00 00 00 00 00 00 00 00 00 00 00 - ................
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> ajp_process_callback::jk_ajp_common.c (1491): AJP13 protocol: Reuse is OK
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug]
> ajp_done::jk_ajp_common.c (2258): recycling connection pool slot=0 for
> worker jvm2
> [Tue Jan 09 09:15:20 2007] [30638:14016] [debug] jk_handler::mod_jk.c
> (2126): Service finished with status=200 for worker=loadbalancer
>
> _________________________________________________________________
> Dave vs. Carl: The Insignificant Championship Series. Who will win?
> http://clk.atdmt.com/MSN/go/msnnkwsp0070000001msn/direct/01/?href=http://davevscarl.spaces.live.com/?icid=T001MSN38C07001
>
>
>
> ---------------------------------------------------------------------
> 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