Gregor S. wrote:
Hi guys,

I'm a bit desperated:

I'm trying to re-organize our "pet" Tomcat within the following environment:

Using CATALINA_BASE:   /home/tomcat/local/apache-tomcat-6.0.33
Using CATALINA_HOME:   /home/tomcat/local/apache-tomcat-6.0.33
Using CATALINA_TMPDIR: /home/tomcat/local/apache-tomcat-6.0.33/temp
Using JRE_HOME:        /home/tomcat/local/jdk15/
Using CLASSPATH:       /home/tomcat/local/apache-tomcat-6.0.33/bin/bootstrap.jar
Server version: Apache Tomcat/6.0.33
Server built:   Aug 16 2011 02:16:34
Server number:  6.0.33.0
OS Name:        Linux
OS Version:     2.6.18-6-amd64 (Debian 4.0 Etch)
Architecture:   amd64
JVM Version:    1.5.0_10-b03
JVM Vendor:     Sun Microsystems Inc.

I know it's a very outdated version of Debian, still, we do not have
any option yet to upgrade it.

However, we need to get Tomcat6 there up & running, and since it's not
within the Debian repositories for this version, I downloaded a
vanilla Tomcat 6.0.33.

We also need to run Tomcat with the APR (Apache Portable Runtime).

I compiled tomcat-native-1.1.20 (configure, make, make install), and
everything looked great so far: No error-messages.

When I run Tomcat WITHOUT the APR-listener, Tomcat starts up. Still,
when using the APR-listener, Tomcat just doesn't initialize the
HTTP-connector.

When I run Tomcat using the jsvc-demon, it simply failes w/o giving me
any reason. Only when shutting down Tomcat, jsvc demon will shut
Tomcat down, but will exit with an error 143.

When I'm running Tomcat w/o the demon, the same thing happens, still,
slightly different information. It just tells me that the APR is
loaded and then hangs.

This is the info from catalina.out when running w/o jsvc-demon:

================================
Listening for transport dt_socket at address: 7002
Dec 20, 2011 4:26:15 PM org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.1.20.
Dec 20, 2011 4:26:15 PM org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters
[false], random [true].
================================

As you can see, the message that the HTTP-connector is initialized is missing.

My connector in $CATALINA_HOME/conf/server.xml looks like (removed
some valves to improve readability):

=================================
<?xml version='1.0' encoding='utf-8'?>
<Server port="9005" shutdown="xxx">

  <Listener className="org.apache.catalina.core.AprLifecycleListener"
SSLEngine="on" />
  <Listener className="org.apache.catalina.core.JasperListener" />
  <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener"
/>
  <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
  <Listener 
className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"
/>

  <GlobalNamingResources>

       [ ... ]

  </GlobalNamingResources>

  <Service name="Catalina">
    <Connector port="9080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="9443"
               address="192.xxx.xx.xx"/>

    <Connector port="9080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="9443"
               address="192.xxx.xx.yyx"/>
    <Engine name="Catalina" defaultHost="localhost">

      <Realm className="org.apache.catalina.realm.JDBCRealm"

             [ ... ]

             roleNameCol="role_name" />

      <Host name="localhost"  appBase="vhosts/localhost/webapps"
            unpackWARs="true" autoDeploy="true"
            xmlValidation="false" xmlNamespaceAware="false">
      </Host>

      <Host name="someDomain"  appBase="vhosts/someDomain/webapps"
            unpackWARs="true" autoDeploy="true"
            xmlValidation="false" xmlNamespaceAware="false">

        <Alias>www.someDomain</Alias>
        <Alias>www1.someDomain</Alias>
      </Host>

      <Host name="someOtherDomain"  appBase="vhosts/someOtherDomain/webapps"
            unpackWARs="true" autoDeploy="true"
            xmlValidation="false" xmlNamespaceAware="false">

        <Alias>www.someOtherDomain</Alias>
        <Alias>www1.someOtherDomain</Alias>

      </Host>

    </Engine>
  </Service>
</Server>

=================================

The Tomcat-native-libs (APR) are looking good from my point of view:

tomcat@www1:~/local/apache-tomcat-6.0.33/lib$ file libtcnative-1.so.0.1.20
libtcnative-1.so.0.1.20: ELF 64-bit LSB shared object, AMD x86-64,
version 1 (SYSV), not stripped

