Skip to content

Commit

Permalink
DISCOVERY: Exclude Port 30210 in 5.6 Branch (#34955)
Browse files Browse the repository at this point in the history
* Exlude port 30210 from tests because it collides for unknown reasons
* Relates #33675
  • Loading branch information
original-brownbear committed Oct 30, 2018
1 parent a60ac01 commit 4d5320b
Showing 1 changed file with 5 additions and 0 deletions.
Expand Up @@ -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());
Expand Down

0 comments on commit 4d5320b

Please sign in to comment.