Return-Path: X-Original-To: apmail-flink-issues-archive@minotaur.apache.org Delivered-To: apmail-flink-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0A3B218E16 for ; Fri, 14 Aug 2015 10:04:47 +0000 (UTC) Received: (qmail 12550 invoked by uid 500); 14 Aug 2015 10:04:47 -0000 Delivered-To: apmail-flink-issues-archive@flink.apache.org Received: (qmail 12242 invoked by uid 500); 14 Aug 2015 10:04:46 -0000 Mailing-List: contact issues-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flink.apache.org Delivered-To: mailing list issues@flink.apache.org Received: (qmail 12128 invoked by uid 99); 14 Aug 2015 10:04:46 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Aug 2015 10:04:46 +0000 Date: Fri, 14 Aug 2015 10:04:46 +0000 (UTC) From: "Till Rohrmann (JIRA)" To: issues@flink.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (FLINK-2518) Avoid predetermination of ports for network services MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Till Rohrmann created FLINK-2518: ------------------------------------ Summary: Avoid predetermination of ports for network services Key: FLINK-2518 URL: https://issues.apache.org/jira/browse/FLINK-2518 Project: Flink Issue Type: Improvement Reporter: Till Rohrmann Fix For: 0.10 Some of Flink's network services use the {{NetUtils.getAvailablePort()}} to predetermine an available port for a service which is later started. This can lead to a race condition where two services have predetermined the same available port and later fail to instantiate because for one of them the port is already in use. This is, for example, the case for the {{NettyConnectionManager}} which is started after the {{TaskManager}} has registered at the {{JobManager}}. It would be better if we first start the network services with a random port, e.g. the {{NettyConnectionManager}}, and then send the bound port to the client. This will avoid problems like that. -- This message was sent by Atlassian JIRA (v6.3.4#6332)