Tomcat 7 on Ubuntu 12.04 startup issues
- by Nico Huysamen
I am having trouble getting tomcat 7 to start up on my new VPS. I am really scratching my head since I have done this often. So I'm thinking it might be the VPS.
I just got a new VPS from CINFU. After a clean install of Ubuntu 12.04 32bit, I install openjdk-6-jdk, update JAVA_HOME to point to:
/usr/lib/jvm/java-1.6.0-openjdk-i386
and JRE_HOME to:
/usr/lib/jvm/java-1.6.0-openjdk-i386/jre
But when I try to run:
./catalina.sh run
it simply outputs:
Using CATALINA_BASE: /opt/tomcat/apache-tomcat-7.0.29
Using CATALINA_HOME: /opt/tomcat/apache-tomcat-7.0.29
Using CATALINA_TMPDIR: /opt/tomcat/apache-tomcat-7.0.29/temp
Using JRE_HOME: /usr/lib/jvm/java-1.6.0-openjdk-i386
Using CLASSPATH: /opt/tomcat/apache-tomcat-7.0.29/bin/bootstrap.jar:/opt/tomcat/apache-tomcat-7.0.29/bin/tomcat-juli.jar
and stops. It just hangs there doing nothing. If I run
./startup.sh && tail -f ../logs/catalina.out
it gets to:
Aug 24, 2012 8:38:36 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Aug 24, 2012 8:38:36 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Aug 24, 2012 8:38:36 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 495 ms
Aug 24, 2012 8:38:36 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Aug 24, 2012 8:38:36 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.29
but I am unable to access anything. The request just hangs.
I have also tried a few other things like explicitly exporting the paths etc in catalina.sh, and running
./startup.sh
rather than catalina.sh, but the furthest I have gotten is that it finishes deploying all the WARs (the default ones that comes with tomcat like the host-manager etc), but then it hangs:
Aug 24, 2012 8:47:30 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
and does nothing.
Anyone have any pointers that might help? As I said, I must really be missing something stupid since this has worked on all other VPSs that we have.
UPDATE
I figured out that the problem is actually the fact that they use OpnVZ virtualization and that there are known compatibility problems with Java.