You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Gery Kahn <ge...@newmail.net> on 2002/12/27 13:39:58 UTC
How to config mod_jk2 jni with JVM ?
I have linux redhat 7.3, tomcat 4.1.17, apache 1.3.27 with mod_jk2
and jdk 1.4.1_01
How am i configure jni with JVM?
My apache refuses to startup JVM ?
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: How to config mod_jk2 jni with JVM ?
Posted by Gery Kahn <ge...@newmail.net>.
Anthony Marlowe wrote:
> Hi Gery,
>
> How is your workers2.properties and jk2.properties setup?
>
> Here is a excerpt from my Apache2 error_log:
>
> [Fri Dec 27 13:47:31 2002] [notice] workerEnv.init() ok
> /Library/Apache2/conf/workers2.properties
> [Fri Dec 27 13:47:31 2002] [error] mod_jk child init 1 -2 can be ignored
> [Fri Dec 27 13:47:31 2002] [notice] Loaded org/apache/jk/apr/TomcatStarter
> [Fri Dec 27 13:47:31 2002] [notice] jni.init() setting
> stdout=/Library/Apache2/logs/stdout.log...
> [Fri Dec 27 13:47:31 2002] [notice] jni.init() setting
> stderr=/Library/Apache2/logs/stderr.log...
> [Fri Dec 27 13:47:31 2002] [notice] jni.init() ARG start
> [Fri Dec 27 13:47:31 2002] [notice] jni.init() calling main()...
> [Fri Dec 27 13:47:31 2002] [notice] jni.validate() class=
> org/apache/jk/apr/TomcatStarter
> [Fri Dec 27 13:47:31 2002] [notice] Loaded org/apache/jk/apr/TomcatStarter
>
> Apache2 stderr.log and stdout.log
>
> TomcatStarter: main()
> Try org.apache.tomcat.startup.Main
> Try org.apache.catalina.startup.BootstrapService
> Starting org.apache.catalina.startup.BootstrapService
> Created catalinaLoader in:
> /Volumes/Java_Development/jakarta-tomcat-4.1.18/server/lib
> [INFO] Registry - -Loading registry information
> [INFO] Registry - -Creating new Registry instance
> [INFO] Registry - -Creating MBeanServer
> [INFO] AprImpl - -JK2: Initialized apr
> [INFO] ChannelJni - -JK2: listening on channel.jni:jni
> [INFO] ChannelSocket - -JK2: ajp13 listening on 0.0.0.0/0.0.0.0:8009
> [INFO] JkMain - -Jk running ID=0 time=4/111
> config=/Volumes/Java_Development/jakarta-tomcat-4.1.18/conf/ jk2.properties
>
> Bootstrap: Create Catalina server
> StandardEngine[Tomcat-Apache]: setJvmRoute=jvm1
> Bootstrap: Starting service
> Starting service Tomcat-Apache
> Apache Tomcat/4.1.18
> Bootstrap: Service started
> TomcatStarter: Done
> Server 1.6 is running
> Press [Ctrl]+[C] to abort
> Bootstrap: Stopping service
> Stopping service Tomcat-Apache
> Bootstrap: Service stopped
> TomcatStarter: Done
>
> Regards,
>
> Tony
>
>
>
>
>
>
> On Friday, Dec 27, 2002, at 15:19 Europe/Berlin, Gery Kahn wrote:
>
>> Anthony Marlowe wrote:
>>
>>> Hi Gery,[Fri Dec 27 13:47:31 2002] [notice] workerEnv.init() ok
>>> /Library/Apache2/conf/workers2.properties
>>>
>
>>> I using Apache 2.0.43 with mod_jk2 and tomcat 4.1.18
>>> You need to set the following in your workers2.properties:
>>> [vm:]
>>> info=Parameters used to load a JVM in the server process
>>> JVM=this has to point to your JVM. you will probably need the
>>> complete patch and not $JAVA_HOME...
>>> OPT=-Djava.class.path=/Volumes/Java_Development/jakarta-tomcat-
>>> 4.1.18/
>>> bin/tomcat-jni.jar:/Volumes/Java_Development/jakarta-tomcat-4.1.18/
>>> bin/
>>> bootstrap.jar:/Volumes/Java_Development/jakarta-tomcat-4.1.18/server/
>>> lib/commons-logging.jar
>>> OPT=-Dtomcat.home=/Volumes/Java_Development/jakarta-tomcat-4.1.18
>>> OPT=-Dcatalina.home=/Volumes/Java_Development/jakarta-tomcat-4.1.18
>>> OPT=-Xmx256M
>>> #OPT=-Djava.compiler=NONE
>>> disabled=0
>>> Regards,
>>> Tony
>>> On Friday, Dec 27, 2002, at 13:39 Europe/Berlin, Gery Kahn wrote:
>>>
>>>> I have linux redhat 7.3, tomcat 4.1.17, apache 1.3.27 with mod_jk2
>>>> and jdk 1.4.1_01
>>>>
>>>> How am i configure jni with JVM?
>>>> My apache refuses to startup JVM ?
>>>>
>>>>
>>>>
>>>> --
>>>> To unsubscribe, e-mail:
>>>> <ma...@jakarta.apache.org>
>>>> For additional commands, e-mail:
>>>> <ma...@jakarta.apache.org>
>>>>
>>> --
>>> To unsubscribe, e-mail:
>>> <ma...@jakarta.apache.org>
>>> For additional commands, e-mail:
>>> <ma...@jakarta.apache.org>
>>
>> i did like you said and got jk2.log with follows :
>>
>> [Fri Dec 27 16:17:53 2002] ( info ) [jk_vm_default.c (500)]
>> vm.init(): Jni lib:
>> /usr/java/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so
>> [Fri Dec 27 16:17:53 2002] (emerg ) [jk_vm_default.c (600)] Fail->
>> could not create JVM, code: -1
>>
>>
>>
>> --
>> To unsubscribe, e-mail:
>> <ma...@jakarta.apache.org>
>> For additional commands, e-mail:
>> <ma...@jakarta.apache.org>
>>
>
Well.
My jk2.properties file only have follows:
handler.list=apr,request,channelJni
apr.jniModeSo=inprocess
The workers2.properties have:
[logger]
level=DEBUG
[config:]
file=${serverRoot}/conf/workers2.properties
debug=2
debugEnv=0
[uriMap:]
info=Maps the requests. Options: debug
debug=0
d[shm:]
info=Scoreboard. Required for reconfiguration and status with
multiprocess servers
file=${serverRoot}/logs/jk2.shm
size=1000000
debug=0
disabled=0
[workerEnv:]
info=Global server options
timing=1
debug=0
[channel.jni:jni]
info=The jni channel, used if tomcat is started inprocess
[vm:]
info=Parameters used to load a JVM in the server process
JVM=/usr/java/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so
OPT=-Djava.class.path=/var/tomcat4/bin/tomcat-jni.jar:/var/tomcat4/bin/bootstrap.jar:/var/tomcat4/server/lib/commons-logging.jar
OPT=-Djava.library.path=/usr/java/j2sdk1.4.1_01/jre/lib:/usr/java/j2sdk1.4.1_01/jre/lib/i386:/usr/java/j2sdk1.4.1_01/jre/lib/i386/client
OPT=-Dtomcat.home=/var/tomcat4
OPT=-Dcatalina.home=/var/tomcat4
OPT=-Xmx256M
debug=99
disabled=0
[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
disabled=0
stdout=${serverRoot}/logs/stdout.log
stderr=${serverRoot}/logs/stderr.log
debug=99
[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
disabled=0
Actualy i found that the function jk2_vm_initVM() returns false.
Does it looks familiar to you?
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: How to config mod_jk2 jni with JVM ?
Posted by Anthony Marlowe <am...@mac.com>.
Hi Gery,
How is your workers2.properties and jk2.properties setup?
Here is a excerpt from my Apache2 error_log:
[Fri Dec 27 13:47:31 2002] [notice] workerEnv.init() ok
/Library/Apache2/conf/workers2.properties
[Fri Dec 27 13:47:31 2002] [error] mod_jk child init 1 -2 can be ignored
[Fri Dec 27 13:47:31 2002] [notice] Loaded
org/apache/jk/apr/TomcatStarter
[Fri Dec 27 13:47:31 2002] [notice] jni.init() setting
stdout=/Library/Apache2/logs/stdout.log...
[Fri Dec 27 13:47:31 2002] [notice] jni.init() setting
stderr=/Library/Apache2/logs/stderr.log...
[Fri Dec 27 13:47:31 2002] [notice] jni.init() ARG start
[Fri Dec 27 13:47:31 2002] [notice] jni.init() calling main()...
[Fri Dec 27 13:47:31 2002] [notice] jni.validate() class=
org/apache/jk/apr/TomcatStarter
[Fri Dec 27 13:47:31 2002] [notice] Loaded
org/apache/jk/apr/TomcatStarter
Apache2 stderr.log and stdout.log
TomcatStarter: main()
Try org.apache.tomcat.startup.Main
Try org.apache.catalina.startup.BootstrapService
Starting org.apache.catalina.startup.BootstrapService
Created catalinaLoader in:
/Volumes/Java_Development/jakarta-tomcat-4.1.18/server/lib
[INFO] Registry - -Loading registry information
[INFO] Registry - -Creating new Registry instance
[INFO] Registry - -Creating MBeanServer
[INFO] AprImpl - -JK2: Initialized apr
[INFO] ChannelJni - -JK2: listening on channel.jni:jni
[INFO] ChannelSocket - -JK2: ajp13 listening on 0.0.0.0/0.0.0.0:8009
[INFO] JkMain - -Jk running ID=0 time=4/111
config=/Volumes/Java_Development/jakarta-tomcat-4.1.18/conf/
jk2.properties
Bootstrap: Create Catalina server
StandardEngine[Tomcat-Apache]: setJvmRoute=jvm1
Bootstrap: Starting service
Starting service Tomcat-Apache
Apache Tomcat/4.1.18
Bootstrap: Service started
TomcatStarter: Done
Server 1.6 is running
Press [Ctrl]+[C] to abort
Bootstrap: Stopping service
Stopping service Tomcat-Apache
Bootstrap: Service stopped
TomcatStarter: Done
Regards,
Tony
On Friday, Dec 27, 2002, at 15:19 Europe/Berlin, Gery Kahn wrote:
> Anthony Marlowe wrote:
>> Hi Gery,[Fri Dec 27 13:47:31 2002] [notice] workerEnv.init() ok
>> /Library/Apache2/conf/workers2.properties
>>
>> I using Apache 2.0.43 with mod_jk2 and tomcat 4.1.18
>> You need to set the following in your workers2.properties:
>> [vm:]
>> info=Parameters used to load a JVM in the server process
>> JVM=this has to point to your JVM. you will probably need the
>> complete patch and not $JAVA_HOME...
>> OPT=-Djava.class.path=/Volumes/Java_Development/jakarta-tomcat-
>> 4.1.18/
>> bin/tomcat-jni.jar:/Volumes/Java_Development/jakarta-tomcat-4.1.18/
>> bin/
>> bootstrap.jar:/Volumes/Java_Development/jakarta-tomcat-4.1.18/server/
>> lib/commons-logging.jar
>> OPT=-Dtomcat.home=/Volumes/Java_Development/jakarta-tomcat-4.1.18
>> OPT=-Dcatalina.home=/Volumes/Java_Development/jakarta-tomcat-4.1.18
>> OPT=-Xmx256M
>> #OPT=-Djava.compiler=NONE
>> disabled=0
>> Regards,
>> Tony
>> On Friday, Dec 27, 2002, at 13:39 Europe/Berlin, Gery Kahn wrote:
>>> I have linux redhat 7.3, tomcat 4.1.17, apache 1.3.27 with mod_jk2
>>> and jdk 1.4.1_01
>>>
>>> How am i configure jni with JVM?
>>> My apache refuses to startup JVM ?
>>>
>>>
>>>
>>> --
>>> To unsubscribe, e-mail:
>>> <ma...@jakarta.apache.org>
>>> For additional commands, e-mail:
>>> <ma...@jakarta.apache.org>
>>>
>> --
>> To unsubscribe, e-mail:
>> <ma...@jakarta.apache.org>
>> For additional commands, e-mail:
>> <ma...@jakarta.apache.org>
> i did like you said and got jk2.log with follows :
>
> [Fri Dec 27 16:17:53 2002] ( info ) [jk_vm_default.c (500)]
> vm.init(): Jni lib:
> /usr/java/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so
> [Fri Dec 27 16:17:53 2002] (emerg ) [jk_vm_default.c (600)] Fail->
> could not create JVM, code: -1
>
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
Re: How to config mod_jk2 jni with JVM ?
Posted by Gery Kahn <ge...@newmail.net>.
Anthony Marlowe wrote:
> Hi Gery,
>
> I using Apache 2.0.43 with mod_jk2 and tomcat 4.1.18
>
> You need to set the following in your workers2.properties:
>
> [vm:]
> info=Parameters used to load a JVM in the server process
> JVM=this has to point to your JVM. you will probably need the complete
> patch and not $JAVA_HOME...
> OPT=-Djava.class.path=/Volumes/Java_Development/jakarta-tomcat-4.1.18/
> bin/tomcat-jni.jar:/Volumes/Java_Development/jakarta-tomcat-4.1.18/bin/
> bootstrap.jar:/Volumes/Java_Development/jakarta-tomcat-4.1.18/server/
> lib/commons-logging.jar
> OPT=-Dtomcat.home=/Volumes/Java_Development/jakarta-tomcat-4.1.18
> OPT=-Dcatalina.home=/Volumes/Java_Development/jakarta-tomcat-4.1.18
> OPT=-Xmx256M
> #OPT=-Djava.compiler=NONE
> disabled=0
>
> Regards,
>
> Tony
>
> On Friday, Dec 27, 2002, at 13:39 Europe/Berlin, Gery Kahn wrote:
>
>> I have linux redhat 7.3, tomcat 4.1.17, apache 1.3.27 with mod_jk2
>> and jdk 1.4.1_01
>>
>> How am i configure jni with JVM?
>> My apache refuses to startup JVM ?
>>
>>
>>
>> --
>> To unsubscribe, e-mail:
>> <ma...@jakarta.apache.org>
>> For additional commands, e-mail:
>> <ma...@jakarta.apache.org>
>>
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
>
i did like you said and got jk2.log with follows :
[Fri Dec 27 16:17:53 2002] ( info ) [jk_vm_default.c (500)] vm.init():
Jni lib: /usr/java/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so
[Fri Dec 27 16:17:53 2002] (emerg ) [jk_vm_default.c (600)] Fail->
could not create JVM, code: -1
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: How to config mod_jk2 jni with JVM ?
Posted by Anthony Marlowe <am...@mac.com>.
Hi Gery,
I using Apache 2.0.43 with mod_jk2 and tomcat 4.1.18
You need to set the following in your workers2.properties:
[vm:]
info=Parameters used to load a JVM in the server process
JVM=this has to point to your JVM. you will probably need the complete
patch and not $JAVA_HOME...
OPT=-Djava.class.path=/Volumes/Java_Development/jakarta-tomcat-4.1.18/
bin/tomcat-jni.jar:/Volumes/Java_Development/jakarta-tomcat-4.1.18/bin/
bootstrap.jar:/Volumes/Java_Development/jakarta-tomcat-4.1.18/server/
lib/commons-logging.jar
OPT=-Dtomcat.home=/Volumes/Java_Development/jakarta-tomcat-4.1.18
OPT=-Dcatalina.home=/Volumes/Java_Development/jakarta-tomcat-4.1.18
OPT=-Xmx256M
#OPT=-Djava.compiler=NONE
disabled=0
Regards,
Tony
On Friday, Dec 27, 2002, at 13:39 Europe/Berlin, Gery Kahn wrote:
> I have linux redhat 7.3, tomcat 4.1.17, apache 1.3.27 with mod_jk2
> and jdk 1.4.1_01
>
> How am i configure jni with JVM?
> My apache refuses to startup JVM ?
>
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>