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

Cannot use -Dcom.sun.management.jmxremote if local machine name not legal DNS

XMLWordPrintable

        Name: em98259 Date: 06/04/2004


        A DESCRIPTION OF THE REQUEST :
        Please include a -Dcom.management.jmxremote.interface= parameter to override getting the hostname from the computer's system environment and use an IP, localhost, or an alternate valid DNS name (specified in the commandline) instead and thus be able to avoid the MalformedURLException errors you get if your windows computer name (valid to windows) starts with a digit or contains an underscore.


        JUSTIFICATION :
        I tried to file a bug (#275658) because my domain attached windows computer named "9CNF843Y " gives the following:
        D:\data\840295356>java -Dcom.sun.management.jmxremote
        Error: Exception thrown by the agent : java.net.MalformedURLException: Bad host: "9CNF843Y"

        The bug was reviewed and I was told my hostname does not comply with RFCs 952 and 1123 for DNS.

        I was advised to work around the problem by specifiying an alternative hostname, but I have no ability to do so without a commandline parameter or a .properties setting I can specifiy somewhere -- there is currently no documented way to specify an alternate IP, Interface or Hostname.

        I can not change my hostname (I'm bound to a windows domain controller) and so I can not use this functionality on my primary workstation.


        EXPECTED VERSUS ACTUAL BEHAVIOR :
        EXPECTED -
        my app would run binding to a Hostname or IP I can specify somewhere
        ACTUAL -
        D:\data\840295356>java -Dcom.sun.management.jmxremote
        Error: Exception thrown by the agent : java.net.MalformedURLException: Bad host: "9CNF843Y"

        ---------- BEGIN SOURCE ----------
        execute
          java -Dcom.sun.management.jmxremote
        on any windows machine that's computername starts with a digit or contains an _ character.
        ---------- END SOURCE ----------

        CUSTOMER SUBMITTED WORKAROUND :
        Change your computer name if you can, if you cannot because of company policy you are currently SOL.
        (Incident Review ID: 276244)
        ======================================================================

              emcmanus Eamonn McManus
              emcmanus Eamonn McManus
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: