Hello to all,

I have a problem with mod_jk (hope this is the right place form my problem).

Used servers and versions:
- Apache 2.2.15 (Win32)
- mod_jk/1.2.30
- Apache Tomcat/6.0.20 using AJP/1.3
- jdk1.5.0_12

Problem description:
I enter the appropriate URL pointing to the balancing web server into the 
internet explorer address bar (IE on a host different to the machine where web 
server and tomcats are installed), press enter and get a '503 - service 
unavailable message' back.
I have 2 Tomcat instances, both up and running and http accessible.
When (with the same internet explorer window) I first enter the URL of one 
Tomcat instance directly, get the requested page back, then again try the URL 
using the web server, it suddenly works. This seems not to be due to caching, 
because I do not see the failure message in mod_jk.log anymore and I get log 
information which indicates that everything went fine.

When I try to access the web server URL locally from the machine where all 
servers are installed, it works from the beginning.
I tried several configurations and don't know what else to try.
The mod_jk status page shows that the tomcat instances were found and that 
there is no error.

mod_jk.log shows those messages when I enter the web servers URL:
(I attached 2 full mod_jk.conf to this email with different configs but same 
result).

[Mon Jun 07 18:29:29 2010][1944:408] [debug] jk_uri_worker_map.c (1036): 
Attempting to map URI '/W********h/' from 4 maps [Mon Jun 07 18:29:29 
2010][1944:408] [debug] jk_uri_worker_map.c (850): Attempting to map context 
URI '/W********h/*=balancer' source 'JkMount'
[Mon Jun 07 18:29:29 2010][1944:408] [debug] jk_uri_worker_map.c (863): Found a 
wildchar match '/W********h/*=balancer'
[Mon Jun 07 18:29:29 2010][1944:408] [debug] mod_jk.c (2462): Into handler 
jakarta-servlet worker=balancer r->proxyreq=0 [Mon Jun 07 18:29:29 
2010][1944:408] [debug] jk_worker.c (116): found a worker balancer [Mon Jun 07 
18:29:29 2010][1944:408] [debug] jk_worker.c (339): Maintaining worker balancer 
[Mon Jun 07 18:29:29 2010][1944:408] [debug] jk_ajp_common.c (3197): reached 
pool min size 32 from 64 cache slots [Mon Jun 07 18:29:29 2010][1944:408] 
[debug] jk_ajp_common.c (3197): reached pool min size 32 from 64 cache slots 
[Mon Jun 07 18:29:29 2010][1944:408] [debug] jk_worker.c (293): Found worker 
type 'lb'
[Mon Jun 07 18:29:29 2010][1944:408] [debug] mod_jk.c (978): Service 
protocol=HTTP/1.0 method=GET ssl=false host=(null) addr=**.*.*.130 
name=********* port=8080 auth=(null) user=(null) laddr=**.*.*.21 
raddr=**.*.*.130 uri=/Workbench/ [Mon Jun 07 18:29:29 2010][1944:408] [debug] 
jk_lb_worker.c (1118): service sticky_session=1 
id='933BF867682BC5657E3F27E5D17917D7'
[Mon Jun 07 18:29:29 2010][1944:408] [debug] jk_lb_worker.c (946): searching 
worker for partial sessionid 933BF867682BC5657E3F27E5D17917D7 [Mon Jun 07 
18:29:29 2010][1944:408] [info] jk_lb_worker.c (985): all workers are in error 
state for session 933BF867682BC5657E3F27E5D17917D7 [Mon Jun 07 18:29:29 
2010][1944:408] [info] jk_lb_worker.c (1448): All tomcat instances failed, no 
more workers left for recovery (attempt=0, retry=0) [Mon Jun 07 18:29:29 
2010][1944:408] [debug] jk_lb_worker.c (946): searching worker for partial 
sessionid 933BF867682BC5657E3F27E5D17917D7 [Mon Jun 07 18:29:29 2010][1944:408] 
[info] jk_lb_worker.c (985): all workers are in error state for session 
933BF867682BC5657E3F27E5D17917D7 [Mon Jun 07 18:29:29 2010][1944:408] [info] 
jk_lb_worker.c (1457): All tomcat instances failed, no more workers left 
(attempt=1, retry=0) [Mon Jun 07 18:29:29 2010][1944:408] [debug] 
jk_lb_worker.c (1131): retry 1, sleeping for 100 ms before retrying [Mon Jun 07 
18:29:29 2010][1944:408] [debug] jk_lb_worker.c (946): searching worker for 
partial sessionid 933BF867682BC5657E3F27E5D17917D7 [Mon Jun 07 18:29:29 
2010][1944:408] [info] jk_lb_worker.c (985): all workers are in error state for 
session 933BF867682BC5657E3F27E5D17917D7 [Mon Jun 07 18:29:29 2010][1944:408] 
[info] jk_lb_worker.c (1457): All tomcat instances failed, no more workers left 
(attempt=0, retry=1) [Mon Jun 07 18:29:29 2010][1944:408] [debug] 
jk_lb_worker.c (946): searching worker for partial sessionid 
933BF867682BC5657E3F27E5D17917D7 [Mon Jun 07 18:29:29 2010][1944:408] [info] 
jk_lb_worker.c (985): all workers are in error state for session 
933BF867682BC5657E3F27E5D17917D7 [Mon Jun 07 18:29:29 2010][1944:408] [info] 
jk_lb_worker.c (1457): All tomcat instances failed, no more workers left 
(attempt=1, retry=1) [Mon Jun 07 18:29:29 2010][1944:408] [info] jk_lb_worker.c 
(1468): All tomcat instances are busy or in error state [Mon Jun 07 18:29:29 
2010][1944:408] [error] jk_lb_worker.c (1473): All tomcat instances failed, no 
more workers left [Mon Jun 07 18:29:29 2010]balancer ********* 0.109377 [Mon 
Jun 07 18:29:29 2010][1944:408] [info] mod_jk.c (2618): Service error=0 for 
worker=balancer


