Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Original post

Updated on 31/05/2012

I have a VPS and running a Tomcat server over a year without a problem. However, Tomcat just shutdowns right after VPS maintain and can not start again a week ago. So I look into catalina.out and found that my VPS missing a Apache Tomcat Native library:

root@cdou:/home/tomcat/logs# vim catalina.out May 28, 2012 8:32:02 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:
/usr/lib/jvm/java-6-openjdk/jre/lib/amd64/server:/usr/lib/jvm/java-6-openjdk/jre/lib/amd64:/usr/lib/jvm/java-6-openjdk/jre/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib/jni:/lib:/usr/lib

so I googled around and install libtcnative-1, but still no luck, now catalina.out give me this:

An older version 1.1.19 of the APR based Apache Tomcat Native library is installed, while Tomcat recommends a minimum version of 1.1.2
share|improve this question
    
Your JRE is likely out of date as opposed to missing a lib. –  thinice May 29 '12 at 19:59
    
That part of the log doesn't seem to show the real issue, is that all? –  ghm1014 May 30 '12 at 0:14

2 Answers 2

I would :

  1. Look for any specific listeners that the applications configured use
  2. Temporary disable iptables so I can be sure that the ports aren't blocked
  3. Look if the is any specific binding to an IP .
  4. Launch Tomcat manually (not as a service ) and look at what errors it trows at start up .

I hope this helps .

share|improve this answer
    
i tried to disable iptables but still not working, the problem is probably related to Apache Tomcat Native library. –  facebook-570128180 May 29 '12 at 19:55

The native library installation is an optimisation and won't stop tomcat starting.

Hence the alert message is only logged at the INFO level;

INFO: The APR based Apache Tomcat Native library which allows optimal performance 
in production environments was not found

 

Hence you would be looking for some other message at the SEVERE or CRITICAL level:

You can search for serious startup errors like so;

# egrep "(SEVERE|WARN|CRIT|ERROR)" /var/log/tomcat6/catalina.out

SEVERE: The web application [/republish] appears to have started a thread named [Timer-1608] but has failed to stop it. This is very likely to create a memory leak.
SEVERE: The web application [/republish] appears to have started a thread named [Timer-1609] but has failed to stop it. This is very likely to create a memory leak.

 

To double check the status you can run netstat -lntp | grep :8080 to check whether its listening;

# netstat -lntp | grep ":8080"
tcp        0      0 :::8080      :::*        LISTEN     32195/java   

also look for it in the process list;

# ps -ef | grep tomcat
root     20558 20374  0 13:39 pts/0    00:00:00 grep tomcat
tomcat   32195     1  1 May27 ?        00:56:16 /usr/lib/jvm/java/bin/java -Xmx1024M -Djava.awt.headless=true -XX:-HeapDumpOnOutOfMemoryError -classpath :/usr/share/tomcat6/bin/bootstrap.jar:/usr/share/tomcat6/bin/tomcat-juli.jar:/usr/share/java/commons-daemon.jar -Dcatalina.base=/usr/share/tomcat6 -Dcatalina.home=/usr/share/tomcat6 -Djava.endorsed.dirs= -Djava.io.tmpdir=/var/cache/tomcat6/temp -Djava.util.logging.config.file=/usr/share/tomcat6/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager org.apache.catalina.startup.Bootstrap start

if you have port 8080 listening, and you have the entry in the ps -ef output, then its gone through through the startup phase, and is running a server on port 8080.

If you still have nothing, then please post the rest of the catalina.out file that was logged during tomcat6 start phase.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.