RFR: 8316649: JMX connection timeout cannot be changed and uses the default of 0 (infinite)

Kevin Walls kevinw at openjdk.org
Fri Nov 24 12:16:08 UTC 2023


On Thu, 23 Nov 2023 17:21:02 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:

>>> This is a stack from a test I was experimenting with, when it did see the timeout:
>> 
>> Ah - that's for testing with a particular test. So the question now is:
>> 
>> Should the RMISocketFactories provided / implemented in the JMX implementation - such as those used by the JMX default agent, also honour this system property?
>
> (Look for socket factories in the module `jdk.management.agent`)

OK yes, we also have: java.rmi/share/classes/javax/rmi/ssl/SslRMIClientSocketFactory.java
with its own createSocket(String host, int port) method.  This is used if we use JMX over SSL.

So SslRMIClientSocketFactory could specifically implement the connect timeout.

Next q, should it?  8-)

The reported hang and those I have seen in testing have only been in:
sun.rmi.transport.tcp.TCPDirectSocketFactory.createSocket calling Socket.init.

javax/rmi/ssl/SslRMIClientSocketFactory.java reads some properties named "javax.rmi.ssl.client...."
so it would be odd for it to read "sun.rmi.transport.tcp.initialConnectTimeout" I was proposing here.

It could implement "javax.rmi.ssl.client.initialConnectTimeout", or we could leave SSL alone for now, possibly handling it in a separate issue if it's wanted.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/16771#discussion_r1404290257


More information about the serviceability-dev mailing list