7

I want to profile a Java application with VisualVM, remotely via JMX. Because it's a NAT'ted and firewalled EC2 instance, I can't use the default RMI approach and need to use the optional JMXMP extensions, which I must first download.

NOTE – IF YOU WANT TO USE A JMXMP CONNECTOR, DOWNLOAD THE JSR 160 REFERENCE IMPLEMENTATION FROM , AND ADD THE JMXREMOTE_OPTIONAL.JAR FILE TO YOUR CLASSPATH. YOU WILL FIND EXAMPLES OF USE OF THE JMXMP CONNECTORS IN THE JMX REMOTE API TUTORIAL INCLUDED WITH THE JSR 160 REFERENCE IMPLEMENTATION.

http://docs.oracle.com/javase/6/docs/technotes/guides/jmx/overview/connectors.html

But when I go to that page, I cannot find the download. In fact, Google cannot find the download. Where can I get these extensions?

Bart van Heukelom
  • 41,958
  • 59
  • 182
  • 293

5 Answers5

9

The canonical javax.management:jmxremote_optional appears to have been removed from Maven Central [1]. (I wonder why... legions of Larry's lawyers?)

Fortunately the following appears to be a drop-in replacement which is on Maven Central [2]:

<dependency>
    <groupId>org.glassfish.external</groupId>
    <artifactId>opendmk_jmxremote_optional_jar</artifactId>
    <version>1.0-b01-ea</version>
</dependency>

My JMXMP/TLS code continues to work with this, secured and with authentication on both sides. May your mileage be equally good. :)

[1] http://repo1.maven.org/maven2//javax/management/jmxremote_optional/1.0.1_04/

[2] http://repo1.maven.org/maven2/org/glassfish/external/opendmk_jmxremote_optional_jar/1.0-b01-ea/

Partly Cloudy
  • 5,778
  • 3
  • 24
  • 14
3

http://www.oracle.com/technetwork/java/javase/tech/download-jsp-141676.html

...has a download button for JMX Remote API 1.0.1_04 Reference Implementation. This links to...

http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-java-plat-419418.html

... which only offers Java Management Extensions (JMX) Remote API Reference Implementation 1.0.1_03. So still a bit flaky.

Bart van Heukelom
  • 41,958
  • 59
  • 182
  • 293
2

The easiest solution would to create socks proxy with ssh -D. See this post for more details. Than start VisualVM and set this proxy in Tools->Options->Network. You don't need to use -J-Dnetbeans.system_socks_proxy -J-Djava.net.useSystemProxies on VisualVM command line.

Tomas Hurka
  • 6,442
  • 26
  • 36
1

v4.0 came out in May 2013

jmxremote_optional-repackaged jar

Andrew
  • 820
  • 8
  • 20
0

See OpenDMK at https://github.com/nickman/OpenDMK. It's a maven build. You need the jmx-optional module.

Nicholas
  • 15,671
  • 4
  • 38
  • 63