Is there any way to reconnect disconnected JMX connection in jvisualvm? When monitored JMX enabled application restarts, I have to restart jvisualvm to reconnect it. Am I missing something?
Here are my jvisualvm details:
Version: 1.6.0_22 (Build 100326); platform 091221-4fc006d17cb1
System: Linux (2.6.35-23-generic) , amd64 64bit Java: 1.6.0_22; Java HotSpot(TM) 64-Bit Server VM (17.1-b03, mixed mode)
In Java VisualVM's Applications window, right click on the Local machine and select 'Add JMX Connection'. The Add JMX Connection dialog box opens. The host name localhost is already filled in. You only need to add the port number on which the application is exposed for monitoring and management.
Local JMX access If you are using a Java SE 6 or later JVM, local JMX management and monitoring are most likely enabled by default.
Connecting to a Remote Host To add a remote host, right-click the Remote node in the Applications window, choose Add Remote Host and type the host name or IP address in the Add Remote Host dialog box. (You can also specify a display name that will be used to refer to the host when listed under the Remote node.)
JConsole uses only JMX, but VisualVM uses other monitoring technologies like Jvmstat, Attach API and SA in addition to JMX. It can merge data from all those monitoring technologies in one place and the user does not need to think which technology he should use in particular situation.
there is JIRA for that feature: https://java.net/jira/browse/VISUALVM-120
At least in the current version (1.8.0_45 (Build 1380-140910)
), if you check the "Save security credentials" checkbox in the "Add JMX Connection..." dialog, it will attempt to reconnect to the remote server when visualvm is next started. So, if you get disconnected, you can quit out of visualvm and relaunch it in order to reconnect. I know that's not quite what you were asking for, but at least it works. The fact that the feature you were hoping for still hasn't been implemented over 10 years after it was first requested is pretty sad. My guess is that they're trying to get people to buy Mission Control instead.
The original issue for this at java.net no longer exists, but this appears to be the equivalent on GitHub. Go give it a thumbs up if you care about it being completed/fixed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With