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

com.sun.management.jmxremote.local.only ignored and always remote accessible.

    XMLWordPrintable

    Details

      Description

      ADDITIONAL SYSTEM INFORMATION :
      uname -a
      Linux HOSTNAME 3.10.0-693.17.1.el7.x86_64 #1 SMP Thu Jan 25 20:13:58 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

      A DESCRIPTION OF THE PROBLEM :
      When I running application with JMX enabled with following options.

      java -Dcom.sun.management.jmxremote.port=21100 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.local.ly=true -cp test.jar Test

      I can remote JMX from remote.

      But according to property document
      http://hg.openjdk.java.net/jdk/jdk11/file/1ddf9a99e4ad/src/jdk.management.agent/share/conf/management.properties#l70


      com.sun.management.jmxremote.local.only controls connect-ability from remote.
      And default value is true.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. Compile attached source code into jar.
      2. Run jar file with jmx options like

      java -Dcom.sun.management.jmxremote.port=21100 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.local.ly=true -cp test.jar Test

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Cannot connect JMX from remote.
      ACTUAL -
      Can connect JMX from remote. (by JDK Mission Control)

      ---------- BEGIN SOURCE ----------
      public class Test {
          public static void main(String[] args) throws InterruptedException {
              while (true) {
                  Thread.sleep(1_000);
              }
          }
      }

      ---------- END SOURCE ----------

        Attachments

          Activity

            People

            Assignee:
            kevinw Kevin Walls
            Reporter:
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: