You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Faheem Mitha <fa...@email.unc.edu> on 2007/04/19 04:19:20 UTC

problems configuring mod_jk

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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: problems configuring mod_jk

Posted by Rainer Jung <ra...@kippdata.de>.
Thanks Mladen, and sorry for jumping in that late: yes JkWorkersFile is 
global. Most others can be used in VHosts, but for Apache 2.0 most of 
this was completed only recently in version 1.2.20. Before 1.2.20 (you 
are using 1.2.18) some things worked in vhosts (like JkMount) even 
before, but JkWorkersFile remains to be global.

Regards,

Rainer

Faheem Mitha wrote:
> 
> 
> On Fri, 20 Apr 2007, Mladen Turk wrote:
> 
>> So, have you tried to put the JkWorkersFile outside the vhost?
> 
> I've moved everything outside except the JkMount stuff. The worker is 
> now seen, and I'm now seeing a different error message, so that's 
> progress. Thanks very much for your help.

---------------------------------------------------------------------
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: problems configuring mod_jk

Posted by Faheem Mitha <fa...@email.unc.edu>.

On Fri, 20 Apr 2007, Mladen Turk wrote:

> So, have you tried to put the JkWorkersFile outside the vhost?

I've moved everything outside except the JkMount stuff. The worker is now 
seen, and I'm now seeing a different error message, so that's progress. 
Thanks very much for your help.

                                                          Faheem.

---------------------------------------------------------------------
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: problems configuring mod_jk

Posted by Mladen Turk <ml...@gmail.com>.
Faheem Mitha wrote:
> 
> 
> On Fri, 20 Apr 2007, Mladen Turk wrote:
> 
>> Faheem Mitha wrote:
>>>
>>> Ok, thanks for your help. This is the portion of the log generated by 
>>> mod_jk, which I presume is what is relevant. The formatting is not 
>>> optimal, but I can try to wrap it if desired.
>>>
>>
>> The server wide directives:
>> JkWorkersFile, etc must not be defined inside VirtualHost
>> Put those in root.
> 
> Hi,
> 
> The relevant section of the apache config file follows. As you can see, 
> everything in currently inside VirtualHost.
> 
> What directives can be safely left inside VirtualHost?
>

So, have you tried to put the JkWorkersFile outside
the vhost?

Regards,
Mladen.

---------------------------------------------------------------------
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: problems configuring mod_jk

Posted by Faheem Mitha <fa...@email.unc.edu>.

On Fri, 20 Apr 2007, Mladen Turk wrote:

> Faheem Mitha wrote:
>> 
>> Ok, thanks for your help. This is the portion of the log generated by 
>> mod_jk, which I presume is what is relevant. The formatting is not optimal, 
>> but I can try to wrap it if desired.
>> 
>
> The server wide directives:
> JkWorkersFile, etc must not be defined inside VirtualHost
> Put those in root.

Hi,

The relevant section of the apache config file follows. As you can see, 
everything in currently inside VirtualHost.

What directives can be safely left inside VirtualHost?

The documentation clearly states that

"You can use the JkMount directive at the top level or inside 
<VirtualHost> sections of your httpd.conf file." Does everything else have 
to be outside?

Thanks for pointing this out. It is so easy to miss the obvious.

                                                           Faheem.

**************************************************************************

<VirtualHost 152.3.172.60:443>
     ServerName dulcicore.dulci.org
     # 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 debug

     # 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 /* 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>


---------------------------------------------------------------------
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: problems configuring mod_jk

Posted by Mladen Turk <ml...@gmail.com>.
Faheem Mitha wrote:
> 
> Ok, thanks for your help. This is the portion of the log generated by 
> mod_jk, which I presume is what is relevant. The formatting is not 
> optimal, but I can try to wrap it if desired.
>

The server wide directives:
JkWorkersFile, etc must not be defined inside VirtualHost
Put those in root.

Regards,
Mladen.

---------------------------------------------------------------------
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: problems configuring mod_jk

Posted by Faheem Mitha <fa...@email.unc.edu>.

On Fri, 20 Apr 2007, Rainer Jung wrote:

> Please post the log parts (debug log level) which appear when starting 
> apache. Those are the lines that show, how mod_jk parses your 
> workers.properties, and which internal objects it generates out of it.

Hi Rainer,

Ok, thanks for your help. This is the portion of the log generated by 
mod_jk, which I presume is what is relevant. The formatting is not 
optimal, but I can try to wrap it if desired.

                                                                 Faheem.

