tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "GOMEZ Henri" <hgo...@slib.fr>
Subject jk2/jni first remarks
Date Tue, 04 Jun 2002 08:25:20 GMT
I finally succeed make jni works on my Linux boxes 
with Apache 2.0.36 and tomcat 3.3.1

Some remarks :

1) On my configuration, the standard tomcat 3.3.1 
   run as user tomcat3, group tomcat3, but apache2
   run as user apache2, group apache2. 
   So log/spool files can't be accessed in rw mode
   since all these files are 644 to tomcat3/tomcat3.
   I saw there is a setUser APR impl but since it's 
   not a static method, it couldn't be called by
   TomcatStarter. Also shm file is owned by root,
   and so couldn't be used by childs (apache2).

=> chmod 666 /var/run/httpd2/jk2.shm


2) Tomcat3 at least allow the use of TOMCAT_HOME and
   TOMCAT_INSTALL, and in that case config files are
   in $TOMCAT_HOME/conf and tomcat.jar in $TOMCAT_INSTALL/lib.
   workers2.properties should be updated accordingly.
   I think there is a similar system for TC 4.0/4.1

export TOMCAT_HOME=/etc/tomcat3
export TOMCAT_INSTALL=/var/tomcat3

workers2.properties (nb I put tomcat-jni.jar in tomcat/lib not in tomcat/bin :

[vm:]
info=Parameters used to load a JVM in the server process
OPT=-Djava.class.path=${TOMCAT_INSTALL}/lib/tomcat-jni.jar:${TOMCAT_INSTALL}/lib/tomcat.jar
OPT=-Dtomcat.home=${TOMCAT_HOME}
OPT=-Dcatalina.home=${TOMCAT_HOME}
OPT=-Xmx128M
disabled=1

3) Under Linux we have to set many env vars before being
   able to load libjvm.so (here is what I've to do to 
   use the IBM SDK 1.3.1 :

export JAVAHOME=/opt/IBMJava2-131/jre
export LD_LIBRARY_PATH=$JAVAHOME/bin:$JAVAHOME/bin/classic:$LD_LIBRARY_PATH

Linux users running a kernel 2.4 should also add :

export LD_ASSUME_KERNEL=2.2.5

What about adding ENV params in [vm:] to setup all of these directly
from httpd2 ?

4) It seems that jni is loaded in each child (I've build apache 2.0.36
   using -with-mpm=worker on my box) and sus there is 3 jvm started and conflict
   with listen port later (8080, 8007, 8009), so we should use a lock file to
   avoid duplicate initialization


