Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8237631

Add ability to configure third port for remote JMX

    XMLWordPrintable

Details

    • CSR
    • Resolution: Approved
    • P4
    • 15
    • core-svc
    • None
    • behavioral
    • minimal
    • This is new property added to the management.properties file and new option being added to the java launcher and therefore has no compatibility considerations.
    • System or security property, add/remove/modify command line option
    • JDK

    Description

      Summary

      In order to configure (remote) JMX access to a particular runtime instance, the instance must be configured with appropriate values for n/w ports, upon which, to initialize the appropriate services required in order to support such access.

      Additionally, JMX has the capability to listen for these (remote) accesses, not only remotely, but also on a local (only) port.

      However the current implementation only supports configuration of the remote port #'s, and randomly selects the local (only) port #.

      Problem

      It is possible to configure two of the three ports (required) for remote JMX operation by specifying (port) values for com.sun.management.jmxremote.port and com.sun.management.jmxremote.rmi.port properties.

      (the value for the local-only service is currently randomly selected by the implementation)

      However, there is no (current) mechanism to configure the third (JMX local) port #.

      This inability can cause failures to occur if the randomly assigned port conflicts with another process that may specify the port allocated.

      Solution

      Provide a new property 'com.sun.management.jmxremote.local.port', which is the counterpart of the existing property 'com.sun.management.jmxremote.port'.
      This new property can be configured via the 'management.properties' file like all other JMX properties. If specified, the port associated shall be assigned (vs. the current random port allocation).

      This new property can also be configured via '-Dcom.sun.management.jmxremote.local.port=' on the runtime command line, which will supersede any value specified in the corresponding configuration in the 'management.properties' file (as is the case with the other two existing port properties).

      Specification

      1.For configuration in the management.properties file:

      'com.sun.management.jmxremote.local.port=port-number'

      2.For configuration via -D flag:

      '-Dcom.sun.management.jmxremote.local.port=port-number'

      Webrev: http://cr.openjdk.java.net/~fyang/8234484/webrev.02/

      Attachments

        Issue Links

          Activity

            People

              lcable Larry Cable
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: