This documentation is for WSO2 Governance Registry 5.2.0. View documentation for the latest release.
Skip to end of metadata
Go to start of metadata

WSO2 Carbon which is the underline framework for WSO2 Governance Registry (and other products) can be monitored using a remote JMX client (such as JConsole) which is behind a firewall. This feature is enabled by the following configuration at carbon.xml:

  <!-- The JMX Ports -->
         <!--The port RMI registry is exposed-->
         <!--The port RMI server should be exposed-->

These parameters also can be passed at server start up time using the system properties com.wso2.rmiserver.port and for RMIServer port and the RMIRegistry port respectively.

When monitoring Carbon remotely, specifying the RMIRegistry port is sufficient but if your client is behind a firewall you will also need to specify the second port, RMIServer port. This second port need to be opened by the firewall admin.

The following code fragment is from which shows how the JMX URL is constructed according to provided port.

// Create an RMI connector and start it
if (rmiServerPortString != null) {
      int rmiServerPort = Integer.parseInt(rmiServerPortString);
      jmxURL = "service:jmx:rmi://" + NetworkUtils.getLocalHostname() + ":" +
                rmiServerPort + "/jndi/rmi://" + NetworkUtils.getLocalHostname() + ":" +
                            rmiRegistryPort + "/jmxrmi";
} else {
      jmxURL = "service:jmx:rmi:///jndi/rmi://" +
                NetworkUtils.getLocalHostname() + ":" + rmiRegistryPort + "/jmxrmi";
JMXServiceURL url = new JMXServiceURL(jmxURL);

With this improvment you will be able to monitor Governance Registry using a JMX client which is behind a firewall.


If you are intending to establish a remote connection (over a network or into a VM), make sure that the server has been started with the -Djava.rmi.server.hostname=<IP_ADDRESS_WHICH_YOU_USE_TO_CONNECT_TO_SERVER> option. For more information read Troubleshooting Connection Problems in JConsole.

  • No labels