On Thu, 19 Apr 2007, Rainer Jung wrote:

Your worker.list entry is only a comment :(

This does look like it in the email, but it is probably some artifact of the cutting and pasting process. To make sure, I've added a blank line after every comment.

Anyway, that is not the problem. Any other ideas about this? Debugging strategies?

Thanks.                                                         Faheem.

Faheem Mitha wrote:

Hi,

I'm trying to set up Apache to talk to Tomcat using the mod_jk connector.
However, I get the following error in the log, /var/log/apache2/mod_jk.log

jk_handler::mod_jk.c (1986): Could not find a worker for worker name=ajp13_worker

Apparently it cannot find the definition (or whatever) for ajp13_worker, but this is defined in /etc/libapache2-mod-jk/workers.properties as far as I can tell.

I include the relevant portions of my config below. If anyone can tell me what I'm doing wrong, that would be great.

Thanks in advance.                                                 Faheem.

************************************************************************
Relevant portion of apache config
************************************************************************
LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so

<VirtualHost x.x.x.60:443>
    ServerName ...
    # Sample mod_jk configuration
    # for Apache 2
    #
    # for all commands/options available see the manual
    # provided in libapache-mod-jk-doc package.

    # The location where mod_jk will find the workers definitions
    JkWorkersFile       /etc/libapache2-mod-jk/workers.properties

    # The location where mod_jk is going to place its log file
    JkLogFile   /var/log/apache2/mod_jk.log

    # The log level:
    # - info log will contain standard mod_jk activity (default).
    # - warn log will contain non fatal error reports.
    # - error log will contain also error reports.
    # - debug log will contain all information on mod_jk activity
    # - trace log will contain all tracing information on mod_jk activity
    JkLogLevel  info


    # Assign specific URLs to Tomcat. In general the structure of a
    # JkMount directive is: JkMount [URL prefix] [Worker name]

    # send all requests ending in .jsp to ajp13_worker
    JkMount /*.jsp ajp13_worker
    #JkMount /* ajp13_worker
    # send all requests ending /servlet to ajp13_worker
    #JkMount /*/servlet/ ajp13_worker

    # JkUnmount directive acts as an opposite to JkMount and blocks access
    # to a particular URL. The purpose is to be able to filter out the
    # particular content types from mounted context.

    # do not send requests ending with .gif to ajp13_worker
    #JkUnMount /servlet/*.gif ajp13_worker

    # JkMount / JkUnMount directives can also be used inside <VirtualHost>
    # sections of your httpd.conf file.
</VirtualHost>

************************************************************************
/etc/libapache2-mod-jk/workers.properties
************************************************************************
# workers.properties -
#
# This file is a simplified version of the workers.properties supplied
# with the upstream sources. The jni inprocess worker (not build in the
# debian package) section and the ajp12 (deprecated) section are removed.
#
# As a general note, the characters $( and ) are used internally to define
# macros. Do not use them in your own configuration!!!
#
# Whenever you see a set of lines such as:
# x=value
# y=$(x)\something
#
# the final value for y will be value\something
#
# Normaly all you will need to do is un-comment and modify the first three
# properties, i.e. workers.tomcat_home, workers.java_home and ps.
# Most of the configuration is derived from these.
#
# When you are done updating workers.tomcat_home, workers.java_home and ps
# you should have 3 workers configured:
#
# - An ajp13 worker that connects to localhost:8009
# - A load balancer worker
#
#

# OPTIONS ( very important for jni mode )

#
# workers.tomcat_home should point to the location where you
# installed tomcat. This is where you have your conf, webapps and lib
# directories.
#
workers.tomcat_home=/usr/share/tomcat5.5

#
# workers.java_home should point to your Java installation. Normally
# you should have a bin and lib directories beneath it.
#
workers.java_home=/usr/lib/j2sdk1.5-sun

#
# You should configure your environment slash... ps=\ on NT and / on UNIX
# and maybe something different elsewhere.
#
ps=/

#
#------ ADVANCED MODE ------------------------------------------------
#---------------------------------------------------------------------
#

#
#------ worker list ------------------------------------------
#---------------------------------------------------------------------
#
#
# The workers that your plugins should create and work with
# worker.list=ajp13_worker

#
#------ ajp13_worker WORKER DEFINITION ------------------------------
#---------------------------------------------------------------------
#

#
# Defining a worker named ajp13_worker and of type ajp13
# Note that the name and the type do not have to match.
#
worker.ajp13_worker.port=8009
worker.ajp13_worker.host=localhost
worker.ajp13_worker.type=ajp13
#
# Specifies the load balance factor when used with
# a load balancing worker.
# Note:
#  ----> lbfactor must be > 0
#  ----> Low lbfactor means less work done by the worker.
worker.ajp13_worker.lbfactor=1

#
# Specify the size of the open connection cache.
#worker.ajp13_worker.cachesize

#
#------ DEFAULT LOAD BALANCER WORKER DEFINITION ----------------------
#---------------------------------------------------------------------
#

#
# The loadbalancer (type lb) workers perform wighted round-robin
# load balancing with sticky sessions.
# Note:
#  ----> If a worker dies, the load balancer will check its state
#        once in a while. Until then all work is redirected to peer
#        workers.
worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=ajp13_worker
********************************************************************

*******************************************************************
Relevant portion of /etc/tomcat5.5/server.xml
*******************************************************************
    <!-- Define an AJP 1.3 Connector on port 8009 -->
    <Connector port="8009"
enableLookups="false" redirectPort="8443" protocol="AJP/1.3" />



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--
--
kippdata
informationstechnologie GmbH   Tel: 0228 98549 -0
Bornheimer Str. 33a            Fax: 0228 98549 -50
53111 Bonn                     www.kippdata.de

HRB 8018 Amtsgericht Bonn / USt.-IdNr. DE 196 457 417
Geschdftsf|hrer: Dr. Thomas Hvfer, Rainer Jung, Sven Maurmann
===============================
kippdata
informationstechnologie GmbH   Tel: +49 228 98549 -0
Bornheimer Str. 33a            Fax: +49 228 98549 -50
D-53111 Bonn                   www.kippdata.de

HRB 8018 Amtsgericht Bonn / USt.-IdNr. DE 196 457 417
Geschdftsf|hrer: Dr. Thomas Hvfer, Rainer Jung, Sven Maurmann

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to