tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antonio García Blesa <a...@sgi.es>
Subject JK2 in-process (JNI) + tomcat 4.1.27 + apache httpd 2.0.48
Date Mon, 30 Aug 2004 17:46:28 GMT

Hello,

I have configured an apache httpd 2.0.48 together with a tomcat 4.1.27, 
using the mod_jk2 in JNI mode to connect them.

Everything runs correctly but sometimes the server returns an http error 
500 and the following lines are logged:

[Mon Aug 30 19:10:58 2004] [error] lb_worker.service() all workers in 
error or disabled state
[Mon Aug 30 19:10:58 2004] [error] mod_jk.handler() Error connecting to 
tomcat 120000

It seems that the java vm is only attached to one Apache web server 
process and when other Apache process obtains the request the error appears.

Any idea?

Regards,
Tony García

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

* This is the log when the server start:

[Mon Aug 30 19:08:00 2004] [notice] Apache/2.0.48 (Unix) mod_jk2/2.0.2 
configured -- resuming normal operations
[Mon Aug 30 19:08:00 2004] [info] Server built: Aug 30 2004 17:03:00
[Mon Aug 30 19:08:00 2004] [debug] worker.c(1733): AcceptMutex: sysvsem 
(default: sysvsem)
[Mon Aug 30 19:08:00 2004] [error] vm.init(): no jvm_dll_path, will use 
LD_LIBRARY_PATH libjvm.so
[Mon Aug 30 19:08:00 2004] [error] vm.init(): no jvm_dll_path, will use 
LD_LIBRARY_PATH libjvm.so
[Mon Aug 30 19:08:00 2004] [error] workerEnv.initChannel() init failed 
for channel.jni:jni
[Mon Aug 30 19:08:00 2004] [error] workerEnv.initWorkers() init failed 
for worker.jni:onStartup
[Mon Aug 30 19:08:00 2004] [error] workerEnv.initWorkers() init failed 
for worker.jni:onShutdown
TomcatStarter: main()
Try  org.apache.tomcat.startup.Main
Try  org.apache.catalina.startup.BootstrapService
[Mon Aug 30 19:08:00 2004] [error] mod_jk child init 1 0
Starting org.apache.catalina.startup.BootstrapService
[Mon Aug 30 19:08:01 2004] [error] vm.init(): no jvm_dll_path, will use 
LD_LIBRARY_PATH libjvm.so
Created catalinaLoader in: 
/opt/celle/mod_jk2_jni/jakarta-tomcat-4.1.27//server/lib
[Mon Aug 30 19:08:02 2004] [error] workerEnv.initChannel() init failed 
for channel.jni:jni
[Mon Aug 30 19:08:02 2004] [error] workerEnv.initWorkers() init failed 
for worker.jni:onStartup
[Mon Aug 30 19:08:02 2004] [error] workerEnv.initWorkers() init failed 
for worker.jni:onShutdown
Aug 30, 2004 7:08:06 PM org.apache.commons.modeler.Registry loadRegistry
INFO: Loading registry information
Aug 30, 2004 7:08:06 PM org.apache.commons.modeler.Registry getRegistry
INFO: Creating new Registry instance
Aug 30, 2004 7:08:08 PM org.apache.commons.modeler.Registry getServer
INFO: Creating MBeanServer
Aug 30, 2004 7:08:12 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on port 8080
Aug 30, 2004 7:08:25 PM org.apache.struts.util.PropertyMessageResources 
<init>
INFO: Initializing, config='org.apache.struts.util.LocalStrings', 
returnNull=true
Aug 30, 2004 7:08:25 PM org.apache.struts.util.PropertyMessageResources 
<init>
INFO: Initializing, config='org.apache.struts.action.ActionResources', 
returnNull=true
Aug 30, 2004 7:08:29 PM org.apache.struts.util.PropertyMessageResources 
<init>
INFO: Initializing, 
config='org.apache.webapp.admin.ApplicationResources', returnNull=true
Aug 30, 2004 7:08:36 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on port 8080
Aug 30, 2004 7:08:36 PM org.apache.jk.apr.AprImpl init
INFO: JK2: Initialized apr
Aug 30, 2004 7:08:36 PM org.apache.jk.common.ChannelJni init
INFO: JK2: listening on channel.jni:jni
Aug 30, 2004 7:08:36 PM org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009
Aug 30, 2004 7:08:37 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=1/438 
config=/opt/celle/mod_jk2_jni/jakarta-tomcat-4.1.27/conf/jk2.properties

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

* workers2.properties:

#[logger]
#level=DEBUG

[config:]
file=${serverRoot}/conf/workers2.properties
debug=0
debugEnv=0

[uriMap:]
info=Maps the requests. Options: debug
debug=0

[shm:]
info=Scoreboard. Required for reconfiguration and status with 
multiprocess servers
file=${serverRoot}/logs/jk2.shm
size=1000000
debug=0
disabled=0

[workerEnv:]
info=Global server options
timing=1
debug=0

[lb:lb]
info=Default load balancer.
debug=0

[channel.jni:jni]
info=The jni channel, used if tomcat is started inprocess

[status:]
info=Status worker, displays runtime informations

[vm:][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=${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
disabled=0

[uri:/examples/*]
info=Map the whole webapp

info=Parameters used to load a JVM in the server process
OPT=-Djava.class.path=/opt/jakarta-tomcat-4.1.27/bin/tomcat-jni.jar:/opt/jakarta-tomcat-4.1.27/lib/commons-logging.jar:/opt/jakarta-tomcat-4.1.27/lib/log4j-1.2.8.jar:/opt/java/lib/tools.jar
OPT=-Dtomcat.home=/opt/jakarta-tomcat-4.1.27/
OPT=-Dcatalina.home=/opt/jakarta-tomcat-4.1.27/
OPT=-Xmx128M
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=${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
disabled=0

[uri:/examples/*]
info=Map the whole webapp


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

* jk2.properties:

# 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
shm.file=/opt/celle/mod_jk2_jni/httpd-2.0.48/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: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message