Use the attached workers2.properties and jk2.properties files.  Also,
comment out the 8080 connector in the server.xml file.  Don't start Tomcat,
Apache will start Tomcat when it initializes.  Tomcat will run inprocess if
started this way.

I'll also forward a good how to that was posted here last September by
Robert Sowders.



-----Original Message-----
From: Chris Dodunski [mailto:[EMAIL PROTECTED]
Sent: Saturday, March 15, 2003 3:09 AM
To: Tomcat Users List
Subject: JK2


Hi all,

This is my first attempt at installing JK2 to make Apache -> Tomcat
communication possible.  Wasn't successful.  Here is an account of events.
If I can get JK2 working, I promise to post a blow by blow diary of how I
went about it.  Documentation on JK2 is lacking, following apache.org
documentation hasn't been successful, and I am apparently not alone.

1) Apache 2.0.44 and Tomcat 4.1.18 each working fine as stand-alone, using
http://localhost and http://localhost:8080 respectively.
2) Copied mod_jk2-2.0.43.dll to [Apache Home]/modules.
3) Added "LoadModule jk2_module modules/mod_jk2-2.0.43.dll" to [Apache
Home]/conf/httpd.conf.
4) Confirmed existance of [Tomcat Home]/conf/jk2.properties.  This reads...

## THIS FILE MAY BE OVERRIDEN AT RUNTIME. MAKE SURE TOMCAT IS STOPED
## WHEN YOU EDIT THE FILE.

## COMMENTS WILL BE _LOST_

## DOCUMENTATION OF THE FORMAT IN JkMain javadoc.

# Set the desired handler list
# handler.list=apr,request,channelJni
#
# Override the default port for the socketChannel
# channelSocket.port=8019
# Default:
# channelUnix.file=${jkHome}/work/jk2.socket
# Just to check if the the config  is working
# shm.file=${jkHome}/work/jk2.shm

# In order to enable jni use any channelJni directive
# channelJni.disabled = 0
# And one of the following directives:

# apr.jniModeSo=/opt/apache2/modules/mod_jk2.so

# If set to inprocess the mod_jk2 will Register natives itself
# This will enable the starting of the Tomcat from mod_jk2
# apr.jniModeSo=inprocess

>>>NOTE: I realise all lines are commented out, but I wasn't concerned as
the apache.org minimum configuration example was also.  This read...

Minimum configuration is the simplest one to make the JK2 working. The used
channel will be socket, and lot of options are used by default. Both the
Tomcat and web server are on the same computer.

jk2.properties:

# The default port is 8009 but you can use another one
# channelSocket.port=8019



5) Created [Apache Home]/conf/workers2.properties (copied form apache.org
minimum configuration example).  This reads...

# Define the communication channel
[channel.socket:localhost:8009]
info=Ajp13 forwarding over socket
tomcatId=localhost:8009

# Map the Tomcat examples webapp to the Web server uri space
[uri:/examples/*]
info=Map the whole webapp

>>>NOTE: At no time did I edit [Tomcat Home]/conf/server.xml.

6) Started Tomcat, waited.
7) Started Apache.
8) Attempted to browse JSP/Servlet examples without the ":8080", but got the
following error message...

Internal Server Error
The server encountered an internal error or misconfiguration and was unable
to complete your request.

Please contact the server administrator, [EMAIL PROTECTED] and inform them of
the time the error occurred, and anything you might have done that may have
caused the error.

More information about this error may be available in the server error log.


----------------------------------------------------------------------------
----

Apache/2.0.44 (Win32) mod_jk2/2.0.2 Server at localhost Port 80

9) Checked Apache error log.  This reads...

[Sat Mar 15 22:49:59 2003] [error] shm.init(): No file
[Sat Mar 15 22:49:59 2003] [notice] Parent: Created child process 2956
[Sat Mar 15 22:49:59 2003] [error] shm.init(): No file
[Sat Mar 15 22:49:59 2003] [notice] Child 2956: Child process is running
[Sat Mar 15 22:49:59 2003] [error] shm.init(): No file
[Sat Mar 15 22:49:59 2003] [error] mod_jk child init 1 0
[Sat Mar 15 22:49:59 2003] [notice] Child 2956: Acquired the start mutex.
[Sat Mar 15 22:49:59 2003] [notice] Child 2956: Starting 250 worker threads.
[Sat Mar 15 22:51:15 2003] [error] workerEnv.init() create slot epStat.0
failed
[Sat Mar 15 22:51:15 2003] [error] lb.service() worker failed 120000 for
ajp13:localhost:8009
[Sat Mar 15 22:51:15 2003] [error] lb.service() unrecoverable error...
[Sat Mar 15 22:51:15 2003] [error] mod_jk.handler() Error connecting to
tomcat 120000
[Sat Mar 15 22:52:24 2003] [error] lb.getWorker() reenable
ajp13:localhost:8009
[Sat Mar 15 22:52:24 2003] [error] workerEnv.init() create slot epStat.0
failed
[Sat Mar 15 22:52:24 2003] [error] lb.service() worker failed 120000 for
ajp13:localhost:8009
[Sat Mar 15 22:52:24 2003] [error] lb.service() unrecoverable error...
[Sat Mar 15 22:52:24 2003] [error] mod_jk.handler() Error connecting to
tomcat 120000
[Sat Mar 15 22:52:43 2003] [error] workerEnv.init() create slot epStat.0
failed
[Sat Mar 15 22:52:43 2003] [error] lb.service() worker failed 120000 for
ajp13:localhost:8009
[Sat Mar 15 22:52:43 2003] [error] lb.service() unrecoverable error...
[Sat Mar 15 22:52:43 2003] [error] mod_jk.handler() Error connecting to
tomcat 120000


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



LEGAL NOTICE
Unless expressly stated otherwise, this message is confidential and may be privileged. 
It is intended for the addressee(s) only. Access to this E-mail by anyone else is 
unauthorized. If you are not an addressee, any disclosure or copying of the contents 
of this E-mail or any action taken (or not taken) in reliance on it is unauthorized 
and may be unlawful. If you are not an addressee, please inform the sender immediately.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to