JMX / JConsole regression with Attach API using Java 7u40 ?

Christopher Brown christopherbrown06 at gmail.com
Sat Oct 12 14:00:50 PDT 2013


Hello,

When I start an application, using Apple Java 1.6.0_51 (with "java -jar
application.jar" and no "-D" parameters), I can connect to it using
JConsole, using either the Apple Java 6 version or the Oracle Java 7
version.  The application registers some MXBeans using the
PlatformMBeanServer.

Now, when I start that same application, using Oracle Java 1.7.0_40, in the
same way, it is still visible using the Java 7 JConsole under "local
processes", however connection using JConsole and VisualVM fails.

Running JConsole with the "-debug" option, the following stacktrace is
displayed when JConsole fails to connect:

java.io.IOException: Unable to open socket file: target process not
responding or HotSpot VM not loaded
    at
sun.tools.jconsole.LocalVirtualMachine.loadManagementAgent(LocalVirtualMachine.java:238)
    at
sun.tools.jconsole.LocalVirtualMachine.startManagementAgent(LocalVirtualMachine.java:100)
    at sun.tools.jconsole.ProxyClient.tryConnect(ProxyClient.java:333)
    at sun.tools.jconsole.ProxyClient.connect(ProxyClient.java:313)
    at sun.tools.jconsole.VMPanel$2.run(VMPanel.java:292)
Caused by: com.sun.tools.attach.AttachNotSupportedException: Unable to open
socket file: target process not responding or HotSpot VM not loaded
    at sun.tools.attach.BsdVirtualMachine.<init>(BsdVirtualMachine.java:90)
    at
sun.tools.attach.BsdAttachProvider.attachVirtualMachine(BsdAttachProvider.java:63)
    at com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:213)
    at
sun.tools.jconsole.LocalVirtualMachine.loadManagementAgent(LocalVirtualMachine.java:236)
    ... 4 more

JConsole displays the dialog "ConnectionFailedSSL1" and
"ConnectionFailedSSL2", with [Cancel] and [Insecure] options.  If I click
"insecure", it fails in exactly the same with.

For a development environment, how can I get things working again so that
it "just works" (Oracle Java 7 VM and Java 7 JConsole) ?

Thanks,
Christopher


More information about the macosx-port-dev mailing list