【问题标题】:jprofiler jpcontroller can't connect to jvm when called with host:portjprofiler jpcontroller 在使用 host:port 调用时无法连接到 jvm
【发布时间】:2014-09-22 12:22:43
【问题描述】:

我现在想分析我的 Web 应用程序,这就是我所做的: 运行 jpenable.exe 并在找到 thi jvm 后,它给了我一个端口,所以我可以使用 JProfiler GUI 连接到它(例如:12121)!现在我想拥有命令行控制,然后尝试使用以下命令连接 jpcontroller:

jpcontroller.exe localhost:12121

但它无法连接并没有错误地粘在那里!现在如果我使用这个命令:

jpcontroller.exe <port>

然后就可以了! 但实际上我不能这样做,因为我想连接到远程 jvm!!

我错在哪里?

【问题讨论】:

    标签: java jvm jprofiler


    【解决方案1】:

    jpcontroller 不连接到分析代理打开的端口,但它使用 JMX 连接到进程。要在远程计算机上工作,请添加 VM 参数

    -Djprofiler.jmxServerPort=[端口]

    到分析的进程并在 jpcontroller 中使用该端口。然后,将创建一个侦听该端口的 MBean 服务器。

    【讨论】:

    • 抱歉,我忘记了这个功能。请参阅我的更新答案。
    • 感谢您的帮助,但这也不起作用!它说No connection to an MBean server at 127.0.0.1:17187 could be made If the remote computer is only reachable via an IP address, please add -Djava.rmi.server.hostname=[IP address] as a VM parameter to the remote VM,我什至做到了,但仍然无法正常工作!
    • 那么 MBeanServer 没有运行。可能是在附加期间无法初始化 MBeanServer。尝试将“Session->Integration wizards->New Remote Integration”以及 -Djprofiler.jmxServerPort=[port] 给出的 -agentpath 参数添加到已分析进程的启动脚本中,然后您不必使用 jpenable .
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-04-27
    • 1970-01-01
    • 2016-10-26
    • 1970-01-01
    • 1970-01-01
    • 2023-03-12
    • 1970-01-01
    相关资源
    最近更新 更多