{"id":523,"date":"2006-07-26T03:30:24","date_gmt":"2006-07-26T08:30:24","guid":{"rendered":"http:\/\/blogs.law.harvard.edu\/hoanga\/2006\/07\/26\/hints-on-getting-jonas-rmi-firewalls-h"},"modified":"2006-07-26T03:30:24","modified_gmt":"2006-07-26T08:30:24","slug":"hints-on-getting-jonas-rmi-firewalls-happy","status":"publish","type":"post","link":"https:\/\/archive.blogs.harvard.edu\/hoanga\/2006\/07\/26\/hints-on-getting-jonas-rmi-firewalls-happy\/","title":{"rendered":"Hints on getting JOnAS + RMI + firewalls happy"},"content":{"rendered":"<p><a name='a641'><\/a><\/p>\n<p>I&#8217;ve been playing with JOnAS lately and have been puzzling out how to get<\/p>\n<p>RMI working through a firewall.  Normally RMI uses dynamic ports which<\/p>\n<p>represents pain and suffering if you want to use JMX.   The documentation<\/p>\n<p>for JOnAS is located<\/p>\n<p><a href=\"http:\/\/jonas.objectweb.org\/current\/doc\/howto\/Firewall.html#Firewall\">here<\/a>.  After glancing at the JOnAS config I was disheartened to find it<\/p>\n<p>wasn&#8217;t just &#8216;set the RMI port&#8217;.  It was set the port for a particular protocol<\/p>\n<p>RMI will run over:<\/p>\n<p><em><\/p>\n<ul>\n<li>For the RMI\/JRMP protocol, change:\n<pre>carol.jrmp.server.port=0\n\r\n<\/pre>\n<\/li>\n<li>For the RMI\/Jeremie protocol, change:\n<pre>carol.jeremie.server.port=0\n\r\n<\/pre>\n<\/li>\n<li>For the RMI\/IIOP protocol, change:\n<pre>carol.iiop.server.port=0\n\r\n<\/pre>\n<\/li>\n<\/ul>\n<p><\/em><\/p>\n<p>Oh great.  All those wonderful docs on JMX that I read <\/p>\n<p><a href=\"http:\/\/samsara.bebear.net\/cgi-bin\/cgiwrap\/~blosxom\/blosxom.cgi\/2006\/07\/07#jmx_through_firewalls\">before<\/a> didn&#8217;t exactly mention I&#8217;d have to<\/p>\n<p>choose the transport protocol for RMI.  Why is it everytime you try to learn<\/p>\n<p>more about Java stuff it&#8217;s like falling into the rabbit hole?<\/p>\n<p><\/p>\n<p>So after poking around I found what I was looking for in the Javadocs<\/p>\n<p>on JMX <a href=\"http:\/\/java.sun.com\/j2se\/1.5.0\/docs\/api\/javax\/management\/remote\/rmi\/package-summary.html\">here<\/a>.  This is what the docs say:<\/p>\n<p><em><\/p>\n<p>The RMI connector supports both the JRMP and the IIOP transports for RMI.<\/p>\n<p><\/p>\n<p>Like most connectors in the JMX Remote API, an RMI connector usually has an address, which is a JMXServiceURL. The protocol part of this address is rmi for a connector that uses the default RMI transport (JRMP), or iiop for a connector that uses RMI\/IIOP<\/p>\n<p><\/em><\/p>\n<p>So there you have it.  By DEFAULT JMX will default to using JRMP but it<\/p>\n<p>can also use IIOP.  Lots more Java acronym soup to figure out.  <\/p>\n<p>References:<\/p>\n<ul>\n<li>\n<p><a href=\"http:\/\/samsara.bebear.net\/cgi-bin\/cgiwrap\/~blosxom\/blosxom.cgi\/2006\/07\/07#jmx_through_firewalls\"><\/p>\n<p>My previous encounter with JMX and firewalls<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"http:\/\/jonas.objectweb.org\/current\/doc\/howto\/Firewall.html#Firewall\"><\/p>\n<p>Getting RMI working with JOnAS through a firewall hints<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"http:\/\/java.sun.com\/j2se\/1.5.0\/docs\/api\/javax\/management\/remote\/rmi\/package-summary.html\"><\/p>\n<p>JMX JavaDocs describing RMI protocols<\/a>.  <\/p>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve been playing with JOnAS lately and have been puzzling out how to get RMI working through a firewall. Normally RMI uses dynamic ports which represents pain and suffering if you want to use JMX. The documentation for JOnAS is located here. After glancing at the JOnAS config I was disheartened to find it wasn&#8217;t [&hellip;]<\/p>\n","protected":false},"author":704,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1212],"tags":[],"class_list":["post-523","post","type-post","status-publish","format-standard","hentry","category-tagme"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/archive.blogs.harvard.edu\/hoanga\/wp-json\/wp\/v2\/posts\/523","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/archive.blogs.harvard.edu\/hoanga\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/archive.blogs.harvard.edu\/hoanga\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/archive.blogs.harvard.edu\/hoanga\/wp-json\/wp\/v2\/users\/704"}],"replies":[{"embeddable":true,"href":"https:\/\/archive.blogs.harvard.edu\/hoanga\/wp-json\/wp\/v2\/comments?post=523"}],"version-history":[{"count":0,"href":"https:\/\/archive.blogs.harvard.edu\/hoanga\/wp-json\/wp\/v2\/posts\/523\/revisions"}],"wp:attachment":[{"href":"https:\/\/archive.blogs.harvard.edu\/hoanga\/wp-json\/wp\/v2\/media?parent=523"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/archive.blogs.harvard.edu\/hoanga\/wp-json\/wp\/v2\/categories?post=523"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/archive.blogs.harvard.edu\/hoanga\/wp-json\/wp\/v2\/tags?post=523"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}