RFR: 8316649: JMX connection timeout cannot be changed and uses the default of 0 (infinite)
Daniel Fuchs
dfuchs at openjdk.org
Fri Nov 24 13:05:05 UTC 2023
On Fri, 24 Nov 2023 12:13:56 GMT, Kevin Walls <kevinw at openjdk.org> wrote:
>> (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.
OK - sounds good. Meanwhile I had a look at the custom RMI Socket Factories used by the JMX Agent, and these are actually RMIServerSocketFactories, so having a timeout for connect there probably makes no sense.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16771#discussion_r1404331875
More information about the core-libs-dev
mailing list