tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Atreya Basu <atr...@greenfieldresearch.ca>
Subject RE: Need your help about In-process jk2 connection between Tomcat and Apache on Windows 2000
Date Wed, 16 Jul 2003 10:44:59 GMT
Hi Cui,

I think that you are missing the shm directive in workers2.properties
and jk2.properties.  Adding that directive should make everything go.

_____________________________________
Atreya Basu
Developer,
Greenfield Research Inc.
e-mail: atreya (at) greenfieldresearch (dot) ca

-----Original Message-----
From: Cui Xiaojing-a13339 [mailto:a13339@motorola.com] 
Sent: July 16, 2003 7:00 AM
To: Tomcat Users List
Subject: Need your help about In-process jk2 connection between Tomcat
and Apache on Windows 2000

Hello All,

I am doing in-process connection for Tomcat and Apache using jk2 on
Windows 2000. The installed components are as below:

Tomcat 4.1.24
Apache 2.0.46
mod_jk2-2.0.43.dll

I have done following operation:
1. Install Tomcat in E:\jartomcatflex, it is correct.
2. Install Apache in E:\Apache2.0.46\Apache2, it is correct.
3. copy mod_jk2-2.0.43.dll to
E:\Apache2.0.46\Apache2\modules\mod_jk2.dll
4. Add following command line in httpd.conf:
	LoadModule jk2_module modules/mod_jk2.dll
5. Add workers2.properties file under E:\Apache2.0.46\Apache2\conf, it
likes below:

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

			# Define the parameters for the Java Virtual
Machine
			[vm:]
			info=Parameters used to load a JVM in the server
process
	
OPT=-Djava.class.path=e:\jartomcatflex\bin\tomcat-jni.jar
			OPT=-Dtomcat.home=e:\jartomcatflex
			OPT=-Dcatalina.home=e:\jartomcatflex
			OPT=-Xmx128M

			# JNI worker startup handler
			[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=e:\Apache2.0.46\Apache2\logs\stdout.log
			stderr=e:\Apache2.0.46\Apache2\logs\stderr.log

			# JNI worker shutdown handler
			[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

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

6. Modify jk2.properties as below:
		   # Add the apr and channelJni to the list of handlers
			handler.list=apr,request,container,channelJni
			# The native libraries will be registered by JK2
			apr.jniModeSo=inprocess

7. Comments part I, uncomments part II in server.xml

	Part I
			 <!-- commented out because we don't need a
standalone service -->
			    <!--Connector
className="org.apache.coyote.tomcat4.CoyoteConnector"
			               port="9080" minProcessors="5"
maxProcessors="75"
			               enableLookups="true"
redirectPort="9443"
			               acceptCount="100" debug="0"
connectionTimeout="20000"
			               useURIValidationHack="false"
disableUploadTimeout="true" /-->

		Part II
			<!-- Define a Coyote/JK2 AJP 1.3 Connector on
port 9009 -->
			    <Connector
className="org.apache.coyote.tomcat4.CoyoteConnector"
			               port="9009" minProcessors="5"
maxProcessors="75"
			               enableLookups="true"
redirectPort="9443"
			               acceptCount="10" debug="0"
connectionTimeout="0"
			               useURIValidationHack="false"
	
protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"/>

8. Startup Apache using below command:

	Apache -k start

9. Test using http://localhost/examples/, then shown:

			Internal Server Error
			The server encountered an internal error or
misconfiguration and was unable to complete your request.
			Please contact the server administrator,
a13339@email.mot.com 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.46 (Win32) mod_jk2/2.0.2 Server at
localhost Port 80

The error log file shows:
			[Wed Jul 16 18:01:53 2003] [error]
lb.getWorker() reenable ajp13:jni
			[Wed Jul 16 18:01:53 2003] [error]
workerEnv.init() create slot epStat.0 failed
			[Wed Jul 16 18:01:54 2003] [error] lb.service()
worker failed 120000 for ajp13:jni
			[Wed Jul 16 18:01:54 2003] [error] lb.service()
unrecoverable error...
			[Wed Jul 16 18:01:54 2003] [error]
mod_jk.handler() Error connecting to tomcat 120000

The stderr log file shows:
			TomcatStarter: main()
			Try  org.apache.tomcat.startup.Main
			Try
org.apache.catalina.startup.BootstrapService
			Starting
org.apache.catalina.startup.BootstrapService
			Created catalinaLoader in:
e:\jartomcatflex\server\lib
			2003-7-16 17:53:01
org.apache.commons.modeler.Registry loadRegistry
			info: Loading registry information
			2003-7-16 17:53:02
org.apache.commons.modeler.Registry getRegistry
			info: Creating new Registry instance
			2003-7-16 17:53:03
org.apache.commons.modeler.Registry getServer
			info: Creating MBeanServer
			2003-7-16 17:53:12 org.apache.jk.apr.AprImpl
init
			info: JK2: Initialized apr
			2003-7-16 17:53:12
org.apache.jk.common.ChannelJni init
			info: JK2: listening on channel.jni:jni
			2003-7-16 17:53:12
org.apache.jk.common.ChannelSocket init
			info: JK2: ajp13 listening on /0.0.0.0:9009
			2003-7-16 17:53:12 org.apache.jk.server.JkMain
start
			info: Jk running ID=0 time=0/100
config=e:\jartomcatflex\conf\jk2.properties

The stdout log file shows:
			Bootstrap: Create Catalina server
			Bootstrap: Starting service
			Starting service Tomcat-Standalone
			Apache Tomcat/4.1.24
			Bootstrap: Service started
			TomcatStarter: Done

Could you please give me some suggestion about the issue. Thanks a lot.

Regards,
Xiaojing


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org




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