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

Add jhsdb option to specify debug server RMI connector port

    XMLWordPrintable

    Details

    • Type: CSR
    • Status: Closed
    • Priority: P3
    • Resolution: Approved
    • Fix Version/s: 15
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Compatibility Kind:
      behavioral
    • Compatibility Risk:
      minimal
    • Compatibility Risk Description:
      3 new command line options to provide additional settings are added. The behavior of existing options is unchanged.
    • Interface Kind:
      add/remove/modify command line option
    • Scope:
      JDK

      Description

      Summary

      Add new jhsdb tool options for the debugd mode to specify a RMI connector port, RMI connector host name, and RMI registry port .

      Problem

      When running a debug server on a remote host behind a firewall or inside a container it should be possible to specify what exact ports need to be used and what host name is returned in the remote stub object. Currently system property "sun.jvm.hotspot.rmi.port" can be used to specify the RMI registry port and system property "java.rmi.server.hostname" could be be used to specify the host name, but remote objects still communicate over random ports. An option to specify RMI connector port needs to be added. Also 2 more options to specify the RMI registry port and the host name needs to be added to the tool to simplify the command line that needs to be used to launch the tool in these cases and list these additional settings in the tool's help.

      Solution

      Introduce 3 new options to jhsdb command for the debugd mode: --rmiport to specify RMI connector port number, --registryport to specify RMI registry port number, --hostname to specify RMI connector host name.

      Specification

      jhsdb tool in the debugd mode can accept --rmiport option to specify RMI connector port, --registryport option to specify RMI registry port number, and --hostname option to specify RMI connector host name. The value of --hostname option could be a hostname or an IPv4/IPv6 address.

      $ jhsdb debugd  --help
      
        --serverid <id>   A unique identifier for this debug server.
        --rmiport <port> Sets the port number to which the RMI connector is
                         bound. If not specified a random available port is used.
        --registryport <port> Sets the RMI registry port.
                              This option overrides the system property
                              'sun.jvm.hotspot.rmi.port'.
                              If not specified, the system property is used.
                              If the system property is not set, the default port 1099 is used.
        --hostname <hostname> Sets the host name the RMI connector
                              is bound. The value could be a hostname or an 
                              IPv4/IPv6 address. This option overrides the system
                              property 'java.rmi.server.hostname'.
                              If not specified, the system property is used.
                              If the system property is not set, a system host name is used. 
        --pid <pid>       To attach to and operate on the given live process.
        --core <corefile> To operate on the given core file.
        --exe <executable for corefile>
      
        The --core and --exe options must be set together to give the core
        file, and associated executable, to operate on. They can use
        absolute or relative paths.
        The --pid option can be set to operate on a live process.
        --core and --pid are mutually exclusive.
      
        Examples: jhsdb debugd --pid 1234
              or  jhsdb debugd --core ./core.1234 --exe ./myexe
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dtitov Daniil Titov (Inactive)
              Reporter:
              dtitov Daniil Titov (Inactive)
              Reviewed By:
              Serguei Spitsyn
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: