tag:blogger.com,1999:blog-6200103171537433622.post3964484896792164190..comments2023-05-08T07:29:19.469-04:00Comments on Mark Feeney: JMX through a ssh tunnelUnknownnoreply@blogger.comBlogger13125tag:blogger.com,1999:blog-6200103171537433622.post-82700438699879551982014-04-30T10:41:32.511-04:002014-04-30T10:41:32.511-04:00$ jvisualvm --help
Usage: /Library/Java/JavaVirtua...$ jvisualvm --help<br />Usage: /Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/lib/visualvm/platform/lib/nbexec {options} arguments<br /><br />General options:<br /> --help show this help<br /> --jdkhome path to Java(TM) 2 SDK, Standard Edition<br /> -J pass to JVM<br /><br /> --cp:p prepend to classpath<br /> --cp:a append to classpath<br />Module reload options:<br /> --reload /path/to/module.jar install or reinstall a module JAR file<br /><br />Additional module options:<br /> --openfile open file specified by , file can be Application snapshot, NetBeans Profiler snapshot or HPROF heap dump.<br /> --openid open application with id <br /> --openpid open application with process id <br /> --openjmx open application specified by JMX connection (host:port)<br /> --modules <br /> --refresh Refresh all catalogs<br /> --list Prints the list of all modules, their versions and enablement status<br /> --install ... Installs provided JAR files as modules<br /> --disable ... Disable modules for specified codebase names<br /> --enable ... Enable modules for specified codebase names<br /> --update ... Updates all or specified modules<br /> --update-all Updates all modules<br /> --extra-uc Add a extra Update Center (URL)<br /><br />Core options:<br /> --laf use given LookAndFeel class instead of the default<br /> --fontsize set the base font size of the user interface, in points<br /> --locale use specified locale<br /> --userdir use specified directory to store user settings<br /> --cachedir use specified directory to store user cache, must be different from userdir<br /> --nosplash do not show the splash screenFrank Grimeshttps://www.blogger.com/profile/12453602933597382563noreply@blogger.comtag:blogger.com,1999:blog-6200103171537433622.post-34975762869544091832014-04-30T10:27:47.311-04:002014-04-30T10:27:47.311-04:00When you say
put jmxremote_optional.jar in the cl...When you say<br /><br />put jmxremote_optional.jar in the classpath of both the client and server.<br /><br />Anyone know how to change the classpath of VisualVM on Windows?Anonymoushttps://www.blogger.com/profile/11136090613102038801noreply@blogger.comtag:blogger.com,1999:blog-6200103171537433622.post-61447476808458624072014-02-26T07:17:58.425-05:002014-02-26T07:17:58.425-05:00Same problemSame problemiwhttps://www.blogger.com/profile/15884668127782111561noreply@blogger.comtag:blogger.com,1999:blog-6200103171537433622.post-31574675414774973212012-09-25T17:54:33.566-04:002012-09-25T17:54:33.566-04:00Seems I spoke too soon... it's all working exc...Seems I spoke too soon... it's all working except that the Sample Memory button is disabled.<br /><br />It says "Memory Sampling Not available. Cannot connect to target application. Make sure the application is running on a supported JDK 6 or JDK 7."<br /><br />Any help/hints would be much appreciated...Frank Grimeshttps://www.blogger.com/profile/12453602933597382563noreply@blogger.comtag:blogger.com,1999:blog-6200103171537433622.post-53233595453948118612012-09-25T17:17:59.551-04:002012-09-25T17:17:59.551-04:00Silly me, I wasn't initializing with Managemen...Silly me, I wasn't initializing with ManagementFactory.getPlatformMBeanServer()... it works fine.Frank Grimeshttps://www.blogger.com/profile/12453602933597382563noreply@blogger.comtag:blogger.com,1999:blog-6200103171537433622.post-68598450912239448892012-09-25T16:30:10.532-04:002012-09-25T16:30:10.532-04:00I've written a custom javaagent with a premain...I've written a custom javaagent with a premain hook as outlined here: https://blogs.oracle.com/jmxetc/entry/jmx_connecting_through_firewalls_using<br /><br />Instead of using RMI I am starting a JMXMP connector as outlined in this post.<br />The JMXMP agent starts up correctly and if I telnet to 127.0.0.1:5555 it appears to be listening:<br /><br />$ telnet 127.0.0.1 5555<br />Trying 127.0.0.1...<br />Connected to localhost.<br />Escape character is '^]'.<br />??sr5javax.management.remote.message.HandshakeBeginMessage?,???6profilestLjava/lang/String;Lversionq~xppt1.0^]<br /><br />However, VisualVM cannot seem to retrieve any information from the JVM using a JMX connection URL of "service:jmx:jmxmp://127.0.0.1:5555".<br />Every tab shows "Not supported for this JVM".<br /><br />The OSX client is running: <br />java version "1.6.0_35"<br />Java(TM) SE Runtime Environment (build 1.6.0_35-b10-428-11M3811)<br />Java HotSpot(TM) 64-Bit Server VM (build 20.10-b01-428, mixed mode)<br /><br />The Gentoo server is running:<br />java version "1.6.0_35"<br />Java(TM) SE Runtime Environment (build 1.6.0_35-b10)<br />Java HotSpot(TM) 64-Bit Server VM (build 20.10-b01, mixed mode)<br /><br />Any idea what might be wrong?<br /><br />ThanksFrank Grimeshttps://www.blogger.com/profile/12453602933597382563noreply@blogger.comtag:blogger.com,1999:blog-6200103171537433622.post-17254574649180613802012-07-10T10:05:01.073-04:002012-07-10T10:05:01.073-04:00@Bart Sorry, but I don't know much about Tomca...@Bart Sorry, but I don't know much about Tomcat. I've only done this with Jetty and a couple of custom apps. Best of luck!overthinkhttps://www.blogger.com/profile/14609764005552907582noreply@blogger.comtag:blogger.com,1999:blog-6200103171537433622.post-78399609987545283482012-07-10T08:23:23.459-04:002012-07-10T08:23:23.459-04:00"It's what you wish the default was."..."It's what you wish the default was." - Yes! I don't understand why they make remote profiling so difficult.<br />Anyway, do you happen to know how to easily configure JMXMP in Tomcat?<br /><br />(http://stackoverflow.com/questions/11413178/how-to-enable-jmxmp-in-tomcat)Bart van Heukelomhttps://www.blogger.com/profile/15668188862239836492noreply@blogger.comtag:blogger.com,1999:blog-6200103171537433622.post-2993397777322539912012-01-05T09:53:46.118-05:002012-01-05T09:53:46.118-05:00@Marcelo Cool, thanks for the link. Could definit...@Marcelo Cool, thanks for the link. Could definitely be easier in some cases.overthinkhttps://www.blogger.com/profile/14609764005552907582noreply@blogger.comtag:blogger.com,1999:blog-6200103171537433622.post-34140440230128368192012-01-04T23:26:44.817-05:002012-01-04T23:26:44.817-05:00Another AMAZING solution:
http://bowerstudios.com...Another AMAZING solution:<br /><br />http://bowerstudios.com/node/731Marcelo Mrackhttps://www.blogger.com/profile/10376744690396837973noreply@blogger.comtag:blogger.com,1999:blog-6200103171537433622.post-71795821132786236132011-06-08T09:24:28.320-04:002011-06-08T09:24:28.320-04:00@lord.buddha Good catch! I will update the articl...@lord.buddha Good catch! I will update the article to reflect this. Thanks for the note.overthinkhttps://www.blogger.com/profile/14609764005552907582noreply@blogger.comtag:blogger.com,1999:blog-6200103171537433622.post-37256419279713256322011-06-07T21:37:57.526-04:002011-06-07T21:37:57.526-04:00Dammit, my snippet was snipped. So, in words
rep...Dammit, my snippet was snipped. So, in words<br /><br />replace the second blank arg to jmxConnector with a new HashMap that has the following string entry<br /><br /> name "jmx.remote.server.address.wildcard"<br /> <br /> value "false"lord.buddhahttps://www.blogger.com/profile/04596523980607985638noreply@blogger.comtag:blogger.com,1999:blog-6200103171537433622.post-43934605975650650132011-06-07T21:28:05.607-04:002011-06-07T21:28:05.607-04:00Nice article, but needs a fix.
JMXMP will alway...Nice article, but needs a fix. <br /><br />JMXMP will always listen on the any address (0.0.0.0 on IPv4) regardless of the address in the server URL unless, that "feature" is turned off. <br /><br />The following snippet is good for Jetty 7.x and <br /><br /> <br /> <br /> <br /> service:jmx:jmxmp://127.0.0.1:5555<br /> <br /> <br /> <br /> <br /> <br /> jmx.remote.server.address.wildcard<br /> falselord.buddhahttps://www.blogger.com/profile/04596523980607985638noreply@blogger.com