[prev in list] [next in list] [prev in thread] [next in thread]
List: openjdk-serviceability-dev
Subject: Re: RFR: 8316649: JMX connection timeout cannot be changed and uses the default of 0 (infinite)
From: Daniel Fuchs <dfuchs () openjdk ! org>
Date: 2023-11-28 17:59:08
Message-ID: dfcJHaysetsmvtgi9ZLzBwR4nhJxNs8s5AExGrDt1HI=.68b81cfc-4fc1-4dde-a971-4267bd890b6f () github ! com
[Download RAW message or body]
On Tue, 28 Nov 2023 16:21:29 GMT, Kevin Walls <kevinw@openjdk.org> wrote:
> JMX RMI Connections should use a timeout on the Socket connect call by default.
>
> JMX Connections use RMI and some connection failures never terminate. The hang \
> described in 8316649 is hard to reproduce manually: the description says it can be \
> caused by a firewall that never returns a response.
> Changing the base RMI implementation may not be desirable at this time.
>
> JMX can use a new ClientSocketFactory for RMI which implements the connect timeout, \
> which can recognise a new JMX-specific property \
> `com.sun.management.jmxremote.rmi.tcpConnectTimeout` (named like the existing \
> com.sun.management.jmxremote... properties)
> Defaulting to a 1 minute timeout on connect has no effect on existing tests, and \
> should go unnoticed unless there really is a significant connection delay. \
> Specifying zero for the new System Property will use the old technique of a connect \
> with no timeout.
> This can be tested, but it is not realistically usable: although specifying a 1 \
> millisecond timeout will often fail (as expected/desired for the test), it will \
> very often pass as the connection happens immediately.
I don't think that's a good idea. AFAIK the RMIClientSocketFactory is serialized and \
sent by the server to the client. This means, unless I'm mistaken, that you will not \
be able to use JDK 21 JConsole to connect to a JDK 22 VM. Try it :-) If you chose to \
go this route then use of the factory should be an opt-in.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/16856#issuecomment-1830389934
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic