0

I had to create thread dump of web application in tomcat runned as a service without need to restart tomcat. I tried to attach jconsole, jvisualvm, jstack, but without success.

  • Tomcat is not jmx remote enabled. (But can't introduce properties - can't restart it)
  • I tried to execute applications from the same user as the service, change TEMP, TMP folders
  • I want to execute it locally - on the same server as tomcat as no configuration should be needed (hence no restarting) ("Note: This configuration is needed only if you are going to monitor Tomcat remotely. It is not needed if you are going to monitor it locally, using the same user that Tomcat runs with.")
  • In jConsole process is showed grayed, sometimes not visible - could not attach it
  • In jStack: Insufficient memory or insufficient privilages to attach
  • Tomcat is running on Windows machine

Any ideas?

4

3 回答 3

2

我会推荐 jcmd,但我认为本地附加与 jstat 和其他工具存在相同的问题。

根据以下两个谷歌点击,“psexec -s jstack PID”似乎是一个解决方案(我没有尝试过)

https://www.assetbank.co.uk/support/documentation/knowledge-base/how-to-take-a-java-thread-dump/ https://access.redhat.com/solutions/19170

于 2014-11-28T07:34:57.910 回答
1

如果在 Unix 上运行,请发送kill -3 <pid>. 这会将线程转储打印到catalina.out.

您必须是运行 Tomcat 服务的同一用户。

于 2014-11-27T15:37:04.220 回答
0

常问问题:

于 2014-11-29T18:33:48.560 回答