***********************************************************************

[Fri Apr 20 11:14:40 2007] [32052:9664] [debug] do_shm_open::jk_shm.c (295): Truncated shared memory to 28800
[Fri Apr 20 11:14:40 2007] [32052:9664] [debug] do_shm_open::jk_shm.c (327): Initialized shared memory size=28800 free=28672 addr=0x2af709b07000
[Fri Apr 20 11:14:40 2007] [32052:9664] [debug] do_shm_open_lock::jk_shm.c (234): Opened shared memory lock /var/log/apache2/jk-runtime-status.lock
[Fri Apr 20 11:14:40 2007] [32052:9664] [debug] init_jk::mod_jk.c (2355): Initialized shm:/var/log/apache2/jk-runtime-status
[Fri Apr 20 11:14:40 2007] [32052:9664] [debug] uri_worker_map_open::jk_uri_worker_map.c (361): rule map size is 0
[Fri Apr 20 11:14:40 2007] [32052:9664] [debug] build_worker_map::jk_worker.c (236): creating worker ajp13
[Fri Apr 20 11:14:40 2007] [32052:9664] [debug] wc_create_worker::jk_worker.c (141): about to create instance ajp13 of ajp13
[Fri Apr 20 11:14:40 2007] [32052:9664] [debug] wc_create_worker::jk_worker.c (154): about to validate and init ajp13
[Fri Apr 20 11:14:40 2007] [32052:9664] [debug] ajp_validate::jk_ajp_common.c (1842): worker ajp13 contact is 'localhost:8009'
[Fri Apr 20 11:14:40 2007] [32052:9664] [debug] ajp_init::jk_ajp_common.c (1965): setting endpoint options:
[Fri Apr 20 11:14:40 2007] [32052:9664] [debug] ajp_init::jk_ajp_common.c (1968): keepalive:        0
[Fri Apr 20 11:14:40 2007] [32052:9664] [debug] ajp_init::jk_ajp_common.c (1972): timeout:          -1
[Fri Apr 20 11:14:40 2007] [32052:9664] [debug] ajp_init::jk_ajp_common.c (1976): buffer size:      0
[Fri Apr 20 11:14:40 2007] [32052:9664] [debug] ajp_init::jk_ajp_common.c (1980): pool timeout:     0
[Fri Apr 20 11:14:40 2007] [32052:9664] [debug] ajp_init::jk_ajp_common.c (1984): connect timeout:  0
[Fri Apr 20 11:14:40 2007] [32052:9664] [debug] ajp_init::jk_ajp_common.c (1988): reply timeout:    0
[Fri Apr 20 11:14:40 2007] [32052:9664] [debug] ajp_init::jk_ajp_common.c (1992): prepost timeout:  0
[Fri Apr 20 11:14:40 2007] [32052:9664] [debug] ajp_init::jk_ajp_common.c (1996): recovery options: 0
[Fri Apr 20 11:14:40 2007] [32052:9664] [debug] ajp_init::jk_ajp_common.c (2000): retries:          2
[Fri Apr 20 11:14:40 2007] [32052:9664] [debug] ajp_create_endpoint_cache::jk_ajp_common.c (1879): setting connection pool size to 25 with min 12
[Fri Apr 20 11:14:40 2007] [32053:9664] [debug] do_shm_open::jk_shm.c (295): Truncated shared memory to 28800
[Fri Apr 20 11:14:40 2007] [32053:9664] [debug] do_shm_open::jk_shm.c (327): Initialized shared memory size=28800 free=28672 addr=0x2af705d23000
[Fri Apr 20 11:14:40 2007] [32053:9664] [debug] do_shm_open_lock::jk_shm.c (234): Opened shared memory lock /var/log/apache2/jk-runtime-status.lock
[Fri Apr 20 11:14:40 2007] [32053:9664] [debug] init_jk::mod_jk.c (2355): Initialized shm:/var/log/apache2/jk-runtime-status
[Fri Apr 20 11:14:40 2007] [32053:9664] [debug] uri_worker_map_open::jk_uri_worker_map.c (361): rule map size is 0
[Fri Apr 20 11:14:40 2007] [32053:9664] [debug] build_worker_map::jk_worker.c (236): creating worker ajp13
[Fri Apr 20 11:14:40 2007] [32053:9664] [debug] wc_create_worker::jk_worker.c (141): about to create instance ajp13 of ajp13
[Fri Apr 20 11:14:40 2007] [32053:9664] [debug] wc_create_worker::jk_worker.c (154): about to validate and init ajp13
[Fri Apr 20 11:14:40 2007] [32053:9664] [debug] ajp_validate::jk_ajp_common.c (1842): worker ajp13 contact is 'localhost:8009'
[Fri Apr 20 11:14:40 2007] [32053:9664] [debug] ajp_init::jk_ajp_common.c (1965): setting endpoint options:
[Fri Apr 20 11:14:40 2007] [32053:9664] [debug] ajp_init::jk_ajp_common.c (1968): keepalive:        0
[Fri Apr 20 11:14:40 2007] [32053:9664] [debug] ajp_init::jk_ajp_common.c (1972): timeout:          -1
[Fri Apr 20 11:14:40 2007] [32053:9664] [debug] ajp_init::jk_ajp_common.c (1976): buffer size:      0
[Fri Apr 20 11:14:40 2007] [32053:9664] [debug] ajp_init::jk_ajp_common.c (1980): pool timeout:     0
[Fri Apr 20 11:14:40 2007] [32053:9664] [debug] ajp_init::jk_ajp_common.c (1984): connect timeout:  0
[Fri Apr 20 11:14:40 2007] [32053:9664] [debug] ajp_init::jk_ajp_common.c (1988): reply timeout:    0
[Fri Apr 20 11:14:40 2007] [32053:9664] [debug] ajp_init::jk_ajp_common.c (1992): prepost timeout:  0
[Fri Apr 20 11:14:40 2007] [32053:9664] [debug] ajp_init::jk_ajp_common.c (1996): recovery options: 0
[Fri Apr 20 11:14:40 2007] [32053:9664] [debug] ajp_init::jk_ajp_common.c (2000): retries:          2
[Fri Apr 20 11:14:40 2007] [32053:9664] [debug] ajp_create_endpoint_cache::jk_ajp_common.c (1879): setting connection pool size to 25 with min 12
[Fri Apr 20 11:14:40 2007] [32061:9664] [debug] do_shm_open::jk_shm.c (252): Shared memory is already open
[Fri Apr 20 11:14:40 2007] [32061:9664] [debug] jk_child_init::mod_jk.c (2311): Attached shm:/var/log/apache2/jk-runtime-status
[Fri Apr 20 11:14:40 2007] [32061:9664] [debug] jk_child_init::mod_jk.c (2321): Initialized mod_jk/1.2.18
[Fri Apr 20 11:14:40 2007] [32063:9664] [debug] do_shm_open::jk_shm.c (252): Shared memory is already open
[Fri Apr 20 11:14:40 2007] [32063:9664] [debug] jk_child_init::mod_jk.c (2311): Attached shm:/var/log/apache2/jk-runtime-status
[Fri Apr 20 11:14:40 2007] [32063:9664] [debug] jk_child_init::mod_jk.c (2321): Initialized mod_jk/1.2.18

