users@glassfish.java.net

RE: GF 2.1 - JMX through firewall

From: Roy, Satadru <Satadru.Roy_at_bchydro.com>
Date: Fri, 18 Oct 2013 16:28:20 +0000

But this works only for Tomcat...?

From: Martin Gainty [mailto:mgainty_at_hotmail.com]
Sent: 2013, October 17 7:08 PM
To: users_at_glassfish.java.net
Subject: RE: GF 2.1 - JMX through firewall

set port attributes for both rmiRegistryPortPlatform and rmiServerPortPlatform port in the listener

e.g.
<Listener...
rmiRegistryPortPlatform="9009" rmiServerPortPlatform="9010" />

set the perms :

find /config/security.policy or config/jmxremote.access

insert both roles:
monitorRole readonly
controlRole readwrite

open both ports thru firewall

http://stackoverflow.com/questions/5045294/visualvm-through-firewalls-rmi-troubleshooting

HTH
Martin-

> To: users_at_glassfish.java.net<mailto:users_at_glassfish.java.net>
> From: satadru.roy_at_bchydro.com<mailto:satadru.roy_at_bchydro.com>
> Subject: GF 2.1 - JMX through firewall
> Date: Thu, 17 Oct 2013 23:47:43 +0000
>
> This one is about Glassfish 2.1.x and JMX connectivity through
> firewall. Basically, we're struggling with the random port allocation
> for the RMIServer and a client like VisualVM fails to connect through a
> firewall, even after setting
> -Dcom.sun.aas.jconsole.<instancename>.cbport = <port>, as documented
> here :
> https://blogs.oracle.com/tronds/entry/glassfish_and_jmx_through_a
>
> I was looking around in the codebase and found that in the JSR 160
> connector, the JmxConnectorServerDriver expects the JMX service url to
> be of the form "service:jmx:rmi://localhost:" +
> port1 + "/jndi/rmi://localhost:" + port2 + "/jmxrmi" where port1
> is the RMIserver port and port2 is the JMXConnector RMIRegistry port?
>
> Does this mean VisualVM has to pass in a JMX service URL of this form?
________________________________
This email and its attachments are intended solely for the personal use of the individual or entity named above. Any use of this communication by an unintended recipient is strictly prohibited. If you have received this email in error, any publication, use, reproduction, disclosure or dissemination of its contents is strictly prohibited. Please immediately delete this message and its attachments from your computer and servers. We would also appreciate if you would contact us by a collect call or return email to notify us of this error. Thank you for your cooperation.
-BCHydroDisclaimerID5.2.8.1541