Does anyone on this list has an idea, what I could do to figure out
why Tomcat simply doesn't initialize the HTTP-connectors when
switching to the APR?

On a different Box, running a later version of Debian, but 32Bit,
everything's runing like charm.

Maybe of some help, here's some debugging-output of jsvc, but I can't
see any hints in it.

Would really, really appreciate if somebody could give me a hint.

This is the catalina.out of jsvc-demon:

================================
Switching umask back to 022 from 077
user changed to 'tomcat'
Using default JVM in
/home/tomcat/local/jdk1.5.0_10-amd64/jre/lib/amd64/server/libjvm.so
Attemtping to load library
/home/tomcat/local/jdk1.5.0_10-amd64/jre/lib/amd64/server/libjvm.so
JVM library /home/tomcat/local/jdk1.5.0_10-amd64/jre/lib/amd64/server/libjvm.so
loaded
JVM library entry point found (0x4153EFC0)
+-- DUMPING JAVA VM CREATION ARGUMENTS -----------------
| Version:                       0x010004
| Ignore Unrecognized Arguments: False
| Extra options:                 9
|   "-Dcatalina.home=/home/tomcat/local/apache-tomcat-6.0.33" (0x00000000)
|   "-Dcatalina.base=/home/tomcat/local/apache-tomcat-6.0.33" (0x00000000)
|   "-Djava.io.tmpdir=/tmp" (0x00000000)
|   "-Dlog4j.configuration=log4j.xml" (0x00000000)
|   "-XX:MaxPermSize=384m" (0x00000000)
|   "-Xmx2048m" (0x00000000)
|   "-Xms2048m" (0x00000000)
|   "-Djava.library.path=/home/tomcat/local/apache-tomcat-6.0.33/lib"
(0x00000000)
|   
"-Djava.class.path=/home/tomcat/local/jdk1.5.0_10-amd64/lib/tools.jar:/home/tomcat/local/apache-tomcat-6.0.33/bin/commons-daemon.jar:/home/tomcat/local/a
pache-tomcat-6.0.33/bin/bootstrap.jar:/usr/lib/" (0x00000000)
+-------------------------------------------------------
| Internal options:              4
|   "-Dcommons.daemon.process.id=11761" (0x00000000)
|   "-Dcommons.daemon.process.parent=11760" (0x00000000)
|   "-Dcommons.daemon.version=1.0.7" (0x00000000)
|   "abort" (0x004072bd)
+-------------------------------------------------------
Java VM created successfully
Class org/apache/commons/daemon/support/DaemonLoader found
Native methods registered
java_init done
Daemon loading...
Dec 20, 2011 4:12:24 PM org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.1.20.
Dec 20, 2011 4:12:24 PM org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters
[false], random [true].
================================

When I shut down Tomcat, inside the catalina.out it says

================================
Service exit with a return value of 143
================================

On the console, there's some more output:

