Java VisualVM 不显示/列出我的 tomcat java 进程

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/22294114/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-13 14:46:58  来源:igfitidea点击:

Java VisualVM does not show/list my tomcat java process

javaprofilingvisualvmjvisualvm

提问by Kuldeep Jain

I am using jdk64and my java version is 1.6.0_24. I am running both (Tomcat java process and VisualVM) processes as Administrator on Windows Server 2008.

我正在使用jdk64,我的 Java 版本是1.6.0_24. 我在 Windows Server 2008 上以管理员身份运行(Tomcat java 进程和 VisualVM)进程。

Tomcat is running with -Xmx7196m, where as jvisualvmis running with -Xms24mand -Xmx256m. Could this be the cause?

Tomcat 使用 运行-Xmx7196m,而 asjvisualvm使用-Xms24m和运行-Xmx256m。这可能是原因吗?

采纳答案by Salah

You need to add the JMXparameters to enable the JMXconnection to your application, so add the following parameters:

您需要添加JMX参数以启用与JMX应用程序的连接,因此添加以下参数:

-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.port=8484
-Dcom.sun.management.jmxremote.ssl=false

Then You need to add your tomcat process manually, So right click on you localhost node -> Add JMX Connection -> type your port -> OK.

然后你需要手动添加你的 tomcat 进程,所以right click on you localhost node -> Add JMX Connection -> type your port -> OK

Your tomcat process will be listed in under localhost node.

您的 tomcat 进程将列在 localhost 节点下。

回答by Amaraneni Snigdha

Our application server is JBOSS 6.1.0.final and our server itself is not starting on adding these lines to the run.conf.bat file -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=8484 -Dcom.sun.management.jmxremote.ssl=false

我们的应用程序服务器是 JBOSS 6.1.0.final 并且我们的服务器本身没有开始将这些行添加到 run.conf.bat 文件中 -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=8484 -Dcom.sun.management.jmxremote.ssl=false