I have 2 computers with a completely identical setup, except one is Intel Core-2 Duo and another one is AMD64. Both are running 64-bit Gentoo. On the Intel, Tomcat runs fine with dev-java/tomcat-native-1.1.15. However, on AMD64 Tomcat runs only without dev-java/tomcat-native-1.1.15 or dev-java/tomcat-native-1.1.16 installed. If dev-java/tomcat-native is installed, Tomcat starts up without errors, however does not service any requests - or open any sockets except for JDP. On Core-2 Duo: # netstat -a -p --numeric-ports | grep java tcp 0 0 *:8000 *:* LISTEN 4964/java tcp 0 0 Core2:8005 *:* LISTEN 4964/java tcp 0 0 *:8009 *:* LISTEN 4964/java tcp 0 0 *:8080 *:* LISTEN 4964/java On AMD64: # netstat -a -p --numeric-ports | grep java tcp 0 0 *:8000 Once I remove dev-java/tomcat-native from AMD64 machine and restart Tomcat, I get: # netstat -a -p --numeric-ports | grep java tcp 0 0 *:8000 *:* LISTEN 364261/java tcp 0 0 AMD64:8005 *:* LISTEN 364261/java tcp 0 0 *:8009 *:* LISTEN 364261/java tcp 0 0 *:8080 *:* LISTEN 364261/java Tomcat version www-servers/tomcat-6.0.18-r2. # java-config -v java version "1.6.0_11" Java(TM) SE Runtime Environment (build 1.6.0_11-b03) Java HotSpot(TM) 64-Bit Server VM (build 11.0-b16, mixed mode)
Created attachment 179518 [details] emerge --info
Created attachment 179519 [details] catalina.out on broken AMD64
Hello, Can you please set Catalina to debug mode, and attach the entire startup log, As well as your tomcat conf.d file. >usage: java org.apache.catalina.startup.Catalina [ -config {pathname} ] [ >-nonaming ] { start | stop } This is telling you, you have an incorrect Catalina startup option. From what you posted it is hard to tell exactly where the root of the problem is, with some extra debug info it will make it easier. Thanks, weisso
Created attachment 179629 [details] /etc/conf.d/tomcat-6
I have attached /etc/conf.d/tomcat-6. I am not certain how to start it in the debug mode though. I have change logging level to DEBUG in /etc/tomcat-6/logging.properties, but the logging output was exactly the same as already attached. How shall I produce the debugging output?
(In reply to comment #5) > I am not certain how to start it in the debug mode though. I have change > logging level to DEBUG in /etc/tomcat-6/logging.properties, but the logging > output was exactly the same as already attached. > > How shall I produce the debugging output? > in logging.properties change all the org.apache.catalina.core.ContainerBase.* to FINE and then uncomment: org.apache.catalina.startup.ContextConfig.level = FINE org.apache.catalina.startup.HostConfig.level = FINE org.apache.catalina.session.ManagerBase.level = FINE >I have attached /etc/conf.d/tomcat-6. which JDPA interface are you using? Have you modified any of these files: catalina.policy catalina.properties context.xml -weisso
(In reply to comment #6) > (In reply to comment #5) > which JDPA interface are you using? sorry JPDA
I have changed logging.properties to FINE. However, the output is exactly the same as already attached. I did not modify catalina.policy, catalina.properties or context.xml. The Tomcat installation is straight out if the box. I normally use JPDA through Eclipse for debugging web apps - however, none have been deployed beyond the manager shipped with Tomcat. I have replaced 'jpda start' with 'start' in etc/conf.d/tomcat-6 now. The content of catalina.out WITH debug leve FINE is the following: ========== Jan 25, 2009 9:59:14 AM org.apache.catalina.core.AprLifecycleListener init INFO: Loaded APR based Apache Tomcat Native library 1.1.16. Jan 25, 2009 9:59:14 AM org.apache.catalina.core.AprLifecycleListener init INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true]. ========== Now with the ONLY change dev-java/tomcat-native removed, catalina.out is the following: ========== Jan 25, 2009 10:12:30 AM org.apache.catalina.core.AprLifecycleListener init INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /opt/sun-jdk-1.6.0.11/jre/lib/amd64/server:/opt/sun-jdk-1.6.0.11/jre/lib/amd64:/opt/sun-jdk-1.6.0.11/jre/../lib/amd64:/usr/java/packages/lib/amd64:/lib:/usr/lib Jan 25, 2009 10:12:30 AM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 Jan 25, 2009 10:12:30 AM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 1635 ms Jan 25, 2009 10:12:31 AM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Jan 25, 2009 10:12:31 AM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/6.0.18 Jan 25, 2009 10:12:32 AM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on http-8080 Jan 25, 2009 10:12:32 AM org.apache.jk.common.ChannelSocket init INFO: JK: ajp13 listening on /0.0.0.0:8009 Jan 25, 2009 10:12:33 AM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/182 config=null Jan 25, 2009 10:12:33 AM org.apache.catalina.startup.Catalina start INFO: Server startup in 2108 ms =========== The output of localhost.2009-01-25.log is the following (was empty with dev-java/tomcat-native installed): =========== Jan 25, 2009 10:12:32 AM org.apache.catalina.core.StandardContext listenerStart FINE: Sending application start events Jan 25, 2009 10:12:32 AM org.apache.catalina.core.StandardContext filterStart FINE: Starting filters Jan 25, 2009 10:12:32 AM org.apache.catalina.core.StandardContext listenerStart FINE: Sending application start events Jan 25, 2009 10:12:32 AM org.apache.catalina.core.StandardContext filterStart FINE: Starting filters =========== The main point, from what I can tell, is that all that it takes to fix this Tomcat installation is uninstalling dev-java/tomcat-native - with no changes to configuration of any kind. Then it just starts working.
In my humble opinion, it looks like if there is APR present, on this system Tomcat during start-up does not generate any errors but waits indefinitely on something. Not sure if that is something possible.
(In reply to comment #9) > In my humble opinion, it looks like if there is APR present, on this system > Tomcat during start-up does not generate any errors but waits indefinitely on > something. Not sure if that is something possible. > I am currently testing this out a few different amd64 and ~amd64 machines. I am unable to re-produce this, thus far, with tc-native-1.1.15 and tc-native-1.1.16, but i have an idea what could be causing this. -weisso
(In reply to comment #10) > (In reply to comment #9) > I am currently testing this out a few different amd64 and ~amd64 machines. > -weisso This is still un-reproducible on a clean amd64 install. See clean log: http://rafb.net/p/IW1i0V55.html Do you have any other web services running >I normally use JPDA through Eclipse for debugging web apps - however, none have >been deployed beyond the manager shipped with Tomcat. Are you trying to start tomcat inside Eclipse? -weisso
No, no other web servers running. Neither Eclipse is running. Starting Tomcat as # /etc/init.d/tomcat-6 start as root. I believe the 3 main points are: 1. Removal of dev-java/tomcat-native allows Tomcat to start and work successfully without any configuration changes. 2. An _identical_ setup works successfully on 64-bit Core-2 Duo with dev-java/tomcat-native. 3. No errors are reported even with debugging set to FINE (or at least, I could not find them). One difference between the machines (besides the processor) is the kernel: - 2.6.26-tuxonice on Intel Core-2 Duo (working) - 2.6.27-hardened-r4 on AMD64 Dula Core (not working, no security errors or warnings) Neither kernel supports execution of 32-bit binaries.
(In reply to comment #12) > - 2.6.27-hardened-r4 on AMD64 Dula Core (not working, no security errors or > warnings) using PaX? http://www.gentoo.org/proj/en/hardened/hardenedfaq.xml#paxjava -weisso
Yes, using PAX. But all Java IS working :) But I did double-check pax and grsec logs - no errors there. Is there any way to enable detailed logging in APR to see where it stops? As you saw, I did enable detailed logging in Tomcat, but it didn't go very far, stopped in the very beginnng.
(In reply to comment #14) Been actively testing this, i will get back with results/findings. -weisso
I am having a hard time reproducing this. Please try this: add, "org.apache.catalina.level = FINEST" to logging.properties clear the log, clear out any extra non-standard webapps, start tomcat, this should produce a very large logfile. Please attach the file. Thanks, weisso
(In reply to comment #16) > I am having a hard time reproducing this. > > Please try this: > > add, "org.apache.catalina.level = FINEST" to logging.properties > > clear the log, clear out any extra non-standard webapps, start tomcat, this > should produce a very large logfile. Please attach the file. > Never attached. Closing as NEEDINFO.