JMX / JConsole regression with Attach API using Java 7u40 ?
Staffan Larsen
staffan.larsen at oracle.com
Mon Oct 14 00:58:35 PDT 2013
The ConnectionFailedSSL1 and ConnectionFailedSSL2 messages should read:
Secure connection failed. Retry insecurely?
The connection to {0} could not be made using SSL.
Would you like to try without SSL?
(Username and password will be sent in plain text.)
Pressing 'Insecure' will then connect without SSL.
But form the stack trace you provide this does not look like the problem you are running into. Can try deleting all files called .attach_pidXXX and .java_pidXXX in your $TMPDIR? Also make sure jconsole and java are launched as the same user.
Thanks,
/Staffan
On 12 okt 2013, at 23:00, Christopher Brown <christopherbrown06 at gmail.com> wrote:
> 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