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

Java opens random 3-d port when JMX is configured

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Not an Issue
    • Affects Version/s: 7u51
    • Fix Version/s: tbd_minor
    • Component/s: core-svc
    • Labels:

      Description

      FULL PRODUCT VERSION :
      java version "1.7.0_51"
      Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
      Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)


      ADDITIONAL OS VERSION INFORMATION :
      Linux CentOS-5-64-0 2.6.18-348.el5 #1 SMP Tue Jan 8 17:53:53 EST 2013 x86_64 x86_64 x86_64 GNU/Linux

      A DESCRIPTION OF THE PROBLEM :
      I run my program with JDK7 on Centos6. I enable JMX using the following options:

      /usr/bin/java -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.local.only=true -Djava.rmi.server.useLocalHostname=true -Djava.rmi.server.useCodebaseOnly=true -Dcom.sun.management.jmxremote.port=9123 -Dcom.sun.management.jmxremote.rmi.port=9123

      When I check what ports are opened I discover additional random port that not possible to configure:

      netstat -plunt | grep java

      tcp 0 0 :::41200 :::* LISTEN 13597/java
      tcp 0 0 :::9123 :::* LISTEN 13597/java

      Additional run:

      tcp 0 0 :::58356 :::* LISTEN 13629/java
      tcp 0 0 :::9123 :::* LISTEN 13629/java

      The port is not being used when connecting with JConsole.

      Also, adding of -XX:+DisableAttachMechanism does not close the port:

      /usr/bin/java -XX:+DisableAttachMechanism -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.local.only=true -Djava.rmi.server.useLocalHostname=true -Djava.rmi.server.useCodebaseOnly=true -Dcom.sun.management.jmxremote.port=9123 -Dcom.sun.management.jmxremote.rmi.port=9123



      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Configure JMX using these options:

      /usr/bin/java -XX:+DisableAttachMechanism -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.local.only=true -Djava.rmi.server.useLocalHostname=true -Djava.rmi.server.useCodebaseOnly=true -Dcom.sun.management.jmxremote.port=9123 -Dcom.sun.management.jmxremote.rmi.port=9123

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Only one port 9123 is opened
      ACTUAL -
      Additional random port is opened

      REPRODUCIBILITY :
      This bug can be reproduced always.

        Attachments

          Activity

            People

            Assignee:
            jbachorik Jaroslav BachorĂ­k
            Reporter:
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: