Rename the attached files accordingly, my email server filtered the
originals out.
-----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]
[logger]
level=error
[config:]
#file=${serverRoot}/conf/workers2.properties
file=c:/Apache2/conf/workers2.properties
debug=0
debugEnv=0
[uriMap:]
info=Maps the requests. Options: debug
debug=0
[shm:]
file=${serverRoot}/logs/shm.file
size=1048576
[workerEnv:]
info=Global server options
timing=1
debug=0
[lb:lb]
info=Default load balancer.
debug=0
# Example socket channel, override port and host.
[channel.socket:localhost:8009]
info=Ajp13 forwarding over socket
port=8009
lb_factor=1
group=lb
host=localhost
disabled=0
# define the worker
[ajp13:localhost:8009]
channel=channel.socket:localhost:8009
[channel.jni:jni]
info=The jni channel, used if tomcat is started inprocess
disabled=0
[status:]
info=Status worker, displays runtime informations
[vm:]
info=Parameters used to load a JVM in the server process
#JVM=C:\Program Files\Java\j2re1.4.0_01\bin\client\jvm.dll (Read from registry)
OPT=-Djava.class.path=c:/Tomcat/bin/tomcat-jni.jar
OPT=-Dtomcat.home=c:/Tomcat
OPT=-Dcatalina.home=c:/Tomcat
OPT=-Xmx128M
#OPT=-Djava.compiler=NONE
disabled=0
[worker.jni:onStartup]
info=Command to be executed by the VM on startup. This one will start tomcat.
class=org/apache/jk/apr/TomcatStarter
ARG=start
disabled=0
stdout=c:/Apache2/logs/stdout.log
stderr=c:/Apache2/logs/stderr.log
[worker.jni:onShutdown]
info=Command to be executed by the VM on shutdown. This one will stop tomcat.
class=org/apache/jk/apr/TomcatStarter
ARG=stop
disabled=0
[uri:/examples/*.jsp]
info=Examples default context.
group=lb
debug=0
[uri:/examples/servlet/*]
info=examples default context.
group=lb
debug=0
[status:status]
# Uri mapping
[uri:/jkstatus/*]
worker=status:status
## 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.
# 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=c:/Apache2/logs/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
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]