United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 6425769 jmx remote bind address
6425769 : jmx remote bind address

Details
Type:
Enhancement
Submit Date:
2006-05-15
Status:
Open
Updated Date:
2012-01-24
Project Name:
JDK
Resolved Date:
Component:
core-svc
OS:
solaris_9,windows_xp
Sub-Component:
java.lang.management
CPU:
x86
Priority:
P4
Resolution:
Unresolved
Affected Versions:
7
Targeted Versions:

Related Reports
Relates:
Relates:

Sub Tasks

Description
A DESCRIPTION OF THE REQUEST :
Add the ability to specify a bind address for jmx remote.

JUSTIFICATION :
This is necessary to bind to a specifial address.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
java -Dcom.sun.management.jmxremote.host=myhost
ACTUAL -
jmxremote will be bound to the specified ip address or hostname

                                    

Comments
WORK AROUND

Today, the RMI registry will not let you specify an interface to which
to bind to. By default it will bind to 0.0.0.0 and listen to all interfaces.
Furthermore, the host value placed in the remote stub for an exported remote object is the IP address of the InetAddress returned from an invocation of the InetAddress.getLocalHost method.

There's an RFE logged against RMI for this: 4880793.

The desired behaviour can be achieved by starting the RMI Connector Server
programmatically - instead of using the out-of-the-box System properties.
To achieve the desired effect, you would have to supply customs RMI 
Socket Factories to the created Connector Server. 

More detailed informations is available in the evaluation of 4880793.
                                     
2006-05-15
EVALUATION

* we could wait for 4880793 to be fixed before implementing this RFE. In that case
  we could possibly use the 'host' information from the JMXServiceURL as the host
  IP to bind to and pass in client stubs (do we need to differenciate?).
* In the shorter term we could also provide an example that would implement 
  the workaround (see Work Around).
                                     
2006-05-15



Hardware and Software, Engineered to Work Together