You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Vincent J. Buonassisi" <vj...@vuit.com> on 2003/05/29 23:54:07 UTC

libjkjni.so

hi,

in the catalina.out file i'm getting the following error:

INFO: APR not loaded, disabling jni components: java.io.IOException: no 
jkjni in java.library.path

i'm confused as to why this library is being searched in the 
java.library.path since this is a .so file.  is there another jkjni 
file?

  i read someplace that libjkjni.so should be placed in 
$catalina_home/bin so i put it in there.  but, it didn't make a 
difference.  should it be placed somewhere else?

thanks,


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


Re: libjkjni.so

Posted by Chong Yu Meng <ch...@cymulacrum.net>.
Vincent J. Buonassisi wrote:

> [Fri May 30 08:38:57 2003] (error ) [jk_config_file.c (279)]   
> config.update(): Can't find config file  
> ${serverRoot}/conf/workers2.properties
> [Fri May 30 08:38:57 2003] ( info ) [jk_config.c (251)]   
> config.setAttribute() Error setting config: file  
> ${serverRoot}/conf/workers2.properties
> [Fri May 30 08:38:57 2003] ( info ) [jk_logger_file.c (184)]   
> Initializing log file stderr
> [Fri May 30 08:38:57 2003] (error ) [jk_shm.c (333)]  shm.init(): No  
> file
> [Fri May 30 08:38:57 2003] ( info ) [jk_workerEnv.c (403)]   
> workerEnv.init() ok ${serverRoot}/conf/workers2.properties
> May 30, 2003 8:38:57 AM org.apache.jk.apr.AprImpl init
> INFO: JK2: Initialized apr
> May 30, 2003 8:38:57 AM org.apache.jk.common.ChannelUn init
> INFO: JK: listening on unix socket: /var/tomcat4/work/jk2.socket
> [Fri May 30 08:38:57 2003] ( info ) [jk_jni_aprImpl.c (472)]   
> jkInvoke() invoke 4d434c76
> May 30, 2003 8:38:57 AM org.apache.jk.common.ChannelSocket init
> INFO: JK2: ajp13 listening on /0.0.0.0:8009
> May 30, 2003 8:38:57 AM org.apache.jk.server.JkMain start
> INFO: Jk running ID=0 time=2/239   
> config=/var/tomcat4/conf/jk2.properties
>
> why would tomcat be trying to access the workers2.properties file?  i  
> thought this file was for the web server.

Hello Vincent !

I'm a little short on time right now, so I will give you the abbreviated 
version :

1. You will need to define $serverRoot externally. I have defined it 
inside my /etc/profile as :
export serverRoot=/etc/httpd2
Just make sure it points to the directory where Apache's executables live.

2. You are also getting the error shm.init(): No file because you did 
not define your shm (shared memory?) file in your workers2.properties. 
My workers2.properties has the following section (put this at the 
beginning of your file) :

[shm:]
info=Scoreboard. Required for reconfiguration and status with multiprocess
servers
file=/var/run/jk2.shm
size=1000000
debug=0
disabled=0

3. You are right in wondering about why Tomcat needs to read the 
workers2.properties file. I'm not sure either. My theory initially was 
this :
- Stage 1 : Tomcat starts up, tries to find if mod_jk2 exists.
- Stage 2 : If exist, Tomcat reads jk2.properties and sets up ports and 
protocols ready for connection
- Stage 3 : Apache starts up. Loads module mod_jk2 and reads 
workers2.properties
- Stage 4 : Apache attempts to "open a channel" (very Star Trek-ish ?) 
to Tomcat via mod_jk2 and the defined socket type (channel socket/JNI/UNIX )
- Stage 5 : If everything starts up ok, Apache outputs a cryptic message 
about "child init 1 -1".

 From the responses to my posts, it appears that Tomcat does NOT 
actually read anything, and that mod_jk2 does most of the work of 
mediating a connection between the 2 software components (apache and 
Tomcat). From my own tests, I was able to get mod_jk2 working with 
channel sockets, the most basic configuration. I was able to confirm 
from the error messages that, indeed, Tomcat does not appear to do 
anything except startup and wait for connections on port 8080 (for 
direct connections to it) and port 8009 (or whichever port your Tomcat 
Coyote connector listens on). My tests with JNI gave very different 
results, but I'm still working out the kinks in that one.

Regards,
pascal chong




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


Re: libjkjni.so

Posted by "Vincent J. Buonassisi" <vj...@vuit.com>.
hi pascal,

that worked!  the jk2.socket file is being created and apache seems to  
be using it after i changed the permissions on the file.  but, i am  
getting the following error when the service starts:

Starting service Tomcat-Standalone
Apache Tomcat/4.1
May 30, 2003 8:38:57 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on port 8180
[Fri May 30 08:38:57 2003] (error ) [jk_config_file.c (279)]   
config.update(): Can't find config file  
${serverRoot}/conf/workers2.properties
[Fri May 30 08:38:57 2003] ( info ) [jk_config.c (251)]   
config.setAttribute() Error setting config: file  
${serverRoot}/conf/workers2.properties
[Fri May 30 08:38:57 2003] ( info ) [jk_logger_file.c (184)]   
Initializing log file stderr
[Fri May 30 08:38:57 2003] (error ) [jk_shm.c (333)]  shm.init(): No  
file
[Fri May 30 08:38:57 2003] ( info ) [jk_workerEnv.c (403)]   
workerEnv.init() ok ${serverRoot}/conf/workers2.properties
May 30, 2003 8:38:57 AM org.apache.jk.apr.AprImpl init
INFO: JK2: Initialized apr
May 30, 2003 8:38:57 AM org.apache.jk.common.ChannelUn init
INFO: JK: listening on unix socket: /var/tomcat4/work/jk2.socket
[Fri May 30 08:38:57 2003] ( info ) [jk_jni_aprImpl.c (472)]   
jkInvoke() invoke 4d434c76
May 30, 2003 8:38:57 AM org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009
May 30, 2003 8:38:57 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=2/239   
config=/var/tomcat4/conf/jk2.properties

why would tomcat be trying to access the workers2.properties file?  i  
thought this file was for the web server.

thanks,


On Giovedì, mag 29, 2003, at 17:02 US/Pacific, Chong Yu Meng wrote:

> Vincent J. Buonassisi wrote:
>
>> INFO: APR not loaded, disabling jni components: java.io.IOException:  
>> no jkjni in java.library.path
>>
>> i read someplace that libjkjni.so should be placed in  
>> $catalina_home/bin so i put it in there.  but, it didn't make a  
>> difference.  should it be placed somewhere else?
>>
> You need to create a symbolic link from your existing jkjni.so. For  
> example, suppose you have jkjni.so inside /usr/lib/apache, you will  
> need to do this :
>
> ln -s /usr/lib/apache/jkjni.so $JAVA_HOME/jre/bin/libjkjni.so
>
> export  
> LD_LIBRARY_PATH=$JAVA_HOME/jre/bin:$JAVA_HOME/jre/bin/ 
> classic:$LD_LIBRARY_PATH
>
> Hope this helps !
>
> Regards,
> pascal chong
>
>
>
> ---------------------------------------------------------------------
> 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


Re: libjkjni.so

Posted by Chong Yu Meng <ch...@cymulacrum.net>.
Vincent J. Buonassisi wrote:

> INFO: APR not loaded, disabling jni components: java.io.IOException: 
> no jkjni in java.library.path
>
> i read someplace that libjkjni.so should be placed in 
> $catalina_home/bin so i put it in there.  but, it didn't make a 
> difference.  should it be placed somewhere else?
>
You need to create a symbolic link from your existing jkjni.so. For 
example, suppose you have jkjni.so inside /usr/lib/apache, you will need 
to do this :

ln -s /usr/lib/apache/jkjni.so $JAVA_HOME/jre/bin/libjkjni.so

export 
LD_LIBRARY_PATH=$JAVA_HOME/jre/bin:$JAVA_HOME/jre/bin/classic:$LD_LIBRARY_PATH

Hope this helps !

Regards,
pascal chong



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