[Mon Jun 03 19:48:47 2002] [notice] caught SIGTERM, shutting down
[Mon Jun 03 19:48:55 2002] [notice] Digest: generating secret for digest authentication ...
[Mon Jun 03 19:48:55 2002] [notice] Digest: done
[Mon Jun 03 19:48:56 2002] [warn] jni.guessJvmDll() /opt/IBMJava2-131/jre/bin/classic/libjvm.so
[Mon Jun 03 19:48:56 2002] [warn] vm.init(): Jni lib: /opt/IBMJava2-131/jre/bin/classic/libjvm.so
[Mon Jun 03 19:48:56 2002] [warn] jni.guessJvmDll() /opt/IBMJava2-131/jre/bin/classic/libjvm.so
[Mon Jun 03 19:48:56 2002] [warn] vm.init(): Jni lib: /opt/IBMJava2-131/jre/bin/classic/libjvm.so
[Mon Jun 03 19:48:57 2002] [notice] Apache/2.0.36 (Unix) mod_ssl/2.0.36 OpenSSL/0.9.6b DAV/2
mod_jk2/2.0.0 configured -- resuming normal operations
[Mon Jun 03 19:48:57 2002] [warn] vm.openJvm2() Option: -Djava.class.path=/var/tomcat3/lib/tomcat-jni.jar
[Mon Jun 03 19:48:57 2002] [warn] vm.openJvm2() Option: -Dtomcat.home=/var/tomcat3
[Mon Jun 03 19:48:57 2002] [warn] vm.openJvm2() Option: -Dcatalina.home=/var/tomcat3
[Mon Jun 03 19:48:57 2002] [warn] vm.openJvm2() Option: -Xmx128M
[Mon Jun 03 19:48:57 2002] [error] Fail-> could not create JVM, code: -1
[Mon Jun 03 19:48:57 2002] [warn] jni.validate() class= org/apache/jk/apr/TomcatStarter
[Mon Jun 03 19:48:57 2002] [error] workerJni.init() Can't attach to VM
[Mon Jun 03 19:48:57 2002] [error] workerEnv.initWorkers() init failed for worker.jni:jniCmd1
[Mon Jun 03 19:48:57 2002] [warn] uriEnv.init() exact mapping /examples/servlet/HelloW=lb:lb
[Mon Jun 03 19:48:57 2002] [warn] workerEnv.init() ok /etc/httpd2/conf/workers2.properties
[Mon Jun 03 19:48:57 2002] [warn] mod_jk child init 1 -1
[Mon Jun 03 19:48:57 2002] [warn] vm.openJvm2() Option: -Djava.class.path=/var/tomcat3/lib/tomcat-jni.jar
[Mon Jun 03 19:48:57 2002] [warn] vm.openJvm2() Option: -Dtomcat.home=/var/tomcat3
[Mon Jun 03 19:48:57 2002] [warn] vm.openJvm2() Option: -Dcatalina.home=/var/tomcat3
[Mon Jun 03 19:48:57 2002] [warn] vm.openJvm2() Option: -Xmx128M
[Mon Jun 03 19:48:57 2002] [error] Fail-> could not create JVM, code: -1
[Mon Jun 03 19:48:57 2002] [warn] jni.validate() class= org/apache/jk/apr/TomcatStarter
[Mon Jun 03 19:48:57 2002] [error] workerJni.init() Can't attach to VM
[Mon Jun 03 19:48:57 2002] [error] workerEnv.initWorkers() init failed for worker.jni:jniCmd1
[Mon Jun 03 19:48:57 2002] [warn] uriEnv.init() exact mapping /examples/servlet/HelloW=lb:lb
[Mon Jun 03 19:48:57 2002] [warn] workerEnv.init() ok /etc/httpd2/conf/workers2.properties
[Mon Jun 03 19:48:57 2002] [warn] mod_jk child init 1 -1

which jar should be installed in tomcat lib ?
[Tue Jun 04 08:35:54 2002] [notice] Digest: generating secret for digest authentication ...
[Tue Jun 04 08:35:56 2002] [notice] Digest: done
[Tue Jun 04 08:35:57 2002] [warn] jni.guessJvmDll() /opt/IBMJava2-131/jre/bin/classic/libjvm.so
[Tue Jun 04 08:35:57 2002] [warn] vm.init(): Jni lib: /opt/IBMJava2-131/jre/bin/classic/libjvm.so
[Tue Jun 04 08:35:57 2002] [warn] jni.guessJvmDll() /opt/IBMJava2-131/jre/bin/classic/libjvm.so
[Tue Jun 04 08:35:57 2002] [warn] vm.init(): Jni lib: /opt/IBMJava2-131/jre/bin/classic/libjvm.so
[Tue Jun 04 08:35:57 2002] [notice] Apache/2.0.36 (Unix) mod_ssl/2.0.36 OpenSSL/0.9.6b DAV/2
mod_jk2/2.0.0 configured -- resuming normal operations
[Tue Jun 04 08:35:58 2002] [warn] vm.openJvm2() Option: -Djava.class.path=/var/tomcat3/lib/tomcat-jni.jar
[Tue Jun 04 08:35:58 2002] [warn] vm.openJvm2() Option: -Dtomcat.home=/var/tomcat3
[Tue Jun 04 08:35:58 2002] [warn] vm.openJvm2() Option: -Dcatalina.home=/var/tomcat3
[Tue Jun 04 08:35:58 2002] [warn] vm.openJvm2() Option: -Xmx128M
[Tue Jun 04 08:35:58 2002] [warn] vm.openJvm2() Option: -Djava.class.path=/var/tomcat3/lib/tomcat-jni.jar
[Tue Jun 04 08:35:58 2002] [warn] vm.openJvm2() Option: -Dtomcat.home=/var/tomcat3
[Tue Jun 04 08:35:58 2002] [warn] vm.openJvm2() Option: -Dcatalina.home=/var/tomcat3
[Tue Jun 04 08:35:58 2002] [warn] vm.openJvm2() Option: -Xmx128M
[Tue Jun 04 08:35:58 2002] [warn] jni.guessJvmDll() /opt/IBMJava2-131/jre/bin/classic/libjvm.so
[Tue Jun 04 08:35:58 2002] [warn] vm.init(): Jni lib: /opt/IBMJava2-131/jre/bin/classic/libjvm.so
[Tue Jun 04 08:35:58 2002] [warn] vm.open2() done
[Tue Jun 04 08:35:58 2002] [warn] jni.validate() class= org/apache/jk/apr/TomcatStarter 
[Tue Jun 04 08:35:58 2002] [warn] vm.open2() done
[Tue Jun 04 08:35:58 2002] [warn] jni.validate() class= org/apache/jk/apr/TomcatStarter 
[Tue Jun 04 08:35:59 2002] [warn] Loaded org/apache/jk/apr/TomcatStarter
[Tue Jun 04 08:35:59 2002] [warn] jni.init() ARG start
[Tue Jun 04 08:35:59 2002] [warn] jni.init() calling main()...
[Tue Jun 04 08:35:59 2002] [warn] Loaded org/apache/jk/apr/TomcatStarter
[Tue Jun 04 08:35:59 2002] [warn] jni.init() ARG start
[Tue Jun 04 08:35:59 2002] [warn] jni.init() calling main()...
TomcatStarter: main()
TomcatStarter: err
TomcatStarter: out
Try  org.apache.tomcat.startup.Main
Starting org.apache.tomcat.startup.Main
No class found  
[Tue Jun 04 08:35:59 2002] [warn] vm.detach() ok
[Tue Jun 04 08:35:59 2002] [warn] uriEnv.init() exact mapping /examples/servlet/HelloW=lb:lb

