United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 6440708 JMX remote for monitoring the JVM doesn't support binding to an interface
6440708 : JMX remote for monitoring the JVM doesn't support binding to an interface

Details
Type:
Enhancement
Submit Date:
2006-06-20
Status:
Open
Updated Date:
2012-01-24
Project Name:
JDK
Resolved Date:
Component:
core-svc
OS:
solaris_10,windows_2000
Sub-Component:
java.lang.management
CPU:
x86,sparc
Priority:
P4
Resolution:
Unresolved
Affected Versions:
5.0,6
Targeted Versions:

Related Reports
Relates:

Sub Tasks

Description
A DESCRIPTION OF THE REQUEST :
The jmx remote connection to the monitoring system of the JVM only allows to specify the port and not the interface on which it's listening.

JUSTIFICATION :
When running cluster software binding instances to a specific (virtual) interface is necessary.

If the ports cannot be bound to a specific interface this will prevent smooth failover in the cluster.

Also the SNMP-functionality of monitoring supports bidning to an interface.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Setting a property, for example called "com.sun.management.jmxremote. interface=localhost"  would bind the JMX remote to only bind to the loopback interface.

CUSTOMER SUBMITTED WORKAROUND :
Twiddling around with the DNS so that the default algorithm selects the desired interface, this is however very cumbersome and quite often not practially possible.

                                    

Comments
WORK AROUND

Two possible workarounds here:

1/ Bind the remote object to all the network interfaces and use
   the "java.rmi.server.hostname" system property when running
   your application to specify the interface in the stub.

2/ This is not configurable through the out-of-the-box management
   agent properties file but you can mimick the out-of-the-box
   management agent as explained in

   http://blogs.sun.com/roller/page/lmalventosa?entry=mimicking_the_out_of_the

   and supply your own RMI [client|server] socket factories to bind to a given
   interface.

   You would still need to use the "java.rmi.server.hostname" system property
   to specify the interface in the stub or you could discard the stub's interface
   and provide a way for the RMI client socket factory to find out the interface
   to use when creating the client sockets.
                                     
2006-06-20
EVALUATION

This would require defining new specific RMI [client|server] socket factories
where the binding interface could be specified and probably tell the user to
specify the "java.rmi.server.hostname" when running the application or define
a way for the RMI client socket factory to find out the interface to use when
creating the client sockets.
                                     
2006-06-20



Hardware and Software, Engineered to Work Together