Hi I manually install tomcat 8 in ubuntu 15.
But I want to know how do I know if my tomcat is running or it’s starting. sometimes, after I start the tomcat, I can’t access the url with ip_address:port# right away, like the page is keeping running, but nothing display. But I have some error when I run “shutdown run”. here is the process.

when I run “catalina.sh run”, it returns “
Using CATALINABASE: /opt/tomcat
Using CATALINA
HOME: /opt/tomcat
Using CATALINATMPDIR: /opt/tomcat/temp
Using JRE
HOME: /usr/lib/jvm/java-7-openjdk-amd64
Using CLASSPATH: /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar
21-Nov-2015 23:11:58.869 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/8.0.28
21-Nov-2015 23:11:58.876 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Oct 7 2015 18:25:21 UTC
21-Nov-2015 23:11:58.877 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number: 8.0.28.0
21-Nov-2015 23:11:58.877 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Linux
21-Nov-2015 23:11:58.877 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 4.2.0-16-generic
21-Nov-2015 23:11:58.878 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
21-Nov-2015 23:11:58.878 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /usr/lib/jvm/java-7-openjdk-amd64/jre
21-Nov-2015 23:11:58.878 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.7.085-b01
21-Nov-2015 23:11:58.879 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation
21-Nov-2015 23:11:58.879 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA
BASE: /opt/tomcat
21-Nov-2015 23:11:58.880 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: /opt/tomcat
21-Nov-2015 23:11:58.880 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties
21-Nov-2015 23:11:58.881 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
21-Nov-2015 23:11:58.881 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.endorsed.dirs=/opt/tomcat/endorsed
21-Nov-2015 23:11:58.881 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/opt/tomcat
21-Nov-2015 23:11:58.882 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/opt/tomcat
21-Nov-2015 23:11:58.882 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/opt/tomcat/temp
21-Nov-2015 23:11:58.882 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library 1.1.33 using APR version 1.5.2.
21-Nov-2015 23:11:58.883 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
21-Nov-2015 23:11:58.925 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized (OpenSSL 1.0.1f 6 Jan 2014)
21-Nov-2015 23:11:59.095 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-apr-8088”]
21-Nov-2015 23:11:59.133 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler [“ajp-apr-8009”]
21-Nov-2015 23:11:59.142 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 1695 ms
21-Nov-2015 23:11:59.262 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
21-Nov-2015 23:11:59.262 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.28
21-Nov-2015 23:11:59.306 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /opt/tomcat/webapps/host-manager

I didn’t see errors here.
Then
I run "ps -ef | grep tomcat” and it returns “
root 29583 29582 0 21:18 pts/2 00:00:03 /usr/lib/jvm/java-7-openjdk-amd64/bin/java -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/opt/tomcat/endorsed -classpath /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/opt/tomcat -Dcatalina.home=/opt/tomcat -Djava.io.tmpdir=/opt/tomcat/temp org.apache.catalina.startup.Bootstrap start
demo 29854 29467 0 23:01 pts/2 00:00:00 grep –color=auto tomcat

and I run “netstat -lnp | grep 8088”, it returns “
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp6 0 0 :::8088 :::* LISTEN -

I type url: ip_address:8088, but it shows the web is keeping running, nothing displayed. Hmm, okay, it displayed the tomcat page now.

when I run “shutdown.sh run”, it returns “
Using CATALINABASE: /opt/tomcat
Using CATALINA
HOME: /opt/tomcat
Using CATALINATMPDIR: /opt/tomcat/temp
Using JRE
HOME: /usr/lib/jvm/java-7-openjdk-amd64
Using CLASSPATH: /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar
usage: java org.apache.catalina.startup.Catalina [ -config {pathname} ] [ -nonaming ] { -help | start | stop }
Nov 21, 2015 11:09:41 PM org.apache.catalina.startup.Catalina stopServer
SEVERE: Could not contact localhost:8006. Tomcat may not be running.
Nov 21, 2015 11:09:41 PM org.apache.catalina.startup.Catalina stopServer
SEVERE: Catalina.stop:
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at java.net.Socket.connect(Socket.java:528)
at java.net.Socket.<init>(Socket.java:425)
at java.net.Socket.<init>(Socket.java:208)
at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:450)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:400)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:487)

Please help me to know what this is.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

hmm, I don’t know what happened, when I tried to startup tomcat and shut it down this morning, everything looks good,
when I run “shutdown.sh run”, it returns “
Using CATALINABASE: /opt/tomcat
Using CATALINA
HOME: /opt/tomcat
Using CATALINATMPDIR: /opt/tomcat/temp
Using JRE
HOME: /usr/lib/jvm/java-7-openjdk-amd64
Using CLASSPATH: /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar
usage: java org.apache.catalina.startup.Catalina [ -config {pathname} ] [ -nonaming ] { -help | start | stop }”

Submit an Answer