You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Chong Yu Meng <ch...@cymulacrum.net> on 2003/05/28 16:55:52 UTC

Conclusion : mod_jk2 + JNI channel + Linux

To those trying to configure mod_jk2 for channel JNI, here are my findings :

1. There are some significant naming differences -- by this, I mean that 
the conventions used by the developers of mod_jk2 are somewhat different 
from the stock binary installs of Tomcat. This is the cause for so much 
confusion when attempting an install on Linux. Strangely, these problems 
do not surface on the Windows platform (are there differences in the 
Windows and Linux binaries of Tomcat and mod_jk2 ?).

1.1 The default workers2.properties assumes that you have set 
$TOMCAT_HOME. This is your $CATALINA_HOME, but if you do not explicitly 
set this environment variable, the module will not be able to find your 
support files.

1.2 Interestingly enough, the same file assumes that tomcat-jni.jar is 
in $TOMCAT_HOME/lib, when it is actually in $TOMCAT_HOME/bin

1.3 Even if you set all the above correctly, the options it passes to 
the JVM appear to be flawed. Consider the following :

OPT=-Djava.class.path=${CATALINA_HOME}/bin/tomcat-jni.jar;${CATALINA_HOME}/server/lib/commons-logging.jar:${CLASSPATH}

(I substituted all occurrences of TOMCAT_HOME to CATALINA_HOME, and 
added CLASSPATH) I'm not sure if there is an option "java.class.path", 
shouldn't it be "java.classpath"? In any case, the module cannot find 
tomcat-jni.jar. This resulted in my previous error "TomcatStarter not 
found". I had to explicitly add tomcat-jni.jar to my CLASSPATH 
externally (i.e. inside my /etc/profile), AND add ${CLASSPATH} to the 
end of the line above in order for TomcatStarted to be found

2. I was finally able to get Tomcat to start in-process, but a very 
strange thing happened : it tried to start 3 instances of Tomcat! 
Naturally the 2nd and 3rd instances choked with the error that port 8080 
was already in use. An attempt at accessing the servlet examples 
generated 34MB of error data in a few seconds.

My channel socket configuration works fine, but JNI seems to be very 
much a Work-In-Progress, which could explain why it is disabled in the 
default workers2.properties file. Unless I am very much mistaken (and 
please email me if this is so), I would say that the JNI channel, for 
Linux at least, is unusable for now.

Regards,
pascal chong




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