[Tue Jun 04 08:35:59 2002] [warn] workerEnv.init() ok /etc/httpd2/conf/workers2.properties
[Tue Jun 04 08:35:59 2002] [warn] mod_jk child init 1 -1
[Tue Jun 04 08:35:59 2002] [warn] vm.openJvm2() Option: -Djava.class.path=/var/tomcat3/lib/tomcat-jni.jar
[Tue Jun 04 08:35:59 2002] [warn] vm.openJvm2() Option: -Dtomcat.home=/var/tomcat3
[Tue Jun 04 08:35:59 2002] [warn] vm.openJvm2() Option: -Dcatalina.home=/var/tomcat3
[Tue Jun 04 08:35:59 2002] [warn] vm.openJvm2() Option: -Xmx128M
[Tue Jun 04 08:35:59 2002] [warn] jni.guessJvmDll() /opt/IBMJava2-131/jre/bin/classic/libjvm.so
[Tue Jun 04 08:35:59 2002] [warn] vm.init(): Jni lib: /opt/IBMJava2-131/jre/bin/classic/libjvm.so
TomcatStarter: main()
TomcatStarter: err
TomcatStarter: out
Try  org.apache.tomcat.startup.Main
Starting org.apache.tomcat.startup.Main
[Tue Jun 04 08:35:59 2002] [warn] jni.guessJvmDll() /opt/IBMJava2-131/jre/bin/classic/libjvm.so
[Tue Jun 04 08:35:59 2002] [warn] vm.init(): Jni lib: /opt/IBMJava2-131/jre/bin/classic/libjvm.so
No class found  
[Tue Jun 04 08:35:59 2002] [warn] vm.detach() ok
[Tue Jun 04 08:35:59 2002] [warn] uriEnv.init() exact mapping /examples/servlet/HelloW=lb:lb