================================
| Install service: No
| Remove service:  No
| JVM Name:        "null"
| Java Home:       "/home/tomcat/local/jdk1.5.0_10-amd64"
| PID File:        "/var/run/jsvc6.pid"
| User Name:       "tomcat"
| Extra Options:   9
|   "-Dcatalina.home=/home/tomcat/local/apache-tomcat-6.0.33"
|   "-Dcatalina.base=/home/tomcat/local/apache-tomcat-6.0.33"
|   "-Djava.io.tmpdir=/tmp"
|   "-Dlog4j.configuration=log4j.xml"
|   "-XX:MaxPermSize=384m"
|   "-Xmx2048m"
|   "-Xms2048m"
|   "-Djava.library.path=/home/tomcat/local/apache-tomcat-6.0.33/lib"
|   
"-Djava.class.path=/home/tomcat/local/jdk1.5.0_10-amd64/lib/tools.jar:/home/tomcat/local/apache-tomcat-6.0.33/bin/commons-daemon.jar:/home/tomcat/local/apache-tomcat-6.0.33/bin/bootstrap.jar:/usr/lib/"
| Class Invoked:   "org.apache.catalina.startup.Bootstrap"
| Class Arguments: 0
+-------------------------------------------------------
user changed to 'tomcat'
User 'tomcat' validated
Attempting to locate Java Home in /home/tomcat/local/jdk1.5.0_10-amd64
Attempting to locate VM configuration file
/home/tomcat/local/jdk1.5.0_10-amd64/jre/lib/jvm.cfg
Attempting to locate VM configuration file
/home/tomcat/local/jdk1.5.0_10-amd64/lib/jvm.cfg
Attempting to locate VM configuration file
/home/tomcat/local/jdk1.5.0_10-amd64/jre/lib/amd64/jvm.cfg
Found VM configuration file at
/home/tomcat/local/jdk1.5.0_10-amd64/jre/lib/amd64/jvm.cfg
Found VM server definition in configuration
Checking library
/home/tomcat/local/jdk1.5.0_10-amd64/jre/lib/amd64/server/libjvm.so
Found VM client definition in configuration
Checking library
/home/tomcat/local/jdk1.5.0_10-amd64/jre/lib/amd64/client/libjvm.so
Checking library /home/tomcat/local/jdk1.5.0_10-amd64/lib/amd64/client/libjvm.so
Cannot locate library for VM client (skipping)
Found VM hotspot definition in configuration
Checking library
/home/tomcat/local/jdk1.5.0_10-amd64/jre/lib/amd64/hotspot/libjvm.so
Checking library
/home/tomcat/local/jdk1.5.0_10-amd64/lib/amd64/hotspot/libjvm.so
Cannot locate library for VM hotspot (skipping)
Found VM classic definition in configuration
Checking library
/home/tomcat/local/jdk1.5.0_10-amd64/jre/lib/amd64/classic/libjvm.so
Checking library
/home/tomcat/local/jdk1.5.0_10-amd64/lib/amd64/classic/libjvm.so
Cannot locate library for VM classic (skipping)
Found VM native definition in configuration
Checking library
/home/tomcat/local/jdk1.5.0_10-amd64/jre/lib/amd64/native/libjvm.so
Checking library /home/tomcat/local/jdk1.5.0_10-amd64/lib/amd64/native/libjvm.so
Cannot locate library for VM native (skipping)
Found VM green definition in configuration
Checking library
/home/tomcat/local/jdk1.5.0_10-amd64/jre/lib/amd64/green/libjvm.so
Checking library /home/tomcat/local/jdk1.5.0_10-amd64/lib/amd64/green/libjvm.so
Cannot locate library for VM green (skipping)
Java Home located in /home/tomcat/local/jdk1.5.0_10-amd64
+-- DUMPING JAVA HOME STRUCTURE ------------------------
| Java Home:       "/home/tomcat/local/jdk1.5.0_10-amd64"
| Java VM Config.: "/home/tomcat/local/jdk1.5.0_10-amd64/jre/lib/amd64/jvm.cfg"
| Found JVMs:      1
| JVM Name:        "server"
|
"/home/tomcat/local/jdk1.5.0_10-amd64/jre/lib/amd64/server/libjvm.so"
+-------------------------------------------------------
Running w/ 
LD_LIBRARY_PATH=/home/tomcat/local/jdk1.5.0_10-amd64/jre/lib/amd64/server:/home/tomcat/local/jdk1.5.0_10-amd64/jre/lib/amd64
redirecting stdout to
/home/tomcat/local/apache-tomcat-6.0.33/logs/catalina.out and stderr
to &1
wait_child 12009
get_pidf: 5 in /var/run/jsvc6.pid
get_pidf: pid 12010
check_tmp_file: /tmp/12010.jsvc_up
get_pidf: 5 in /var/run/jsvc6.pid
get_pidf: pid 12010
check_tmp_file: /tmp/12010.jsvc_up
get_pidf: 5 in /var/run/jsvc6.pid
get_pidf: pid 12010
check_tmp_file: /tmp/12010.jsvc_up
get_pidf: 5 in /var/run/jsvc6.pid
get_pidf: pid 12010
check_tmp_file: /tmp/12010.jsvc_up
get_pidf: 5 in /var/run/jsvc6.pid
get_pidf: pid 12010
check_tmp_file: /tmp/12010.jsvc_up
get_pidf: 5 in /var/run/jsvc6.pid
get_pidf: pid 12010
check_tmp_file: /tmp/12010.jsvc_up
fail
================================

Appreciate any comments!

TIA

Gregor

Gregor,
as you know, I am not an expert.  But just in case :
- have you tried the APR listener and Connector without SSL ? (in case it would be waiting a very long time to collect enough entropy, whatever that really means..) - in the trace of jsvc, is it normal that it seems to be looking alternatively for "server" and "client" libraries ?
- have you tried with a more recent JVM ?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to