---------------------------------------------------------------------
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: problems configuring mod_jk

Posted by Rainer Jung <ra...@kippdata.de>.
Please post the log parts (debug log level) which appear when starting 
apache. Those are the lines that show, how mod_jk parses your 
workers.properties, and which internal objects it generates out of it.

---------------------------------------------------------------------
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: problems configuring mod_jk

Posted by Faheem Mitha <fa...@email.unc.edu>.

On Thu, 19 Apr 2007, Mladen Turk wrote:

> Well, will you uncomment the worker.list directive or not?
> If you choose not to then it will always give you the log like this.

The worker.list directive was always uncommented. When I sent the original 
message, I think there was some kind of error which made it look like it 
was commented. Anyway, it is definitely uncommented now, but the error 
persists.

> Faheem Mitha wrote:
>> 
>> wc_get_worker_for_name::jk_worker.c (111): did not find a worker 
>> ajp13_worker
>
> This means that the ajp13_worker is not listed in worker.list=

Could it be anything else?

Thanks.                                                        Faheem.

---------------------------------------------------------------------
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: problems configuring mod_jk

Posted by Mladen Turk <ml...@gmail.com>.
Well, will you uncomment the worker.list directive or not?
If you choose not to then it will always give you the log like this.

Faheem Mitha wrote:
> 
> wc_get_worker_for_name::jk_worker.c (111): did not find a worker 
> ajp13_worker

This means that the ajp13_worker is not listed in worker.list=


