From 4d5320bd33d4392a48dda37c4602dbe1b6a5b6cb Mon Sep 17 00:00:00 2001 From: Armin Braun Date: Tue, 30 Oct 2018 11:00:33 +0100 Subject: [PATCH] DISCOVERY: Exclude Port 30210 in 5.6 Branch (#34955) * Exlude port 30210 from tests because it collides for unknown reasons * Relates #33675 --- .../test/discovery/ClusterDiscoveryConfiguration.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/framework/src/main/java/org/elasticsearch/test/discovery/ClusterDiscoveryConfiguration.java b/test/framework/src/main/java/org/elasticsearch/test/discovery/ClusterDiscoveryConfiguration.java index a1c154f80d4b0..00b9072b8ee4e 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/discovery/ClusterDiscoveryConfiguration.java +++ b/test/framework/src/main/java/org/elasticsearch/test/discovery/ClusterDiscoveryConfiguration.java @@ -149,6 +149,11 @@ protected static synchronized int[] unicastHostPorts(int numHosts) { for (int i = 0; i < unicastHostPorts.length; i++) { boolean foundPortInRange = false; while (tries < PORTS_PER_JVM && !foundPortInRange) { + // Port 30210 collides in tests for unknown reasons so we manually exclude it. + // See https://github.com/elastic/elasticsearch/issues/33675 for more. + if (nextPort == 30210) { + nextPort++; + } try (ServerSocket serverSocket = new ServerSocket()) { // Set SO_REUSEADDR as we may bind here and not be able to reuse the address immediately without it. serverSocket.setReuseAddress(NetworkUtils.defaultReuseAddress());