From dev-return-73549-archive-asf-public=cust-asf.ponee.io@zookeeper.apache.org Sat Sep 22 06:44:06 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 3D38118065B for ; Sat, 22 Sep 2018 06:44:06 +0200 (CEST) Received: (qmail 81081 invoked by uid 500); 22 Sep 2018 04:44:04 -0000 Mailing-List: contact dev-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@zookeeper.apache.org Delivered-To: mailing list dev@zookeeper.apache.org Received: (qmail 81069 invoked by uid 99); 22 Sep 2018 04:44:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 22 Sep 2018 04:44:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id D3855C2CB9 for ; Sat, 22 Sep 2018 04:44:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.501 X-Spam-Level: X-Spam-Status: No, score=-109.501 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id F9TE0iVZSlZC for ; Sat, 22 Sep 2018 04:44:03 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 5CFF15F542 for ; Sat, 22 Sep 2018 04:44:02 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 2DE0DE2636 for ; Sat, 22 Sep 2018 04:44:01 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 6CB0A23FAF for ; Sat, 22 Sep 2018 04:44:00 +0000 (UTC) Date: Sat, 22 Sep 2018 04:44:00 +0000 (UTC) From: "Michael Han (JIRA)" To: dev@zookeeper.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (ZOOKEEPER-2847) Cannot bind to client port when reconfig based on old static config MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/ZOOKEEPER-2847?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Michael Han resolved ZOOKEEPER-2847. ------------------------------------ Resolution: Fixed Fix Version/s: 3.6.0 Issue resolved by pull request 620 [https://github.com/apache/zookeeper/pull/620] > Cannot bind to client port when reconfig based on old static config > ------------------------------------------------------------------- > > Key: ZOOKEEPER-2847 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2847 > Project: ZooKeeper > Issue Type: Bug > Components: server > Affects Versions: 3.5.3, 3.6.0 > Reporter: Fangmin Lv > Assignee: Yisong Yue > Priority: Major > Labels: pull-request-available > Fix For: 3.6.0 > > Time Spent: 1h > Remaining Estimate: 0h > > When started the ensemble with old static config that the server string doesn't have client port, dynamically remove and add the same server from the ensemble will cause that server cannot bind to client port, and the ZooKeeper server cannot serve client requests anymore. > From the code, we'll set the clientAddr to null when start up with old static config, and dynamic config forces to have part, which will trigger the following rebind code in QuorumPeer#processReconfig, and cause the address already in used issue. > public boolean processReconfig(QuorumVerifier qv, Long suggestedLeaderId, Long zxid, boolean restartLE) { > ... > if (myNewQS != null && myNewQS.clientAddr != null > && !myNewQS.clientAddr.equals(oldClientAddr)) { > cnxnFactory.reconfigure(myNewQS.clientAddr); > updateThreadName(); > } > ... > } -- This message was sent by Atlassian JIRA (v7.6.3#76005)