[Tue Jun 04 08:35:59 2002] [warn] workerEnv.init() ok /etc/httpd2/conf/workers2.properties
[Tue Jun 04 08:35:59 2002] [warn] mod_jk child init 1 -1
[Tue Jun 04 08:36:00 2002] [warn] jni.guessJvmDll() /opt/IBMJava2-131/jre/bin/classic/libjvm.so
[Tue Jun 04 08:36:00 2002] [warn] vm.init(): Jni lib: /opt/IBMJava2-131/jre/bin/classic/libjvm.so
[Tue Jun 04 08:36:00 2002] [warn] vm.open2() done
[Tue Jun 04 08:36:00 2002] [warn] jni.validate() class= org/apache/jk/apr/TomcatStarter 
[Tue Jun 04 08:36:01 2002] [warn] vm.openJvm2() Option: -Djava.class.path=/var/tomcat3/lib/tomcat-jni.jar
[Tue Jun 04 08:36:01 2002] [warn] vm.openJvm2() Option: -Dtomcat.home=/var/tomcat3
[Tue Jun 04 08:36:01 2002] [warn] vm.openJvm2() Option: -Dcatalina.home=/var/tomcat3
[Tue Jun 04 08:36:01 2002] [warn] vm.openJvm2() Option: -Xmx128M
[Tue Jun 04 08:36:01 2002] [warn] vm.openJvm2() Option: -Djava.class.path=/var/tomcat3/lib/tomcat-jni.jar
[Tue Jun 04 08:36:01 2002] [warn] vm.openJvm2() Option: -Dtomcat.home=/var/tomcat3
[Tue Jun 04 08:36:01 2002] [warn] vm.openJvm2() Option: -Dcatalina.home=/var/tomcat3
[Tue Jun 04 08:36:01 2002] [warn] vm.openJvm2() Option: -Xmx128M
[Tue Jun 04 08:36:02 2002] [warn] vm.openJvm2() Option: -Djava.class.path=/var/tomcat3/lib/tomcat-jni.jar
[Tue Jun 04 08:36:02 2002] [warn] vm.openJvm2() Option: -Dtomcat.home=/var/tomcat3
[Tue Jun 04 08:36:02 2002] [warn] vm.openJvm2() Option: -Dcatalina.home=/var/tomcat3
[Tue Jun 04 08:36:02 2002] [warn] vm.openJvm2() Option: -Xmx128M
[Tue Jun 04 08:36:02 2002] [warn] Loaded org/apache/jk/apr/TomcatStarter
[Tue Jun 04 08:36:02 2002] [warn] jni.init() ARG start
[Tue Jun 04 08:36:02 2002] [warn] jni.init() calling main()...
TomcatStarter: main()
TomcatStarter: err
TomcatStarter: out
Try  org.apache.tomcat.startup.Main
Starting org.apache.tomcat.startup.Main
No class found  
[Tue Jun 04 08:36:02 2002] [warn] vm.detach() ok
[Tue Jun 04 08:36:02 2002] [warn] uriEnv.init() exact mapping /examples/servlet/HelloW=lb:lb

[Tue Jun 04 08:36:02 2002] [warn] workerEnv.init() ok /etc/httpd2/conf/workers2.properties
[Tue Jun 04 08:36:02 2002] [warn] mod_jk child init 1 -1
[Tue Jun 04 08:36:02 2002] [warn] vm.open2() done
[Tue Jun 04 08:36:02 2002] [warn] jni.validate() class= org/apache/jk/apr/TomcatStarter 
[Tue Jun 04 08:36:03 2002] [warn] vm.open2() done
[Tue Jun 04 08:36:03 2002] [warn] jni.validate() class= org/apache/jk/apr/TomcatStarter 
[Tue Jun 04 08:36:03 2002] [warn] vm.open2() done
[Tue Jun 04 08:36:03 2002] [warn] jni.validate() class= org/apache/jk/apr/TomcatStarter 
[Tue Jun 04 08:36:04 2002] [warn] Loaded org/apache/jk/apr/TomcatStarter
[Tue Jun 04 08:36:04 2002] [warn] jni.init() ARG start
[Tue Jun 04 08:36:04 2002] [warn] jni.init() calling main()...
TomcatStarter: main()
TomcatStarter: err
TomcatStarter: out
Try  org.apache.tomcat.startup.Main
Starting org.apache.tomcat.startup.Main
No class found  
[Tue Jun 04 08:36:04 2002] [warn] vm.detach() ok
[Tue Jun 04 08:36:04 2002] [warn] uriEnv.init() exact mapping /examples/servlet/HelloW=lb:lb

[Tue Jun 04 08:36:04 2002] [warn] workerEnv.init() ok /etc/httpd2/conf/workers2.properties
[Tue Jun 04 08:36:04 2002] [warn] mod_jk child init 1 -1
[Tue Jun 04 08:36:04 2002] [warn] Loaded org/apache/jk/apr/TomcatStarter
[Tue Jun 04 08:36:04 2002] [warn] jni.init() ARG start
[Tue Jun 04 08:36:04 2002] [warn] jni.init() calling main()...
TomcatStarter: main()
TomcatStarter: err
TomcatStarter: out
Try  org.apache.tomcat.startup.Main
Starting org.apache.tomcat.startup.Main
No class found  
[Tue Jun 04 08:36:04 2002] [warn] vm.detach() ok
[Tue Jun 04 08:36:04 2002] [warn] uriEnv.init() exact mapping /examples/servlet/HelloW=lb:lb

