Tomcat 7.54 on Ubuntu 10, 12 and 14

December 18, 2014 1.1k views

Hello All
We are having a lot of trouble installing tomcat 7 & 8 on Ubuntu. We have tried many flavors and only a few of them work.
Here are a few examples
Tomcat 7.0.54 --> Ubuntu 10.04--> Java 7 --> Works
Tomcat 7.0.57 --> Ubuntu 12.04--> Java 7 --> Doesnt work
Tomcat 8.x --> Ubuntu 12.04--> Java 7 --> Doesnt work
Tomcat 8.x --> Ubuntu 14.04--> Java 7 --> Doesnt work

We are getting a "Tomcat wasnt shut down and port is not available". In fact this is happening on boot itself. We have checked using "Sudo netstat -tulpen" to see for ports that are open.

This exact same is working on another large service provider (you can guess who it is)

Any help please?

Best Regards

1 comment
  • Heres a little bit more info
    Got a Ubuntu 14.04 64 bit machine

    1) Installed JRE (sudo apt-get install default-jre)
    2) Installed JDK (sudo apt-get install default-jdk)
    3) Set JDK in ~./bashrc (export JAVAHOME=/usr/lib/jvm/java-1.7.0-openjdk-amd64)
    4) Logged out and logged back in
    5) Checked JAVA
    HOME (using echo $JAVA_HOME)
    6) downloaded tomcat8 (wget http://apache.tradebit.com/pub/tomcat/tomcat-8/v8.0.15/bin/apache-tomcat-8.0.15.tar.gz)
    7) Untared tomcat (tar -xvzf tomcat-8.0.15.tar.gz)
    8) Rename tomcat-8.0.15 to tomcat8 (mv tomcat-8.0.15 tomcat8)
    9) Started tomcat (./tomcat8/bin/startup)
    10) Went to http://<ip-address>:8080/ on Chrome. Works well
    11) checked what ports are running (netstat -tulpen)
    a) I see port 8080 on tcp6 and 8009 on tcp6
    b) I don’t see port 8005 (Isn’t this where the shutdown script is listening)?
    12) Shut down tomcat (./tomcat8/bin/shutdown)
    a) It shows can’t connect to port 8005
    13) Restarted Machine
    14) Tried to access webpage on Chrome.
    1) Chrome just “spins”.
    15) Tried to access webpage on wget (wget localhost:8080)
    Respons is
    --2014-12-18 02:56:53-- http://localhost:8080/
    Resolving localhost (localhost)...
    Connecting to localhost (localhost)||:8080... connected.
    HTTP request sent, awaiting response...

    Tomcat serves pages only on first run AFTER reboot. Never after that. Looks like the http piece gets started and connection is established but nothing after that

Be the first one to answer this question.