workers.properties:
-------------------------------------------------------------------------
#Define path to JAVA_HOME
workers.java_home=C:\Program Files (x86)\Java\jdk1.5.0_12

# Define list of workers that will be used # for mapping requests 
worker.list=balancer,status

# DEFAULT CONFIG FOR WORKERS
worker.default.host=localhost
worker.default.type=ajp13
worker.default.lbfactor=100
worker.default.cachesize=200
worker.default.connection_pool_size=64

# Define Node1
worker.worker1.reference=worker.default
worker.worker1.port=8033

# Define Node2
worker.worker2.reference=worker.default
worker.worker2.port=8044

# Load balancing behaviour
worker.balancer.type=lb
worker.balancer.balance_workers=worker1,worker2
worker.balancer.method=1
worker.balancer.sticky_session=true
worker.balancer.sticky_session_force=true

# Status worker for managing load balancer worker.status.type=status
-------------------------------------------------------------------------
-------------------------------------------------------------------------
mod_jk.conf:
-------------------------------------------------------------------------
# Load mod_jk module
# Specify the filename of the mod_jk lib LoadModule jk_module 
modules/mod_jk-1.2.30-httpd-2.2.3.so

#Path to workers.properties
JkWorkersFile conf/workers.properties

#Path to jk logs
JkLogFile logs/mod_jk.log

#Jlk log level [debug/error/info]
JkLogLevel debug

#Jk log format
JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"

#JkRequestLogFormat set the request format JkRequestLogFormat "%w %V %T"

# Mount your applications
JkMount /W*******h balancer
JkMount /W*******h/* balancer

# Add the jkstatus mount point
JKMount /status/* status

# Add shared memory.
# This directive is present with 1.2.10 and # later versions of mod_jk, and is 
needed for # load balancing to work properly JkShmFile logs/jk.shm

# Add jkstatus for managing runtime data <Location /jkstatus/>
        JkMount status
        Order deny,allow
        Deny from all
        Allow from 127.0.0.1
</Location>
-------------------------------------------------------------------------


Regards,

Daniel Mangold


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to