[Tue Jun 04 08:36:04 2002] [warn] workerEnv.init() ok /etc/httpd2/conf/workers2.properties
[Tue Jun 04 08:36:04 2002] [warn] mod_jk child init 1 -1
[Tue Jun 04 08:36:05 2002] [warn] Loaded org/apache/jk/apr/TomcatStarter
[Tue Jun 04 08:36:05 2002] [warn] jni.init() ARG start
[Tue Jun 04 08:36:05 2002] [warn] jni.init() calling main()...
TomcatStarter: main()
TomcatStarter: err
TomcatStarter: out
Try  org.apache.tomcat.startup.Main
Starting org.apache.tomcat.startup.Main
No class found  
[Tue Jun 04 08:36:05 2002] [warn] vm.detach() ok
[Tue Jun 04 08:36:05 2002] [warn] uriEnv.init() exact mapping /examples/servlet/HelloW=lb:lb

[Tue Jun 04 08:36:05 2002] [warn] workerEnv.init() ok /etc/httpd2/conf/workers2.properties
[Tue Jun 04 08:36:05 2002] [warn] mod_jk child init 1 -1
2002-06-04 08:36:14 - SessionIdGenerator: Opening /dev/urandom
2002-06-04 08:36:14 - SessionIdGenerator: Opening /dev/urandom
2002-06-04 08:36:14 - SessionIdGenerator: Opening /dev/urandom
2002-06-04 08:36:16 - ServerXmlReader: Config=$TOMCAT_HOME/conf/server.xml
2002-06-04 08:36:16 - PathSetter: home=/var/tomcat3
2002-06-04 08:36:16 - ServerXmlReader: Config=$TOMCAT_HOME/conf/server.xml
2002-06-04 08:36:16 - PathSetter: home=/var/tomcat3
2002-06-04 08:36:16 - ServerXmlReader: Config=$TOMCAT_HOME/conf/server.xml
2002-06-04 08:36:16 - PathSetter: home=/var/tomcat3
2002-06-04 08:36:16 - ContextXmlReader: Context config=$TOMCAT_HOME/conf/apps-127.0.0.1.xml
2002-06-04 08:36:16 - ContextXmlReader: Context config=$TOMCAT_HOME/conf/apps-admin.xml
2002-06-04 08:36:17 - ContextXmlReader: Context config=$TOMCAT_HOME/conf/apps-127.0.0.1.xml
2002-06-04 08:36:17 - ContextXmlReader: Context config=$TOMCAT_HOME/conf/apps-admin.xml
2002-06-04 08:36:17 - ContextXmlReader: Context config=$TOMCAT_HOME/conf/apps-examples.xml
2002-06-04 08:36:17 - ContextXmlReader: Context config=$TOMCAT_HOME/conf/apps-examples.xml
2002-06-04 08:36:17 - ContextXmlReader: Context config=$TOMCAT_HOME/conf/apps-127.0.0.1.xml
2002-06-04 08:36:17 - ContextXmlReader: Context config=$TOMCAT_HOME/conf/apps-admin.xml
2002-06-04 08:36:17 - ContextXmlReader: Context config=$TOMCAT_HOME/conf/apps-examples.xml
2002-06-04 08:36:17 - AutoWebApp: Loaded from config: DEFAULT:/examples
2002-06-04 08:36:17 - AutoWebApp: Auto-Adding DEFAULT:/
2002-06-04 08:36:17 - AutoWebApp: Loaded from config: DEFAULT:/admin
2002-06-04 08:36:17 - ContextManager: Tomcat configured and in stable state 
2002-06-04 08:36:17 - AutoWebApp: Loaded from config: DEFAULT:/examples
2002-06-04 08:36:17 - AutoWebApp: Auto-Adding DEFAULT:/
2002-06-04 08:36:17 - AutoWebApp: Loaded from config: DEFAULT:/admin
2002-06-04 08:36:17 - ContextManager: Tomcat configured and in stable state 
2002-06-04 08:36:17 - ContextManager: Adding  DEFAULT:/admin
2002-06-04 08:36:17 - ContextManager: Adding  DEFAULT:/admin
2002-06-04 08:36:17 - AutoWebApp: Loaded from config: DEFAULT:/examples
2002-06-04 08:36:17 - AutoWebApp: Auto-Adding DEFAULT:/
2002-06-04 08:36:17 - AutoWebApp: Loaded from config: DEFAULT:/admin
2002-06-04 08:36:17 - ContextManager: Tomcat configured and in stable state 
2002-06-04 08:36:17 - ContextManager: Adding  DEFAULT:/admin
2002-06-04 08:36:19 - ContextManager: Adding  DEFAULT:/examples
2002-06-04 08:36:19 - ContextManager: Adding  DEFAULT:/ROOT
2002-06-04 08:36:19 - ContextManager: Adding  DEFAULT:/examples
2002-06-04 08:36:19 - ContextManager: Adding  DEFAULT:/ROOT
2002-06-04 08:36:19 - ContextManager: Adding  DEFAULT:/examples
2002-06-04 08:36:19 - ContextManager: Adding  DEFAULT:/ROOT
EmbededTomcat: Init time 18048
EmbededTomcat: Init time 17655
EmbededTomcat: Init time 18604
Guessed home=/var/tomcat3
Exception: java.lang.reflect.InvocationTargetException
java.lang.reflect.InvocationTargetException: org.apache.tomcat.core.TomcatException: Root
cause - Address already in use:8080
	at org.apache.tomcat.modules.server.PoolTcpConnector.engineStart(Unknown Source)
	at org.apache.tomcat.core.ContextManager.start(Unknown Source)
	at org.apache.tomcat.startup.EmbededTomcat.start(Unknown Source)
	at org.apache.tomcat.startup.EmbededTomcat.execute1(Unknown Source)
	at org.apache.tomcat.startup.EmbededTomcat$1.run(Unknown Source)
	at org.apache.tomcat.util.compat.Jdk12Support$PrivilegedProxy.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.apache.tomcat.util.compat.Jdk12Support.doPrivileged(Unknown Source)
	at org.apache.tomcat.startup.EmbededTomcat.execute(Unknown Source)
	at java.lang.reflect.Method.invoke(Native Method)
	at org.apache.tomcat.util.IntrospectionUtils.execute(Unknown Source)
	at org.apache.tomcat.startup.Main.execute(Unknown Source)
	at org.apache.tomcat.startup.Main.main(Unknown Source)
	at java.lang.reflect.Method.invoke(Native Method)
	at org.apache.jk.apr.TomcatStarter.run(TomcatStarter.java:69)
	at java.lang.Thread.run(Thread.java:512)
