Return-Path: X-Original-To: apmail-zookeeper-user-archive@www.apache.org Delivered-To: apmail-zookeeper-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5877E104D8 for ; Tue, 18 Feb 2014 15:05:01 +0000 (UTC) Received: (qmail 24602 invoked by uid 500); 18 Feb 2014 15:05:00 -0000 Delivered-To: apmail-zookeeper-user-archive@zookeeper.apache.org Received: (qmail 24033 invoked by uid 500); 18 Feb 2014 15:04:58 -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 23981 invoked by uid 99); 18 Feb 2014 15:04:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Feb 2014 15:04:54 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of marcin.cabaj@datasift.com designates 209.85.192.46 as permitted sender) Received: from [209.85.192.46] (HELO mail-qg0-f46.google.com) (209.85.192.46) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Feb 2014 15:04:48 +0000 Received: by mail-qg0-f46.google.com with SMTP id e89so7094528qgf.5 for ; Tue, 18 Feb 2014 07:04:28 -0800 (PST) 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:date :message-id:subject:from:to:content-type; bh=ycu3V5MLwjUafG+Fo/nBK74pc1Mx1eyw5icYNTK7TwY=; b=kcYlK/9hKfb0TFcOPKdoz11guOyshsEE/TThGZ+QyTkIOBdCUe5Kzjkm+m98RKO5h+ yw0+gnUPBc+4VPCAwa9yrMgOlpqbOIwEUqL3cWZjiYiKHJ7rKmXKpdChe2GGMnEspiDH I82WyO0T8Nr6n2QrXPkHJ6IPHUVV+NDMMvGynv7e+4ItgV7JHfGKOb3ijgER8paLzmKH uqWmBbHtHDpJX3IGPZ6+hyhqCzzQbtc1kdMlfBUnXaMR1n2Br7wdbBjHjhq5H3LcWPwC 3gaMuxN0iHdzev9ptwV05a4fTCHMXej8YWj24Uu5+g/7JmQPyNr45757qONH3aaNIWRx +6pg== X-Gm-Message-State: ALoCoQl4tjcv1xjmz0EZkqHydPxkm4E17YjALVqHF5VsrMTWdupeCwqt6ONR85Eae7xNUYLazjFR MIME-Version: 1.0 X-Received: by 10.140.36.200 with SMTP id p66mr40589718qgp.54.1392735868081; Tue, 18 Feb 2014 07:04:28 -0800 (PST) Received: by 10.140.44.55 with HTTP; Tue, 18 Feb 2014 07:04:27 -0800 (PST) In-Reply-To: References: Date: Tue, 18 Feb 2014 15:04:27 +0000 Message-ID: Subject: Re: how to fix messed up servers id From: Marcin Cabaj To: user@zookeeper.apache.org Content-Type: multipart/alternative; boundary=001a11c13c80af031404f2af9618 X-Virus-Checked: Checked by ClamAV on apache.org --001a11c13c80af031404f2af9618 Content-Type: text/plain; charset=ISO-8859-1 Thanks, will try it tomorrow. One thing I'm wondering, if I set zoo0 id to eg 5, should I update zoo.cfg on other servers? If so restart is needed as well right? It will crash my cluster. Or just leave zoo.cfg as is? -- cheers mc On Tue, Feb 18, 2014 at 1:41 PM, German Blanco < german.blanco.blanco@gmail.com> wrote: > For this step: > "Set a different id in the myid file of server 0 (the one that is down), > restart it, verify that it joins the quorum." any value that is not used > should do, e.g. 3, 4, 5, 1231 ... > > > On Tue, Feb 18, 2014 at 12:04 PM, German Blanco < > german.blanco.blanco@gmail.com> wrote: > > > Hello! > > Set a different id in the myid file of server 0 (the one that is down), > > restart it, verify that it joins the quorum. > > If it joins the quorum, set the myid value in server 1 to one, restart > it, > > verify that it joins the quorum. > > If it joins the quorum, update again the myid file of server 0, this time > > to the correct 0 value. Restart, verify that it all works. > > > > If any of the steps fails, stop and think it all over again. > > > > Good luck. > > > > > > On Tuesday, February 18, 2014, Marcin Cabaj > > wrote: > > > >> Hi all, > >> > >> My ZooKeeper ensemble contains 3 servers, unfortunately somehow servers > >> ids > >> have been messed up. > >> > >> zoo.cfg on all servers: > >> server.0=zoo0:2888:3888 > >> server.1=zoo1:2888:3888 > >> server.2=zoo2:2888:3888 > >> > >> but: > >> on ZOO0: > >> [xxx@zoo0]$ cat /var/zookeeper/myid > >> 1 > >> [xxx@zoo0]$ echo conf | nc localhost 2181 > >> This ZooKeeper instance is not currently serving requests > >> > >> on ZOO1: > >> [xxx@zoo1] $ cat /var/zookeeper/myid > >> 0 > >> [xxx@zoo1:~]$ echo conf | nc localhost 2181 | grep serverId > >> > >> serverId=0 > >> > >> on ZOO2: > >> [xxx@zoo2:~]$ cat /var/zookeeper/myid > >> 2 > >> [xxx@zoo2:~]$ echo conf | nc localhost 2181 | grep serverId > >> serverId=2 > >> > >> How to fix this without shutting down whole ensemble? > >> Currently I have connections established to ZOO1 and ZOO2. > >> ZOO0 is listening on 2181 but doesn't accept connections. > >> ZOO2 is the leader. > >> > >> Zookeeper version: 3.3.5-cdh3u5--1, built on 10/06/2012 01:58 GMT > >> > >> Cheers > >> > > > --001a11c13c80af031404f2af9618--