visualvm intellij“无法创建与目标应用程序的JMX连接”剖析不起作用 [英] visualvm intellij "Failed to create JMX connection to target application" profiling not working

查看:1468
本文介绍了visualvm intellij“无法创建与目标应用程序的JMX连接”剖析不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用visualVM来分析我正在使用Intellij进行调试的简单Java应用程序。我启动应用程序来调试,打开visualVM,我可以在列表中看到我的应用程序。我可以打开它;但是,我无法对我的应用程序使用抽样或分析。其他应用程序,如Intellij,可以很好地分析。当我查看visualVM日志时,我看到:

I am trying to use visualVM for profiling a simple java application that I am debugging with Intellij. I start the application to debug, open visualVM, and I can see my application in the list. I can open it; however, I am unable to use sampling or profiling for my application. Other applications, such as Intellij, can be profiled just fine. When I check the visualVM logs I see:

INFO [com.sun.tools.visualvm.jmx.impl.JmxModelImpl]:connect(2749)
com .sun.tools.attach.AttachNotSupportedException:无法打开套接字文件:目标进程未响应或未加载HotSpot VM

INFO [com.sun.tools.visualvm.jmx.impl.JmxModelImpl]: connect(2749) com.sun.tools.attach.AttachNotSupportedException: Unable to open socket file: target process not responding or HotSpot VM not loaded

更多信息:
操作系统= Mac在x86_64上运行的OS X版本10.9.1
Java; VM;供应商= 1.7.0_51; Java HotSpot(TM)64位服务器VM 24.51-b03; Oracle Corporation
Intellij IDEA = 13.0.2

more information: Operating System = Mac OS X version 10.9.1 running on x86_64 Java; VM; Vendor = 1.7.0_51; Java HotSpot(TM) 64-Bit Server VM 24.51-b03; Oracle Corporation Intellij IDEA = 13.0.2

如果有人这样做,请告诉我你是怎么得到它的。如果我可以继续使用Intellij VisualVMLauncher,我也想使用它。

if anyone has this working, please let me know how you got it. I would like to use the Intellij VisualVMLauncher as well if I can get it going.

推荐答案

也许这有帮助

java -Dcom.sun.management.jmxremote \
  -Dcom.sun.management.jmxremote.port=9010 \
  -Dcom.sun.management.jmxremote.local.only=false \
  -Dcom.sun.management.jmxremote.authenticate=false \
  -Dcom.sun.management.jmxremote.ssl=false \
  -jar xxx.jar

这篇关于visualvm intellij“无法创建与目标应用程序的JMX连接”剖析不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