Root Exception: org.apache.tomcat.core.TomcatException: Root cause - Address already in use:8080
org.apache.tomcat.core.TomcatException: Root cause - Address already in use:8080
	at org.apache.tomcat.modules.server.PoolTcpConnector.engineStart(Unknown Source)
	at org.apache.tomcat.core.ContextManager.start(Unknown Source)
	at org.apache.tomcat.startup.EmbededTomcat.start(Unknown Source)
	at org.apache.tomcat.startup.EmbededTomcat.execute1(Unknown Source)
Guessed home=/var/tomcat3
Exception: java.lang.reflect.InvocationTargetException
java.lang.reflect.InvocationTargetException: org.apache.tomcat.core.TomcatException: Root
cause - Address already in use:8080
	at org.apache.tomcat.modules.server.PoolTcpConnector.engineStart(Unknown Source)
	at org.apache.tomcat.core.ContextManager.start(Unknown Source)
	at org.apache.tomcat.startup.EmbededTomcat.start(Unknown Source)
	at org.apache.tomcat.startup.EmbededTomcat.execute1(Unknown Source)
	at org.apache.tomcat.startup.EmbededTomcat$1.run(Unknown Source)
	at org.apache.tomcat.util.compat.Jdk12Support$PrivilegedProxy.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.apache.tomcat.util.compat.Jdk12Support.doPrivileged(Unknown Source)
	at org.apache.tomcat.startup.EmbededTomcat.execute(Unknown Source)
	at java.lang.reflect.Method.invoke(Native Method)
	at org.apache.tomcat.util.IntrospectionUtils.execute(Unknown Source)
	at org.apache.tomcat.startup.Main.execute(Unknown Source)
	at org.apache.tomcat.startup.Main.main(Unknown Source)
	at java.lang.reflect.Method.invoke(Native Method)
	at org.apache.jk.apr.TomcatStarter.run(TomcatStarter.java:69)
	at java.lang.Thread.run(Thread.java:512)
