Hi everyone. This is a long message so please bear with me. :)
I am attempting to get tomcat running 'inprocess' from mod_jk2 under
apache on solaris. I am getting random results, which is very annoying,
hopefully someone can help.
Versions:
os: sparc solaris 8, 32 bit
apache-2.0.44
tomcat-4.1.24
mod_jk2 from jakarta-tomcat-connectors-4.1.24-src
java - j2se-1.4.1-b21
I wish to use the inprocess method of running tomcat because I would
like my users to not have to maintain a 'running' tomcat server as well
as apache.
I have a few problems, which probably stem from a larger problem.
When I start apache, tomcat doesn't always get started, but does
sometimes! When starting apache I see in the error_log:
[Wed Apr 02 13:59:13 2003] [error] workerEnv.initChannel() init failed
for channel.jni:jni
[Wed Apr 02 13:59:13 2003] [error] workerEnv.initWorkers() init failed
for worker.jni:onStartup
[Wed Apr 02 13:59:13 2003] [error] workerEnv.initWorkers() init failed
for worker.jni:onShutdown
[Wed Apr 02 13:59:13 2003] [error] mod_jk child init 1 -2
I see a group of these messages for every apache thread that is started.
Most of the time I get a bunch of these and tomcat does not get
started. I then stop apache, then restart it... if I am lucky I may
only get a couple groups of these failure messages then a success,
tomcat gets started:
[Wed Apr 02 14:01:00 2003] [error] workerEnv.initChannel() init failed
for channel.jni:jni
[Wed Apr 02 14:01:00 2003] [error] workerEnv.initWorkers() init failed
for worker.jni:onStartup
[Wed Apr 02 14:01:00 2003] [error] workerEnv.initWorkers() init failed
for worker.jni:onShutdown
TomcatStarter: main()
Try org.apache.tomcat.startup.Main
Try org.apache.catalina.startup.BootstrapService
[Wed Apr 02 14:01:01 2003] [error] mod_jk child init 1 0
Starting org.apache.catalina.startup.BootstrapService
Created catalinaLoader in: /opt/jakarta-tomcat-4.1.24/server/lib
Apr 2, 2003 2:01:05 PM org.apache.commons.modeler.Registry loadRegistry
INFO: Loading registry information
Apr 2, 2003 2:01:05 PM org.apache.commons.modeler.Registry getRegistry
INFO: Creating new Registry instance
Apr 2, 2003 2:01:07 PM org.apache.commons.modeler.Registry getServer
INFO: Creating MBeanServer
Apr 2, 2003 2:01:42 PM org.apache.jk.apr.AprImpl init
INFO: JK2: Initialized apr
Apr 2, 2003 2:01:42 PM org.apache.jk.common.ChannelJni init
INFO: JK2: listening on channel.jni:jni
Apr 2, 2003 2:01:42 PM org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009
Apr 2, 2003 2:01:42 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=3/230
config=/opt/jakarta-tomcat-4.1.24/conf/jk2.properties
I also see activity in my tomcat based application log. I have
identical results with the examples context.
Now, when it DOES load I only occasionally get a valid response. I hit
http://localhost/examples/servlets/index.html and see the page
displayed, only with a few broken images. I do a shift-reload and some
of the proken images appear, but others become broken. I hit
shift-reload a few times and I get the occasional internal server error
from apache. When either of these occur I see in the error_log:
[Wed Apr 02 14:14:37 2003] [error] lb_worker.service() all workers in
error or disabled state
[Wed Apr 02 14:14:37 2003] [error] mod_jk.handler() Error connecting to
tomcat 12
[Wed Apr 02 14:14:37 2003] [error] lb_worker.service() all workers in
error or disabled state
[Wed Apr 02 14:14:37 2003] [error] mod_jk.handler() Error connecting to
tomcat 12
I have read other people's posts about mod_jk2 and inprocess but have
not seen any reported problems such as these.
Now for some information on my configuration.
workers2.properties:
[shm:]
info=Scoreboard.
file=/opt/apache/logs/jk2.shm
size=100
debug=9
disabled=0
[channel.jni:jni]
info=The jni channel, used if tomcat is started inprocess
[vm:]
info=Parameters used to load a JVM in the server process
JVM=/opt/j2se/jre/lib/sparc/libjvm.so
classpath=/opt/jakarta-tomcat-4.1.24/bin/tomcat-jni.jar
classpath=/opt/jakarta-tomcat-4.1.24/server/lib/catalina-ant.jar
classpath=/opt/jakarta-tomcat-4.1.24/server/lib/catalina.jar
classpath=/opt/jakarta-tomcat-4.1.24/server/lib/commons-beanutils.jar
classpath=/opt/jakarta-tomcat-4.1.24/server/lib/commons-digester.jar
classpath=/opt/jakarta-tomcat-4.1.24/server/lib/commons-logging.jar
classpath=/opt/jakarta-tomcat-4.1.24/server/lib/commons-modeler.jar
classpath=/opt/jakarta-tomcat-4.1.24/server/lib/jaas.jar
classpath=/opt/jakarta-tomcat-4.1.24/server/lib/jakarta-regexp-1.2.jar
classpath=/opt/jakarta-tomcat-4.1.24/server/lib/mx4j-jmx.jar
classpath=/opt/jakarta-tomcat-4.1.24/server/lib/servlets-cgi.jar
classpath=/opt/jakarta-tomcat-4.1.24/server/lib/servlets-common.jar
classpath=/opt/jakarta-tomcat-4.1.24/server/lib/servlets-default.jar
classpath=/opt/jakarta-tomcat-4.1.24/server/lib/servlets-invoker.jar