1

我正在尝试使用 jpcontroller 连接到本地应用程序,但我收到一条错误消息,指出它无法连接到 MBean 服务器。我的配置详细信息如下:

我在 tcServer \ Tomcat 启动配置中添加了以下参数:

wrapper.java.additional.10="-agentpath:C:\PROGRA~1\JPROFI~1\bin\WINDOW~1\jprofilerti.dll=offline,id=121"
wrapper.java.additional.11="-Djprofiler.jmxServerPort=5555"

这是 tcServer\Tomcat 启动输出:

wrapper  | --> Wrapper Started as Console
wrapper  | Launching a JVM...
jvm 1    | JProfiler> Protocol version 35
jvm 1    | JProfiler> Using JVMTI
jvm 1    | JProfiler> JVMTI version 1.1 detected.
jvm 1    | JProfiler> 64-bit library
jvm 1    | JProfiler> Offline profiling mode.
jvm 1    | JProfiler> Using config file C:\XXXXX\XXXXXX\.jprofiler7\config.xml (id: 121)
jvm 1    | JProfiler> Listening on port: 8849.
jvm 1    | JProfiler> Instrumenting native methods.
jvm 1    | JProfiler> Can retransform classes.
jvm 1    | JProfiler> Can retransform any class.
jvm 1    | JProfiler> Native library initialized
jvm 1    | JProfiler> VM initialized
jvm 1    | JProfiler> Using sampling (5 ms)
jvm 1    | JProfiler> Time measurement: elapsed time
jvm 1    | JProfiler> CPU profiling enabled
jvm 1    | JProfiler> Hotspot compiler enabled
jvm 1    | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
jvm 1    |   Copyright 1999-2006 Tanuki Software, Inc.  All Rights Reserved.
jvm 1    |
jvm 1    | JProfiler> WARNING: No authentication for JMX server specified.
jvm 1    | JProfiler> Pass -Djprofiler.jmxPasswordFile=[file] to set up authentication
jvm 1    | Jul 29, 2013 9:32:33 AM org.apache.catalina.startup.Catalina load
jvm 1    | INFO: Initialization processed in 974 ms

根据文档,我假设 jprofiler.jmxPasswordFile 参数是可选的,因此我忽略了与 JMX 服务器身份验证有关的消息。不幸的是,当我运行 jpcontroller 时,它无法连接到 MBean 服务器。这是输出:

Connecting to XXXXXXXXXXXX:5555 ...
No connection to an MBean server at XXXXXXXXXXXX:5555 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

我还使用 JConsole 连接到 JVM,但没有看到任何注册的 com.jprofiler MBean。除了 jprofiler.jmxServerPort 参数之外,是否还需要配置其他任何东西?

提前感谢您的帮助,亚伦

4

0 回答 0