Regards,
Mladen.

---------------------------------------------------------------------
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: problems configuring mod_jk

Posted by Faheem Mitha <fa...@email.unc.edu>.

On Thu, 19 Apr 2007, Rainer Jung wrote:

> Debugging: via JkLogLevel debug, try to check, if your configured objects 
> appear in the debug log and of course you are free to post the log.

Hi Rainer,

Thanks for your message.

The relevant output from /var/log/apache2/mod_jk.log is appended below:

*********************************************************************************
[Thu Apr 19 11:33:34 2007] [23164:18784] [debug] 
map_uri_to_worker::jk_uri_worker_map.c (508): Attempting to map URI '/' from 1 maps
[Thu Apr 19 11:33:34 2007] [23164:18784] [debug] 
map_uri_to_worker::jk_uri_worker_map.c (520): Attempting to map context URI '/*'
[Thu Apr 19 11:33:34 2007] [23164:18784] [debug] 
map_uri_to_worker::jk_uri_worker_map.c (534): Found a wildchar match ajp13_worker -> /*
[Thu Apr 19 11:33:34 2007] [23164:18784] [debug] jk_handler::mod_jk.c 
(1832): Into handler jakarta-servlet worker=ajp13_worker r->proxyreq=0
[Thu Apr 19 11:33:34 2007] [23164:18784] [debug] 
wc_get_worker_for_name::jk_worker.c (111): did not find a worker ajp13_worker
[Thu Apr 19 11:33:34 2007] [23164:18784] [info]  jk_handler::mod_jk.c 
(1986): Could not find a worker for worker name=ajp13_worker
**********************************************************************************

The relevant output from the tomcat logs is appended below.

So, the communication between apache and tomcat is screwed up. Just 
wondering if the interface that tomcat is listening on is correct, or 
could this be the problem?

INFO: JK: ajp13 listening on /0.0.0.0:8009

Thanks.                                                       Faheem.

**********************************************************************************
Apr 19, 2007 11:36:01 AM org.apache.coyote.http11.Http11BaseProtocol pause
INFO: Pausing Coyote HTTP/1.1 on http-core.dulci.org%2F152.3.172.111-443
Apr 19, 2007 11:36:02 AM org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
Apr 19, 2007 11:36:02 AM org.apache.coyote.http11.Http11BaseProtocol 
destroy
INFO: Stopping Coyote HTTP/1.1 on http-core.dulci.org%2F152.3.172.111-443
Apr 19, 2007 11:36:02 AM org.apache.catalina.core.AprLifecycleListener 
lifecycleEvent
INFO: Failed shutdown of Apache Portable Runtime
Apr 19, 2007 11:36:10 AM org.apache.catalina.core.AprLifecycleListener 
lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal performance in 
production environments was not found on the java.library.path: 
/usr/lib/j2sdk1.
5-sun/jre/lib/amd64/server:/usr/lib/j2sdk1.5-sun/jre/lib/amd64
Apr 19, 2007 11:36:10 AM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on 
http-core.dulci.org%2F152.3.172.111-443
Apr 19, 2007 11:36:10 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1538 ms
Apr 19, 2007 11:36:10 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Apr 19, 2007 11:36:10 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5
Apr 19, 2007 11:36:10 AM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Apr 19, 2007 11:36:13 AM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-core.dulci.org%2F152.3.172.111-443
Apr 19, 2007 11:36:13 AM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Apr 19, 2007 11:36:13 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/31  config=null
Apr 19, 2007 11:36:13 AM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Apr 19, 2007 11:36:13 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 3243 ms
****************************************************************************

---------------------------------------------------------------------
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: problems configuring mod_jk

Posted by Rainer Jung <ra...@kippdata.de>.
Debugging: via JkLogLevel debug, try to check, if your configured 
objects appear in the debug log and of course you are free to post the log.

Faheem Mitha wrote:
> 
> 
> 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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: problems configuring mod_jk

Posted by Faheem Mitha <fa...@email.unc.edu>.

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: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>> 
>
> -- 
> --
> 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: 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


Re: problems configuring mod_jk

Posted by Rainer Jung <ra...@kippdata.de>.
Your worker.list entry is only a comment :(

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: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 

-- 
--
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
Geschäftsführer: Dr. Thomas Höfer, 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
Geschäftsführer: Dr. Thomas Höfer, Rainer Jung, Sven Maurmann

---------------------------------------------------------------------
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