-
CSR
-
Resolution: Approved
-
P4
-
None
-
behavioral
-
minimal
-
There is no compatibility risk as the fundamental behavior continues to be stable ie. without the option JVM will allocate a random port as before.
-
System or security property
-
JDK
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. Furthermore, for various compliance requirements, our products are required to declare all the used ports.
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
Configuration via management.properties file:
com.sun.management.jmxremote.local.port=port-number
Configuration via -D flag:
-Dcom.sun.management.jmxremote.local.port=port-number
- csr of
-
JDK-8263231 Add ability to configure third port for remote JMX
-
- Resolved
-
- relates to
-
JDK-8299126 Document assigning of JMX's third port
-
- Resolved
-