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 60A53200B9F for ; Tue, 11 Oct 2016 23:56:54 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 5F228160AE6; Tue, 11 Oct 2016 21:56:54 +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 7F9EB160AC3 for ; Tue, 11 Oct 2016 23:56:53 +0200 (CEST) Received: (qmail 61164 invoked by uid 500); 11 Oct 2016 21:56:52 -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 61145 invoked by uid 99); 11 Oct 2016 21:56:51 -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 21:56:51 +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 7CD9DC15F8 for ; Tue, 11 Oct 2016 21:56:51 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.479 X-Spam-Level: ** X-Spam-Status: No, score=2.479 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, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=avinetworks-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 x14gnZu-EefD for ; Tue, 11 Oct 2016 21:56:48 +0000 (UTC) Received: from mail-oi0-f51.google.com (mail-oi0-f51.google.com [209.85.218.51]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 33FBA5F177 for ; Tue, 11 Oct 2016 21:56:48 +0000 (UTC) Received: by mail-oi0-f51.google.com with SMTP id m72so40422710oik.3 for ; Tue, 11 Oct 2016 14:56:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=avinetworks-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=AhwZ4YjmvuU/tqx1hBjAGxxlOw5YT3vanXyk7Q42ODI=; b=IC0eUCRoS6tslW96WDpjtx1ceSjjPfLFWN0sgcLfySwHYkJ4PFFEA9DF33mw0oeQcT sKHCvZ7vAyvWIZGntl8RegQPB5bu3bXBzYZCgnNLGYnyBtVcJw5ruRKqPV9Iu1yGHIYu 24/ICC/4+DwZNB2xDkLfTdJNOR57ZlHcg6iKDz8kfulV+/7+QuOLDaXB3cMORB4vMizE VHgPaHLaW9iSaXu6tuZBdsP7x4G0EICOIfVrwZl1EFdb7EzK5YrSeY+jg+II9IIhbBxH xFSHzKgoPmQ9EzH7DaOv9C5iIRT5sGgGvIl96WH1OCsrjZYLaD5D7X9oyYTn2p9vX26E Ez1w== 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=AhwZ4YjmvuU/tqx1hBjAGxxlOw5YT3vanXyk7Q42ODI=; b=G89lEmKuibM+lltFH3ANWfmwoIfG0f8iVZuZ59+z+GdJrH1YnOwM3H5jXplHUqHAtz CU3AOsEkU8FKX9J4laiQtk0pFVlCkgIYWZcVEbjraL4AEJhw/TWuleCqF+Ldd1UrG75i d76wVz5dl7IlKyVB1GpHWj1RW+P7aBDi5fB1yDVbVpQlSGkeL0iR2Nvr/Qo9I1PQWItj W3EXoi5IUAaG3Za00ocsWfhJ9gaxmBZIzVRV9tggvLAGzhtt7IJXCCYRzDluKMTyPydB hZTKM5yWV4LglPcd4UtI5Jg5wKipvVPxhE+9Wg5+Ox+vkOR8IAkbsgS2pfQ9DK3d4GZk 0g3g== X-Gm-Message-State: AA6/9Rn87wjyp/6RQnUkJB9/oY4HUgPIMP8gJhSFQt6KRaXewyIAJ/YLjvpbCsAMgiIcGStylVpqR0ZQbBS8wg== X-Received: by 10.157.8.101 with SMTP id 92mr2957611oty.39.1476223006823; Tue, 11 Oct 2016 14:56:46 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.52.194 with HTTP; Tue, 11 Oct 2016 14:56:46 -0700 (PDT) In-Reply-To: References: <1A9BB7DA-9D76-40CF-92C8-743A3B418743@apache.org> From: Anand Parthasarathy Date: Tue, 11 Oct 2016 14:56:46 -0700 Message-ID: Subject: Re: Zookeeper leader election takes a long time. To: user@zookeeper.apache.org Content-Type: multipart/alternative; boundary=94eb2c043e94ee732b053e9df323 archived-at: Tue, 11 Oct 2016 21:56:54 -0000 --94eb2c043e94ee732b053e9df323 Content-Type: text/plain; charset=UTF-8 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. >>> >>> >> > --94eb2c043e94ee732b053e9df323--