tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cui Xiaojing-a13339 <>
Subject Need your help about In-process jk2 connection between Tomcat and Apache on Windows 2000
Date Wed, 16 Jul 2003 10:00:25 GMT
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

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 file under E:\Apache2.0.46\Apache2\conf, it likes below:

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

			# Define the parameters for the Java Virtual Machine
			info=Parameters used to load a JVM in the server process

			# JNI worker startup handler
			info=Command to be executed by the VM on startup. This one will start tomcat.

			# JNI worker shutdown handler
			info=Command to be executed by the VM on shutdown. This one will stop tomcat.

			# Map the Tomcat examples webapp to the Web server uri space
			info=Map the whole webapp

6. Modify as below:
		   # Add the apr and channelJni to the list of handlers
			# The native libraries will be registered by JK2

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"

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, 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 /
			2003-7-16 17:53:12 org.apache.jk.server.JkMain start
			info: Jk running ID=0 time=0/100  config=e:\jartomcatflex\conf\

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.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message