Four tests failed together with the message `java.net.BindException: Address already in use`, and the tests have been failing a few times in the last couple of days on branch `8.5` and `8.6`. The failing tests:

* testFailOverOnFollower
* testReadRequestsReturnLatestMappingVersion
* testFollowIndexAndCloseNode
* testReadRequestsReturnLatestMappingVersion

Some test histories:

*. https://gradle-enterprise.elastic.co/scans/tests?search.timeZoneId=Europe/Stockholm&tests.container=org.elasticsearch.xpack.ccr.FollowerFailOverIT&tests.test=testAddNewReplicasOnFollower
* https://gradle-enterprise.elastic.co/scans/tests?search.timeZoneId=Europe/Stockholm&tests.container=org.elasticsearch.xpack.ccr.FollowerFailOverIT&tests.test=testReadRequestsReturnLatestMappingVersion

**Build scan:**
https://gradle-enterprise.elastic.co/s/es4ybjld57meo/tests/:x-pack:plugin:ccr:internalClusterTest/org.elasticsearch.xpack.ccr.FollowerFailOverIT/testFailOverOnFollower

**Reproduction line:**
```
./gradlew ':x-pack:plugin:ccr:internalClusterTest' --tests "org.elasticsearch.xpack.ccr.FollowerFailOverIT.testFailOverOnFollower" -Dtests.seed=AEF5EB246025C830 -Dtests.locale=es-SV -Dtests.timezone=Europe/Sofia -Druntime.java=17
```

**Applicable branches:**
8.5, 8.6

**Reproduces locally?:**
No

**Failure history:**
https://gradle-enterprise.elastic.co/scans/tests?tests.container=org.elasticsearch.xpack.ccr.FollowerFailOverIT&tests.test=testFailOverOnFollower

**Failure excerpt:**
```
org.elasticsearch.transport.BindTransportException: Failed to bind to [::1]:[32771-32800]

  at org.elasticsearch.transport.TcpTransport.bindToPort(TcpTransport.java:505)
  at org.elasticsearch.transport.TcpTransport.bindServer(TcpTransport.java:466)
  at org.elasticsearch.transport.netty4.Netty4Transport.doStart(Netty4Transport.java:142)
  at org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:43)
  at org.elasticsearch.test.transport.StubbableTransport.start(StubbableTransport.java:203)
  at org.elasticsearch.transport.TransportService.doStart(TransportService.java:311)
  at org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:43)
  at org.elasticsearch.node.Node.start(Node.java:1296)
  at org.elasticsearch.test.InternalTestCluster$NodeAndClient.startNode(InternalTestCluster.java:982)
  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
  at java.util.concurrent.FutureTask.run(FutureTask.java:264)
  at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:825)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
  at java.lang.Thread.run(Thread.java:833)

  Caused by: java.net.BindException: Address already in use

    at sun.nio.ch.Net.bind0(Net.java:-2)
    at sun.nio.ch.Net.bind(Net.java:555)
    at sun.nio.ch.ServerSocketChannelImpl.netBind(ServerSocketChannelImpl.java:337)
    at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:294)
    at io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:141)
    at io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:562)
    at io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1334)
    at io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:506)
    at io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:491)
    at io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:973)
    at io.netty.channel.AbstractChannel.bind(AbstractChannel.java:260)
    at io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:356)
    at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174)
    at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167)
    at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:503)
    at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:995)
    at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
    at java.lang.Thread.run(Thread.java:833)

```
test/framework/src/main/java/org/elasticsearch/test/ESTestCase.java
};
            leakAppender.start();
            Loggers.addAppender(leakLogger, leakAppender);
            
            Runtime.getRuntime().addShutdownHook(new Thread(() -> {
                leakAppender.stop();
                LoggerContext context = (LoggerContext) LogManager.getContext(false);
                Configurator.shutdown(context);
            }));
        }
        BootstrapForTesting.ensureInitialized();
        /*
         * We need to exclude time zones not supported by joda (like SystemV* timezones)
         * because they cannot be converted back to DateTimeZone which we currently
         * still need to do internally e.g. in bwc serialization and in the extract() method
         * //TODO remove once tests do not send time zone ids back to versions of ES using Joda
         */
        Set<String> unsupportedJodaTZIds = Set.of(
            "ACT",
            "AET",
            "AGT",
            "ART",
            "AST",
            "BET",
            "BST",
            "CAT",
            "CNT",
            "CST",
            "CTT",
            "EAT",