Hi,
We have been getting "Connection Time Out" issues for our Tomcat application.
One of the ways to track the problem is to run a thread dump on our applications. I used this command to generate the dump :
[root@app6 aigini]# /usr/lib/jvm/java-1.6.0-openjdk/bin/jstack -l 23688 /temp/app6thread.txt
Attaching to core /temp/app6thread.txt from executable 23688, please wait...
Error attaching to core file: Can't attach to the core file
[root@app6 aigini]# /usr/lib/jvm/java-1.6.0-openjdk/bin/jstack -l 23688 jstack.out
Attaching to core jstack.out from executable 23688, please wait...
Error attaching to core file: Can't attach to the core file
[root@app6 aigini]#
As you can see, it throws error. Why is this, and how do I resolve this problem?
I also tried the command "jmap" below :
[root@app6 aigini]# /usr/local/jdk1.6.0_20/bin/jmap -heap:format=b 23688
Attaching to process ID 23688, please wait...
sun.jvm.hotspot.debugger.NoSuchSymbolException: Could not find symbol "gHotSpotVMTypeEntryTypeNameOffset" in any of the known library names (libjvm.so, libjvm_g.so, gamma_g)
at sun.jvm.hotspot.HotSpotTypeDataBase.lookupInProcess(HotSpotTypeDataBase.java:388)
at sun.jvm.hotspot.HotSpotTypeDataBase.getLongValueFromProcess(HotSpotTypeDataBase.java:369)
at sun.jvm.hotspot.HotSpotTypeDataBase.readVMTypes(HotSpotTypeDataBase.java:102)
at sun.jvm.hotspot.HotSpotTypeDataBase.<init>(HotSpotTypeDataBase.java:85)
at sun.jvm.hotspot.bugspot.BugSpotAgent.setupVM(BugSpotAgent.java:568)
at sun.jvm.hotspot.bugspot.BugSpotAgent.go(BugSpotAgent.java:494)
at sun.jvm.hotspot.bugspot.BugSpotAgent.attach(BugSpotAgent.java:332)
at sun.jvm.hotspot.tools.Tool.start(Tool.java:163)
at sun.jvm.hotspot.tools.HeapDumper.main(HeapDumper.java:77)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at sun.tools.jmap.JMap.runTool(JMap.java:179)
at sun.tools.jmap.JMap.main(JMap.java:110)
Debugger attached successfully.
sun.jvm.hotspot.tools.HeapDumper requires a java VM process/core!
Is the above the exact output? I don't see any dump in my working directory :
[root@app6 aigini]# ll
total 721660
-rw-r--r--. 1 tcpdump tcpdump 564392105 Feb 10 17:36 app6.pcap
-rw-r--r--. 1 tcpdump tcpdump 341630 Feb 10 17:42 app6web.pcap
-rw-r--r--. 1 root root 67714741 Jul 10 2019 etms-web.war
-rwxr-xr-x. 1 apache apache 9278 Dec 21 2018 httpd-ssl.conf
-rw-r--r--. 1 aigini sysadmins 15419 Feb 7 13:42 output.txt
-rw-r--r--. 1 aigini sysadmins 51302767 Dec 12 16:24 zakat-es.war
-rw-r--r--. 1 root root 3872 Mar 13 17:21 zakatjosso.jsp
-rw-r--r--. 1 aigini sysadmins 55177868 Dec 10 09:53 zakat.war
[root@app6 aigini]#
This is the PID of the JAVA (Tomcat) application (It's running as user root) :
[root@app6 aigini]# ps -ef | grep tomcat | grep 6.0.32
root 23688 1 1 14:34 ? 00:01:27 /usr/lib/jvm/java-1.6.0-openjdk/bin/java -Djava.util.logging.config.file=/usr/local/apache-tomcat-6.0.32/conf/logging.properties -XX:PermSize=128M -XX:MaxPermSize=256M -Xms512m -Xmx1024m -Djava.security.auth.login.config=/usr/local/apache-tomcat-6.0.32/conf/jaas.conf -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/usr/local/apache-tomcat-6.0.32/endorsed -classpath /usr/local/apache-tomcat-6.0.32/bin/bootstrap.jar -Dcatalina.base=/usr/local/apache-tomcat-6.0.32 -Dcatalina.home=/usr/local/apache-tomcat-6.0.32 -Djava.io.tmpdir=/usr/local/apache-tomcat-6.0.32/temp org.apache.catalina.startup.Bootstrap start