Root Exception: org.apache.tomcat.core.TomcatException: Root cause - Address already in use:8080
org.apache.tomcat.core.TomcatException: Root cause - Address already in use:8080
	at org.apache.tomcat.modules.server.PoolTcpConnector.engineStart(Unknown Source)
	at org.apache.tomcat.core.ContextManager.start(Unknown Source)
	at org.apache.tomcat.startup.EmbededTomcat.start(Unknown Source)
	at org.apache.tomcat.startup.EmbededTomcat.execute1(Unknown Source)
	at org.apache.tomcat.startup.EmbededTomcat$1.run(Unknown Source)
	at org.apache.tomcat.util.compat.Jdk12Support$PrivilegedProxy.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.apache.tomcat.util.compat.Jdk12Support.doPrivileged(Unknown Source)
	at org.apache.tomcat.startup.EmbededTomcat.execute(Unknown Source)
	at java.lang.reflect.Method.invoke(Native Method)
	at org.apache.tomcat.util.IntrospectionUtils.execute(Unknown Source)
	at org.apache.tomcat.startup.Main.execute(Unknown Source)
	at org.apache.tomcat.startup.Main.main(Unknown Source)
	at java.lang.reflect.Method.invoke(Native Method)
	at org.apache.jk.apr.TomcatStarter.run(TomcatStarter.java:69)
	at java.lang.Thread.run(Thread.java:512)
TomcatStarter: Done
	at org.apache.tomcat.startup.EmbededTomcat$1.run(Unknown Source)
	at org.apache.tomcat.util.compat.Jdk12Support$PrivilegedProxy.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.apache.tomcat.util.compat.Jdk12Support.doPrivileged(Unknown Source)
	at org.apache.tomcat.startup.EmbededTomcat.execute(Unknown Source)
	at java.lang.reflect.Method.invoke(Native Method)
	at org.apache.tomcat.util.IntrospectionUtils.execute(Unknown Source)
	at org.apache.tomcat.startup.Main.execute(Unknown Source)
	at org.apache.tomcat.startup.Main.main(Unknown Source)
	at java.lang.reflect.Method.invoke(Native Method)
	at org.apache.jk.apr.TomcatStarter.run(TomcatStarter.java:69)
	at java.lang.Thread.run(Thread.java:512)
TomcatStarter: Done
2002-06-04 08:36:24 - Http10Interceptor: Starting on 8080
2002-06-04 08:36:24 - Ajp12Interceptor: Starting on 8007
2002-06-04 08:36:24 - Ajp13Interceptor: Starting on 8009
EmbededTomcat: Startup time 438
TomcatStarter: Done
2002-06-04 08:36:24 - CoyoteInterceptor: Starting on 8081
2002-06-04 08:36:24 - Ajp12Interceptor: Using stop file: /var/spool/tomcat3/ajp12.id
2002-06-04 08:36:24 - Ajp13Interceptor: Using stop file: /var/spool/tomcat3/ajp13.id

5) What about using tomcat.user and tomcat.group properties and use setUser() in
   TomcatStarter run method ?

    public void run() {
        System.err.println("Starting " + c.getName());
        try {
			
			String tuser = System.getProperty("tomcat.user");
			String tgroup = System.getProperty("tomcat.group");

			if (tuser != null && tgroup != null)
				AprImpl.setUser(tuser, tgroup);

		....

Of course will have to change public native int setUser( String user, String group )
to public static native int setUser( String user, String group ).

We have to change JVM user/group in the early stage of init since we want
to be sure that logs, pid and others R/W files will be available to the
running process. 

But it may raise others problems with httpd2 child which
could need to be apache2 user to acces others httpd2 files ?

So we could just let JVM running tomcat as apache2 user but
will have to fix the shm access rigth first.

Costin, what do you think about ?



-
Henri Gomez                 ___[_]____
EMAIL : hgomez@slib.fr        (. .)                     
PGP KEY : 697ECEDD    ...oOOo..(_)..oOOo...
PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6 


--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message