Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 339C6200BAC for ; Wed, 12 Oct 2016 00:47:06 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 308FC160AF3; Tue, 11 Oct 2016 22:47:06 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 53349160AE6 for ; Wed, 12 Oct 2016 00:47:05 +0200 (CEST) Received: (qmail 79717 invoked by uid 500); 11 Oct 2016 22:47:04 -0000 Mailing-List: contact user-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@zookeeper.apache.org Delivered-To: mailing list user@zookeeper.apache.org Received: (qmail 79701 invoked by uid 99); 11 Oct 2016 22:47: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; Tue, 11 Oct 2016 22:47:03 +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 8C299C160B for ; Tue, 11 Oct 2016 22:47:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.979 X-Spam-Level: * X-Spam-Status: No, score=1.979 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=cloudera-com.20150623.gappssmtp.com 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 PFI15kuv55hg for ; Tue, 11 Oct 2016 22:47:01 +0000 (UTC) Received: from mail-vk0-f41.google.com (mail-vk0-f41.google.com [209.85.213.41]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id A2B285F177 for ; Tue, 11 Oct 2016 22:47:00 +0000 (UTC) Received: by mail-vk0-f41.google.com with SMTP id 83so11762354vkd.0 for ; Tue, 11 Oct 2016 15:47:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloudera-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=U+aMJl2XM/cIYnUOjx6+ihj2s2kJJ0idBjfPLSVfUTo=; b=IZIkRBfE1bf7ZMUIVP5vYWcgkRcP1RUrllQDniG43y9kjJVYZPbeSMwx4jWQTX2hoQ 0C2mKiwJVce4aL6eVtHBaINIgKw85unEhYGSBEZEGUpnEz1t06zr0qdAC5cIJyeED5VS h4q6g+e6QcBR3aWKRjXDJYerjNkjVh5y/RYsb8L3l4HRJqMb/eSV3xh4FvwOE/VM5aKk MBfwHM0RpQoNtjLnWeQBiJSywNao5Q2u9h4WrG0b2yL8dGuBMsZ/SSO0bslUpfBa7N7W /U86VbkFETY9LuCEC6xu3R8eiFfDZ0gX4UT0p80/aHn/0yzV57yKaKMNJ6xhFRxb5Jjy ioAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=U+aMJl2XM/cIYnUOjx6+ihj2s2kJJ0idBjfPLSVfUTo=; b=h4qGQaUpY9xwbuXE/+w8bnTquYF+stEZrXJP/B1kPptJt8v9bkcu4VRaNpmqHV9BPu 01SZi6gcuKpEiBLtFwcDwpqxtxa+q1oJ53U9CwBZr+DxBTCOwsXRKIsOxXPXzKl5PRuR q8lXOeQat8NipU9qYHko3rP0dLKfrejUWJe7P0nri6Ts/bBe4X80K+vF1n11pxqZGf82 MPNsUIhlBe5quiJgGCz4/qBJ30WI7EH7yAyKvamCZoKpvjzlUl+DAjdKG8id9wYYJSA8 jPlK8NndXg3N+nE4yTS+nfhkJYuKeIzZWyfv5d4Wy7ldVC5hRK+xudX7oJG5v/375byL UdmA== X-Gm-Message-State: AA6/9RksHRlwVYYcVCBxewZS/Oi5J/Ahg6Xh/7Ow69MyaIo7Y5YFXSj2+R1fswRKyZXxj3A5zsFLFWSfpINaMvAw X-Received: by 10.31.140.147 with SMTP id o141mr4321364vkd.149.1476226014287; Tue, 11 Oct 2016 15:46:54 -0700 (PDT) MIME-Version: 1.0 Received: by 10.176.69.172 with HTTP; Tue, 11 Oct 2016 15:46:23 -0700 (PDT) In-Reply-To: References: <1A9BB7DA-9D76-40CF-92C8-743A3B418743@apache.org> From: Michael Han Date: Tue, 11 Oct 2016 15:46:23 -0700 Message-ID: Subject: Re: Zookeeper leader election takes a long time. To: UserZooKeeper Content-Type: multipart/alternative; boundary=001a11426a3c30bad6053e9ea74b archived-at: Tue, 11 Oct 2016 22:47:06 -0000 --001a11426a3c30bad6053e9ea74b Content-Type: text/plain; charset=UTF-8 Hi Anand, >> We have isolated it to a test setup, where we are able to reproduce this somewhat consistently if we keep a node powered off. Do you mind share your setup / steps to reproduce if the setup only involves ZooKeeper without other dependencies? On Tue, Oct 11, 2016 at 2:56 PM, Anand Parthasarathy < anpartha@avinetworks.com> wrote: > Folks, > > Sending a quick note again to find out if there is any insight the > community can offer in terms of a solution or workaround? We use zookeeper > for service discovery in our product and this issue has surfaced in a large > customer site a couple of times and we need to figure out a solution soon. > > Thanks, > Anand. > > On Mon, Oct 10, 2016 at 10:15 AM, Anand Parthasarathy < > anpartha@avinetworks.com> wrote: > > > Folks, > > > > Any insight into this or any workarounds that you can think of to > mitigate > > against this issue? We have isolated it to a test setup, where we are > able > > to reproduce this somewhat consistently if we keep a node powered off. > > > > Thanks, > > Anand. > > > > On Sat, Oct 8, 2016 at 10:05 AM, Anand Parthasarathy < > > anpartha@avinetworks.com> wrote: > > > >> Hi Flavio, > >> > >> I have attached the logs from node 1 and node 3. Node 2 was powered off > >> around 10-03 12:36. Leader election kept going until 10-03 15:57:16 > when it > >> finally converged. > >> > >> Thanks, > >> Anand. > >> > >> On Sat, Oct 8, 2016 at 7:55 AM, Flavio Junqueira > wrote: > >> > >>> Hi Anand, > >>> > >>> I don't understand whether 1 and 3 were able or even trying to connect > >>> to each other. They should be able to elect a leader between them and > make > >>> progress. You might want to upload logs and let us know. > >>> > >>> -Flavio > >>> > >>> > On 08 Oct 2016, at 02:11, Anand Parthasarathy < > >>> anpartha@avinetworks.com> wrote: > >>> > > >>> > Hi, > >>> > > >>> > We are currently using zookeeper 3.4.6 version and use a 3 node > >>> solution in > >>> > our system. We see that occasionally, when a node is powered off (in > >>> this > >>> > instance, it was actually a leader node), the remaining two nodes do > >>> not > >>> > form a quorum for a really long time. Looking at the logs, it appears > >>> the > >>> > sequence is as follows: > >>> > - Node 2 is the zookeeper leader > >>> > - Node 2 is powered off > >>> > - Node 1 and Node 3 recognize and start the election > >>> > - Node 3 times out after initLimit * tickTime with "Timeout while > >>> waiting > >>> > for quorum" for Round N > >>> > - Node 1 times out after initLimit * tickTime with "Exception while > >>> trying > >>> > to follow leader" for Round N+1 at the same time. > >>> > - And the process continues where N is sequentially incrementing. > >>> > - This happens for a long time. > >>> > - In one instance, we used tickTime=5000 and initLimit=20 and it took > >>> > around 3.5 hours to converge. > >>> > - In a given round, Node 1 will try connecting to Node 2, gets > >>> connection > >>> > refused waits for notification timeout which increases by 2 every > >>> iteration > >>> > until it hits the initLimit. Connection Refused is because the node 2 > >>> comes > >>> > up after reboot, but zookeeper process is not started (due to a > >>> different > >>> > failure). > >>> > > >>> > It looks similar to ZOOKEEPER-2164 but there it is a connection > timeout > >>> > where Node 2 is not reachable. > >>> > > >>> > Could you pls. share if you have seen this issue and if so, what is > the > >>> > workaround that can be employed in 3.4.6. > >>> > > >>> > Thanks, > >>> > Anand. > >>> > >>> > >> > > > -- Cheers Michael. --001a11426a3c30bad6053e9ea74b--