mod_jk2..tomcat..plese help

Kurt Miller truk at apache.org
Thu Apr 22 08:02:13 PDT 2004


Couple of problems.. see below.

From: "Muhammad Reza" <reza at it.mra.co.id>
> #cat httpd.conf
> --snip--
> LoadModule jk2_module         libexec/apache2/mod_jk2.so
> Include /usr/local/etc/apache2/mod_jk.conf
> ---snap--
> 
> #cat /usr/local/etc/apache2/mod_jk.conf
> <IfModule mod_jk.c>
>        JkWorkersFile /usr/local/etc/apache2/workers2.properties
>        JkLogFile  logs/jk.log
>        JkLogLevel warn
>        JkSet config.file /usr/local/etc/apache2/workers2.properties
>        JkMount /*.jsp localhost
>        JkMount /servlet/* localhost
>        JkMount /examples/* localhost
> </IfModule>
> 

The primary reason you are not connecting to tomcat is
because you are using a mod_jk.conf with mod_jk2. Look in 
/usr/local/share/examples/mod_jk2/ for a sample
of the correct IfModule directives.

> And from Tomcat Side........
> 
> #cat jk2.properties
> handler.list=apr,request,channelJni
> channelSocket.port=8019
> shm.file=${jkHome}/work/jk2.shm
> channelJni.disabled = 0
> apr.jniModeSo=/usr/local/libexec/apache2/mod_jk2.so
> 

I didn't not build in jni support into the binary, so
your handler.list and apr.jniModeSo lines are wrong.
Also, you don't need the shm.file line because your using
anonomous shared memory in workers2.properties. Just
comment out all of the lines in jk2.properties to get started.

> #cat server.xml | grep mod_jk2
> <Listener className="org.apache.ajp.tomcat4.config.ApacheConfig" 
> modJk="/usr/local/libexec/apache2/mod_jk2.so" 
> workersConfig="/usr/local/etc/apache2/workers2.properties"/>
> 

The ApacheConfig class generates apache mod_jk.conf for
mod_jk not mod_jk2. Remove the above listener line for mod_jk2.

The installed server.xml comes with the CoyoteConnector enabled:

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

This is all you need to get started with mod_jk2 in your server.xml.

> When i start tomcat (debug=1) here goes the result........
> 
> #/usr/local/jakarta-tomcat/bin/shutdown.sh start
> Using CATALINA_BASE:   /usr/local/jakarta-tomcat
> Using CATALINA_HOME:   /usr/local/jakarta-tomcat
> Using CATALINA_TMPDIR: /usr/local/jakarta-tomcat/temp
> Using JAVA_HOME:       /usr/local/java
> [INFO] Http11Protocol - -Initializing Coyote HTTP/1.1 on port 8080
> Starting service Tomcat-Standalone
> Apache Tomcat/4.1.29
> [INFO] PropertyMessageResources - -Initializing, 
> config='org.apache.struts.util.LocalStrings', returnNull=true
> [INFO] PropertyMessageResources - -Initializing, 
> config='org.apache.struts.action.ActionResources', returnNull=true
> [INFO] PropertyMessageResources - -Initializing, 
> config='org.apache.webapp.admin.ApplicationResources', returnNull=true
> [INFO] Http11Protocol - -Starting Coyote HTTP/1.1 on port 8080
> [INFO] JkMain - -APR not loaded, disabling jni components: 
> java.io.IOException: java.lang.UnsatisfiedLinkError: no jkjni in 
> java.library.path
> [INFO] ChannelSocket - -JK2: ajp13 listening on 0.0.0.0/0.0.0.0:8009
> [INFO] JkMain - -Jk running ID=0 time=2/177  
> config=/usr/local/jakarta-tomcat/conf/jk2.properties
> 
> i set CATALINA_HOME and JAVA_HOME in my env variable...
> # env | grep java
> JAVA_HOME=/usr/local/java
> CATALINA_HOME=/usr/local/jakarta-tomcat
> 
> The problem is...
> When i try to test the installation with browsing to 
> http://localhost/example , the result is page not found 404 from apache
> [Thu Apr 22 11:50:27 2004] [error] [client 127.0.0.1] File does not 
> exist: /usr/local/www/data/examples
> 
> Is there something i missed ? how to workaround and fix  this problem ? 
> does Tomcat work with Diablo-JDK ?
> Please help me regarding this problem,
> 
> regards
> .:TomBie:.
> 
> 
> 
>     
> 
> _______________________________________________
> freebsd-java at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-java
> To unsubscribe, send any mail to "freebsd-java-unsubscribe at freebsd.org"


More information about the freebsd-java mailing list