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



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=1000000
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
classpath=/opt/jakarta-tomcat-4.1.24/server/lib/servlets-manager.jar
classpath=/opt/jakarta-tomcat-4.1.24/server/lib/servlets-webdav.jar
classpath=/opt/jakarta-tomcat-4.1.24/server/lib/tomcat-coyote.jar
classpath=/opt/jakarta-tomcat-4.1.24/server/lib/tomcat-http11.jar
classpath=/opt/jakarta-tomcat-4.1.24/server/lib/tomcat-jk.jar
classpath=/opt/jakarta-tomcat-4.1.24/server/lib/tomcat-jk2.jar
classpath=/opt/jakarta-tomcat-4.1.24/server/lib/tomcat-util.jar
classpath=/opt/jakarta-tomcat-4.1.24/server/lib/tomcat-warp.jar
classpath=/opt/jakarta-tomcat-4.1.24/common/lib/activation.jar
classpath=/opt/jakarta-tomcat-4.1.24/common/lib/ant.jar
classpath=/opt/jakarta-tomcat-4.1.24/common/lib/commons-collections.jar
classpath=/opt/jakarta-tomcat-4.1.24/common/lib/commons-dbcp.jar
classpath=/opt/jakarta-tomcat-4.1.24/common/lib/commons-logging-api.jar
classpath=/opt/jakarta-tomcat-4.1.24/common/lib/commons-pool.jar
classpath=/opt/jakarta-tomcat-4.1.24/common/lib/jasper-compiler.jar
classpath=/opt/jakarta-tomcat-4.1.24/common/lib/jasper-runtime.jar
classpath=/opt/jakarta-tomcat-4.1.24/common/lib/jdbc2_0-stdext.jar
classpath=/opt/jakarta-tomcat-4.1.24/common/lib/jndi.jar
classpath=/opt/jakarta-tomcat-4.1.24/common/lib/jta.jar
classpath=/opt/jakarta-tomcat-4.1.24/common/lib/mail.jar
classpath=/opt/jakarta-tomcat-4.1.24/common/lib/naming-common.jar
classpath=/opt/jakarta-tomcat-4.1.24/common/lib/naming-factory.jar
classpath=/opt/jakarta-tomcat-4.1.24/common/lib/naming-resources.jar
classpath=/opt/jakarta-tomcat-4.1.24/common/lib/servlet.jar
classpath=/opt/jakarta-tomcat-4.1.24/common/endorsed/xercesImpl.jar
classpath=/opt/jakarta-tomcat-4.1.24/common/endorsed/xmlParserAPIs.jar
OPT=-Dtomcat.home=/opt/jakarta-tomcat-4.1.24
OPT=-Dcatalina.home=/opt/jakarta-tomcat-4.1.24
OPT=-Xmx128M
OPT=-Djava.compiler=/opt/j2se/bin/java

# yes, I know that's ugly. I had to pile in the classpath stuff out of frustration because class not found errors kept comming up

[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
stdout=${serverRoot}/logs/stdout.log
stderr=${serverRoot}/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


[uri:/examples/*]
info=Example webapp in the default context.
context=/examples
debug=9


jk2.properties: ---------------

handler.list=apr,request,container,channelJni
apr.jniModeSo=inprocess
shm.file=/opt/apache/logs/jk2.shm


In my server.xml I do have my Coyote/JK2 AJP 1.3 Connector listening on port 8009, the default. I am not even sure if I need this for inprocess but I am not aware of how else pache may communicate with tomcat. Can anyone shed some light here?



Thanks for reading this! -Rob







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



Reply via email to