I am running Tomcat 6.0.31 on Ubuntu 10.10 and using tge Sun JDK (java-6-sun). Although tomcat is running its process does not show up when I run jps
(Java Virtual Machine Process Status Tool). The only output I see is the pid for the jps process itself. Why would the Tomcat process not show up?
A simple way to see if Tomcat is running is to check if there is a service listening on TCP port 8080 with the netstat command. This will, of course, only work if you are running Tomcat on the port you specify (its default port of 8080, for example) and not running any other service on that port.
The jps command uses the Java launcher to find the class name and arguments passed to the main method. If the target JVM is started with a custom launcher, then the class or JAR file name, and the arguments to the main method aren't available.
The jps command uses the java launcher to find the class name and arguments passed to the main method. If the target JVM is started with a custom launcher, the class name (or JAR file name) and the arguments to the main method will not be available.
Use a browser to check whether Tomcat is running on URL http://localhost:8080 , where 8080 is the Tomcat port specified in conf/server. xml. If Tomcat is running properly and you specified the correct port, the browser displays the Tomcat homepage.
You are probably running into Bug 7009828:
In Java 6 Update 23 and Java 6 Update 24, Java consider the java.io.tmpdir
property when deciding where to place some files that were needed for jps
, jconsole
and jvisulavm
to detect locally running JVMs. This means that every JVM instance that had this system property defined to something other than the default (/tmp
) would be invisible to these tools.
Tomcat installations in particular default to setting this property to their installations temp
folder.
So: either upgrade to Java 6 Update 25 or later (where the bug is fixed) or start jps
with -J-Djava.io.tmpdir=/path-to-tomcat-installation/temp
.
Could it be due to the /tmp/hsperfdata_$USER
directories being removed by a cron job running on your system? See http://www.semicomplete.com/blog/geekery/jps-shows-nothing-useful.html for more information.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With