{"id":2105,"date":"2010-11-21T13:24:58","date_gmt":"2010-11-21T18:24:58","guid":{"rendered":"http:\/\/www.gubatron.com\/blog\/?p=2105"},"modified":"2010-11-21T13:24:58","modified_gmt":"2010-11-21T18:24:58","slug":"jconsole-connection-failed-retry-solved-java-jmx","status":"publish","type":"post","link":"https:\/\/www.gubatron.com\/blog\/jconsole-connection-failed-retry-solved-java-jmx\/","title":{"rendered":"jconsole: &#8220;Connection Failed: Retry?&#8221; #SOLVED #java #jmx"},"content":{"rendered":"<p>So you wrote a piece of server software and you found out about JMX and the jconsole tool to remotely monitor all sorts of interesting metrics remotely, all without adding a single line of code to your project.<\/p>\n<p>Say you want to run it the simplest way possible with no authentication, the <a href=\"http:\/\/download.oracle.com\/javase\/1.5.0\/docs\/guide\/management\/jconsole.html\">tutorial<\/a> says that<strong> these are the options you need to pass to the remote virtual machine to enable JMX remote monitoring on some port<\/strong> (let&#8217;s put 9595 for illustrative purposes).<\/p>\n<p>[bash]<br \/>\n-Dcom.sun.management.jmxremote.port=9595&#8242;,<br \/>\n-Dcom.sun.management.jmxremote.ssl=false&#8217;,<br \/>\n-Dcom.sun.management.jmxremote.authenticate=false<br \/>\n[\/bash]<\/p>\n<p>right?<\/p>\n<p>But when you open your jconsole on your local computer to connect to the remote server&#8230;<\/p>\n<p>[bash]<br \/>\njconsole myserver.com:9696<br \/>\n[\/bash]<\/p>\n<p>You get this fucking error no matter what you do.<br \/>\n<img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.gubatron.com\/blog\/wp-content\/uploads\/2010\/11\/jconsole_connection_failed.png?resize=409%2C158\" alt=\"\" title=\"jconsole_connection_failed\" width=\"409\" height=\"158\" class=\"alignnone size-full wp-image-2106\" srcset=\"https:\/\/i0.wp.com\/www.gubatron.com\/blog\/wp-content\/uploads\/2010\/11\/jconsole_connection_failed.png?w=409&amp;ssl=1 409w, https:\/\/i0.wp.com\/www.gubatron.com\/blog\/wp-content\/uploads\/2010\/11\/jconsole_connection_failed.png?resize=300%2C115&amp;ssl=1 300w\" sizes=\"auto, (max-width: 409px) 100vw, 409px\" \/><\/p>\n<p>You&#8217;re <strong>just missing one more option<\/strong> they must have forgotten to mention in the retard <a href=\"http:\/\/download.oracle.com\/javase\/1.5.0\/docs\/guide\/management\/jconsole.html\">tutorial<\/a> at oracle.com<\/p>\n<p>(let&#8217;s use IP address 72.14.204.147 as the remote server IP)<\/p>\n<p>[bash]<br \/>\n-Dcom.sun.management.jmxremote.port=9595&#8242;,<br \/>\n-Dcom.sun.management.jmxremote.ssl=false&#8217;,<br \/>\n-Dcom.sun.management.jmxremote.authenticate=false<br \/>\n-Djava.rmi.server.hostname=72.14.204.147 #ip of the remote machine, yes the ip, not the name<br \/>\n[\/bash]<\/p>\n<p><strong>Voil\u00e0<\/strong><\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.gubatron.com\/blog\/wp-content\/uploads\/2010\/11\/jconsole_working.png\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.gubatron.com\/blog\/wp-content\/uploads\/2010\/11\/jconsole_working.png?w=640\" alt=\"\" title=\"jconsole_working\"  class=\"alignnone size-full wp-image-2107\" srcset=\"https:\/\/i0.wp.com\/www.gubatron.com\/blog\/wp-content\/uploads\/2010\/11\/jconsole_working.png?w=900&amp;ssl=1 900w, https:\/\/i0.wp.com\/www.gubatron.com\/blog\/wp-content\/uploads\/2010\/11\/jconsole_working.png?resize=300%2C250&amp;ssl=1 300w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>So you wrote a piece of server software and you found out about JMX and the jconsole tool to remotely monitor all sorts of interesting metrics remotely, all without adding a single line of code to your project. Say you want to run it the simplest way possible with no authentication, the tutorial says that [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[15,74],"tags":[],"class_list":["post-2105","post","type-post","status-publish","format-standard","hentry","category-code","category-software-development"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5Unzf-xX","jetpack-related-posts":[{"id":444,"url":"https:\/\/www.gubatron.com\/blog\/hoy-18-de-enero-overview-of-mustang-features-java-6-en-las-nuevas-oficinas-de-google\/","url_meta":{"origin":2105,"position":0},"title":"Hoy 18 de Enero, Overview of Mustang Features (Java 6) en las nuevas oficinas de Google, NY","author":"gubatron","date":"January 18, 2007","format":false,"excerpt":"Hoy a las 6pm voy a la reunion del Java SIG (El grupo de usuarios de Java de New York), que tomara lugar en las nuevas oficinas de Google en Chelsea, wohoo. La exposicion de las nuevas caracteristicas de Java 6, code name \"Mustang\", va a ser dictada por La\u2026","rel":"","context":"In &quot;Code&quot;","block_context":{"text":"Code","link":"https:\/\/www.gubatron.com\/blog\/category\/code\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3150,"url":"https:\/\/www.gubatron.com\/blog\/how-to-add-an-existing-git-repository-to-github\/","url_meta":{"origin":2105,"position":1},"title":"How to add an existing GIT repository to github.","author":"gubatron","date":"August 31, 2013","format":false,"excerpt":"Most of the times, it makes more sense to start working on something that slowly transforms into the beginning of a project that deserves to be on github. This post is about creating a local repository and putting it on github. 1. First we must convert the main local folder\u2026","rel":"","context":"In &quot;Code&quot;","block_context":{"text":"Code","link":"https:\/\/www.gubatron.com\/blog\/category\/code\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2087,"url":"https:\/\/www.gubatron.com\/blog\/mercurial-for-subversion-expats-merging-remote-changes-abort-push-creates-new-remote-heads\/","url_meta":{"origin":2105,"position":2},"title":"Mercurial for Subversion Expats: Merging remote changes. &#8220;abort: push creates new remote heads!&#8221;","author":"gubatron","date":"November 14, 2010","format":false,"excerpt":"Commit anywhere\/anytime with Mercurial So you have been using subversion for the past few years and now your team has decided to move on to Mercurial for all the benefits. Two or more people are working on the same branch and they're pushing code to the main copy of the\u2026","rel":"","context":"In &quot;Code&quot;","block_context":{"text":"Code","link":"https:\/\/www.gubatron.com\/blog\/category\/code\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1939,"url":"https:\/\/www.gubatron.com\/blog\/solved-eclipse-cant-see-my-android-device-on-ubuntu\/","url_meta":{"origin":2105,"position":3},"title":"[SOLVED] Eclipse can&#8217;t see my Android Device on Ubuntu","author":"gubatron","date":"May 28, 2010","format":false,"excerpt":"Are you seeing this on eclipse when you plug your Android device to your Ubuntu box? Serial Number: ?????????? AVD Name: N\/A Target: unknown State: ?? Here's the solution: 1. Create a script to fix this next time it happens, let's call it \"android_device_reset\" and save it on a folder\u2026","rel":"","context":"In &quot;Android&quot;","block_context":{"text":"Android","link":"https:\/\/www.gubatron.com\/blog\/category\/android\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1998,"url":"https:\/\/www.gubatron.com\/blog\/startkeychain-bash-utility-to-start-ssh-agent\/","url_meta":{"origin":2105,"position":4},"title":"startKeychain &#8211; bash utility to start ssh-agent","author":"gubatron","date":"June 3, 2010","format":false,"excerpt":"For my (and your) future reference, here's a function to put on your .bashrc or .bash_profile, you can invoke it later at any time to start\/re-start your ssh-agent. [bash] function startKeychain { killall ssh-agent rm ~\/.keychain\/* keychain id_rsa HOSTNAME=`hostname` source ~\/.keychain\/${HOSTNAME}-sh } [\/bash] Then at any time, the \"command\" startKeychain\u2026","rel":"","context":"In &quot;Code&quot;","block_context":{"text":"Code","link":"https:\/\/www.gubatron.com\/blog\/category\/code\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4073,"url":"https:\/\/www.gubatron.com\/blog\/remotely-code-signing-windows-apps-using-aws-virtual-servers-and-a-physical-usb-key\/","url_meta":{"origin":2105,"position":5},"title":"Remotely Code Signing Windows Apps Using AWS Virtual Servers and a Physical USB Key","author":"gubatron","date":"April 25, 2024","format":false,"excerpt":"As a developer, you may find yourself in a situation where you need to code sign your Windows applications using a physical USB signing key, but you don't have direct access to a Windows machine. Fortunately, with the power of cloud computing and remote desktop technology, you can set up\u2026","rel":"","context":"Similar post","block_context":{"text":"Similar post","link":""},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.gubatron.com\/blog\/wp-content\/uploads\/2024\/04\/GMBy5ZwWIAAnizc.jpeg?fit=1024%2C1024&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.gubatron.com\/blog\/wp-content\/uploads\/2024\/04\/GMBy5ZwWIAAnizc.jpeg?fit=1024%2C1024&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.gubatron.com\/blog\/wp-content\/uploads\/2024\/04\/GMBy5ZwWIAAnizc.jpeg?fit=1024%2C1024&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.gubatron.com\/blog\/wp-content\/uploads\/2024\/04\/GMBy5ZwWIAAnizc.jpeg?fit=1024%2C1024&ssl=1&resize=700%2C400 2x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/posts\/2105","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/comments?post=2105"}],"version-history":[{"count":0,"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/posts\/2105\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/media?parent=2105"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/categories?post=2105"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/tags?post=2105"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}