You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Klaus-F. Kaal" <kl...@timologic.com> on 2005/03/10 20:29:51 UTC

Workers, workers, how do they work??

Hi,

I am not really sure that I understand the workers right.

I interface Apache 2.0.48 with Tomcat 5.0.28 via mod_jk.

Obviously, Apache accepts mod_jk to some extend, because, I get this in 
the _mo_jk.log_:

[Thu Mar 10 20:05:21 2005]  [jk_uri_worker_map.c (459)]: Attempting to 
map URI '/jsp-examples/'
[Thu Mar 10 20:05:21 2005]  [jk_uri_worker_map.c (483)]: 
jk_uri_worker_map_t::map_uri_to_worker, Found a context match worker1 -> 
/jsp-examples/
[Thu Mar 10 20:05:21 2005]  [mod_jk.c (1689)]: Into handler 
r->proxyreq=0 r->handler=jakarta-servlet r->notes=136555304 worker=worker1
[Thu Mar 10 20:05:21 2005]  [jk_worker.c (90)]: Into 
wc_get_worker_for_name worker1
[Thu Mar 10 20:05:21 2005]  [jk_worker.c (94)]: wc_get_worker_for_name, 
done did not find a worker
[Thu Mar 10 20:05:21 2005]  [jk_uri_worker_map.c (445)]: Into 
jk_uri_worker_map_t::map_uri_to_worker
[Thu Mar 10 20:05:21 2005]  [jk_uri_worker_map.c (459)]: Attempting to 
map URI '/error/HTTP_INTERNAL_SERVER_ERROR.html.var'


I have a _mod_jk.conf_ like this:

<IfModule !mod_jk.c>
  LoadModule jk_module "/usr/lib/apache2-prefork/mod_jk.so"
</IfModule>
JKOptions +ForwardKeySize +ForwardURICompat +ForwardDirectories
JkWorkersFile "/etc/apache2/workers2.properties"
JkLogFile "/usr/tomcat/logs/mod_jk.log"
JkLogLevel debug
JkMount /jsp-examples/* worker1

and the _workers2.properties_ reads like this:

worker.list = worker1
[channel.socket:localhost:8009]
[ajp13:localhost:8009]
channel=channel.socket:localhost:8009
[uri:/jsp-examples/*]
worker1=ajp13.localhost:8009

In my understanding, it found worker1 which matched the request, but 
then did not really find the final context. Can somebody explain to me 
what is wrong here?

Thanks for your help.

Klaus



Re: Workers, workers, how do they work??

Posted by Adrian Robert <ar...@cogsci.ucsd.edu>.
On Mar 10, 2005, at 2:29 PM, Klaus-F. Kaal wrote:

> I am not really sure that I understand the workers right.
>
> I interface Apache 2.0.48 with Tomcat 5.0.28 via mod_jk.

It looks like you're trying to use a mod_jk2 config file format with 
mod_jk.  You want a file (better called "workers.properties") w/the 
following:

workers.tomcat_home= [insert CATALINA_BASE here]
workers.java_home= [insert JAVAHOME here]
ps=/
worker.list=worker1
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8009
worker.worker1.lbfactor=1
worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=worker1

(You can tweak the load balancing lines.)

Also, make sure the JkWorkersFile in httpd.conf occurs outside of any 
VirtualHost section.


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org