**Build scan:**
https://gradle-enterprise.elastic.co/s/4jzcubi7fi7fk/tests/:server:test/org.elasticsearch.transport.ProxyConnectionStrategyTests/testProxyStrategyWillResolveAddressesEachConnect

**Reproduction line:**
```
./gradlew ':server:test' --tests "org.elasticsearch.transport.ProxyConnectionStrategyTests.testProxyStrategyWillResolveAddressesEachConnect" -Dtests.seed=EA553A058C9E39DA -Dtests.locale=de-AT -Dtests.timezone=America/Maceio -Druntime.java=20
```

**Applicable branches:**
main

**Reproduces locally?:**
No

**Failure history:**
https://gradle-enterprise.elastic.co/scans/tests?tests.container=org.elasticsearch.transport.ProxyConnectionStrategyTests&tests.test=testProxyStrategyWillResolveAddressesEachConnect

**Failure excerpt:**
```
com.carrotsearch.randomizedtesting.UncaughtExceptionError: Captured an uncaught exception in thread: Thread[id=2052, name=elasticsearch[org.elasticsearch.transport.ProxyConnectionStrategyTests][management][T#1], state=RUNNABLE, group=TGRP-ProxyConnectionStrategyTests]

  at __randomizedtesting.SeedInfo.seed([EA553A058C9E39DA:2A656647652A147E]:0)

  Caused by: java.lang.AssertionError: should not happen since onFailure should catch it and report with underlying cause

    at __randomizedtesting.SeedInfo.seed([EA553A058C9E39DA]:0)
    at org.elasticsearch.transport.ProxyConnectionStrategy.openConnections(ProxyConnectionStrategy.java:320)
    at org.elasticsearch.transport.ProxyConnectionStrategy$1.onFailure(ProxyConnectionStrategy.java:282)
    at org.elasticsearch.transport.ProxyConnectionStrategy.lambda$openConnections$10(ProxyConnectionStrategy.java:314)
    at org.elasticsearch.action.ActionListenerImplementations$DelegatingResponseActionListener.acceptException(ActionListenerImplementations.java:186)
    at org.elasticsearch.action.ActionListenerImplementations.safeAcceptException(ActionListenerImplementations.java:62)
    at org.elasticsearch.action.ActionListenerImplementations$DelegatingResponseActionListener.onFailure(ActionListenerImplementations.java:191)
    at org.elasticsearch.action.ActionListenerImplementations.safeAcceptException(ActionListenerImplementations.java:62)
    at org.elasticsearch.action.ActionListenerImplementations.safeOnFailure(ActionListenerImplementations.java:73)
    at org.elasticsearch.action.DelegatingActionListener.onFailure(DelegatingActionListener.java:27)
    at org.elasticsearch.action.ActionListenerImplementations.safeAcceptException(ActionListenerImplementations.java:62)
    at org.elasticsearch.action.ActionListenerImplementations.safeOnFailure(ActionListenerImplementations.java:73)
    at org.elasticsearch.action.DelegatingActionListener.onFailure(DelegatingActionListener.java:27)
    at org.elasticsearch.action.support.ContextPreservingActionListener.onFailure(ContextPreservingActionListener.java:39)
    at org.elasticsearch.transport.ClusterConnectionManager.connectToNodeOrRetry(ClusterConnectionManager.java:140)
    at org.elasticsearch.transport.ClusterConnectionManager.connectToNode(ClusterConnectionManager.java:111)
    at org.elasticsearch.transport.RemoteConnectionManager.connectToRemoteClusterNode(RemoteConnectionManager.java:73)
    at org.elasticsearch.transport.ProxyConnectionStrategy.openConnections(ProxyConnectionStrategy.java:309)
    at org.elasticsearch.transport.ProxyConnectionStrategy$1.onFailure(ProxyConnectionStrategy.java:282)
    at org.elasticsearch.transport.ProxyConnectionStrategy.lambda$openConnections$10(ProxyConnectionStrategy.java:314)
    at org.elasticsearch.action.ActionListenerImplementations$DelegatingResponseActionListener.acceptException(ActionListenerImplementations.java:186)
    at org.elasticsearch.action.ActionListenerImplementations.safeAcceptException(ActionListenerImplementations.java:62)
    at org.elasticsearch.action.ActionListenerImplementations$DelegatingResponseActionListener.onFailure(ActionListenerImplementations.java:191)
    at org.elasticsearch.action.ActionListenerImplementations.safeAcceptException(ActionListenerImplementations.java:62)
    at org.elasticsearch.action.ActionListenerImplementations.safeOnFailure(ActionListenerImplementations.java:73)
    at org.elasticsearch.action.DelegatingActionListener.onFailure(DelegatingActionListener.java:27)
    at org.elasticsearch.action.ActionListenerImplementations.safeAcceptException(ActionListenerImplementations.java:62)
    at org.elasticsearch.action.ActionListenerImplementations.safeOnFailure(ActionListenerImplementations.java:73)
    at org.elasticsearch.action.DelegatingActionListener.onFailure(DelegatingActionListener.java:27)
    at org.elasticsearch.action.support.ContextPreservingActionListener.onFailure(ContextPreservingActionListener.java:39)
    at org.elasticsearch.transport.ClusterConnectionManager.connectToNodeOrRetry(ClusterConnectionManager.java:140)
    at org.elasticsearch.transport.ClusterConnectionManager.connectToNode(ClusterConnectionManager.java:111)
    at org.elasticsearch.transport.RemoteConnectionManager.connectToRemoteClusterNode(RemoteConnectionManager.java:73)
    at org.elasticsearch.transport.ProxyConnectionStrategy.openConnections(ProxyConnectionStrategy.java:309)
    at org.elasticsearch.transport.ProxyConnectionStrategy$1.onFailure(ProxyConnectionStrategy.java:282)
    at org.elasticsearch.transport.ProxyConnectionStrategy.lambda$openConnections$10(ProxyConnectionStrategy.java:314)
    at org.elasticsearch.action.ActionListenerImplementations$DelegatingResponseActionListener.acceptException(ActionListenerImplementations.java:186)
    at org.elasticsearch.action.ActionListenerImplementations.safeAcceptException(ActionListenerImplementations.java:62)
    at org.elasticsearch.action.ActionListenerImplementations$DelegatingResponseActionListener.onFailure(ActionListenerImplementations.java:191)
    at org.elasticsearch.action.ActionListenerImplementations.safeAcceptException(ActionListenerImplementations.java:62)
    at org.elasticsearch.action.ActionListenerImplementations.safeOnFailure(ActionListenerImplementations.java:73)
    at org.elasticsearch.action.DelegatingActionListener.onFailure(DelegatingActionListener.java:27)
    at org.elasticsearch.action.ActionListenerImplementations.safeAcceptException(ActionListenerImplementations.java:62)
    at org.elasticsearch.action.ActionListenerImplementations.safeOnFailure(ActionListenerImplementations.java:73)
    at org.elasticsearch.action.DelegatingActionListener.onFailure(DelegatingActionListener.java:27)
    at org.elasticsearch.action.support.ContextPreservingActionListener.onFailure(ContextPreservingActionListener.java:39)
    at org.elasticsearch.transport.ClusterConnectionManager.connectToNodeOrRetry(ClusterConnectionManager.java:140)
    at org.elasticsearch.transport.ClusterConnectionManager.connectToNode(ClusterConnectionManager.java:111)
    at org.elasticsearch.transport.RemoteConnectionManager.connectToRemoteClusterNode(RemoteConnectionManager.java:73)
    at org.elasticsearch.transport.ProxyConnectionStrategy.openConnections(ProxyConnectionStrategy.java:309)
    at org.elasticsearch.transport.ProxyConnectionStrategy.performProxyConnectionProcess(ProxyConnectionStrategy.java:241)
    at org.elasticsearch.transport.ProxyConnectionStrategy.connectImpl(ProxyConnectionStrategy.java:232)
    at org.elasticsearch.transport.RemoteConnectionStrategy$1.doRun(RemoteConnectionStrategy.java:296)
    at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:577)
    at java.util.concurrent.FutureTask.run(FutureTask.java:317)
    at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:916)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
    at java.lang.Thread.run(Thread.java:1623)

```
server/src/main/java/org/elasticsearch/transport/ProxyConnectionStrategy.java
assert false : "should not happen since onFailure should catch it and report with underlying cause";
                finished.onFailure(getNoSeedNodeLeftException(Set.of()));
            } else {
                logger.debug(
                    "unable to open maximum number of connections [remote cluster: {}, opened: {}, maximum: {}]",
                    clusterAlias,
                    openConnections,
                    maxNumConnections
                );
                finished.onResponse(null);
            }
        }
    }
    private NoSeedNodeLeftException getNoSeedNodeLeftException(Collection<Exception> suppressedExceptions) {
        final var e = new NoSeedNodeLeftException(
            "Unable to open any proxy connections to cluster [" + clusterAlias + "] at address [" + address.get() + "]"
        );
        suppressedExceptions.forEach(e::addSuppressed);
        return e;
    }
    private static TransportAddress resolveAddress(String address) {
        return new TransportAddress(parseConfiguredAddress(address));
    }
    public static class ProxyModeInfo implements RemoteConnectionInfo.ModeInfo {
        private final String address;
        private final String serverName;
        private final int maxSocketConnections;
        private final int numSocketsConnected;
        public ProxyModeInfo(String address, String serverName, int maxSocketConnections, int numSocketsConnected) {
            this.address = address;