Return-Path: Delivered-To: apmail-hadoop-zookeeper-user-archive@minotaur.apache.org Received: (qmail 5140 invoked from network); 23 Oct 2009 03:47:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 23 Oct 2009 03:47:15 -0000 Received: (qmail 52131 invoked by uid 500); 23 Oct 2009 03:47:15 -0000 Delivered-To: apmail-hadoop-zookeeper-user-archive@hadoop.apache.org Received: (qmail 52068 invoked by uid 500); 23 Oct 2009 03:47:15 -0000 Mailing-List: contact zookeeper-user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: zookeeper-user@hadoop.apache.org Delivered-To: mailing list zookeeper-user@hadoop.apache.org Received: (qmail 52058 invoked by uid 99); 23 Oct 2009 03:47:15 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Oct 2009 03:47:15 +0000 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: 216.145.54.171 is neither permitted nor denied by domain of phunt@apache.org) Received: from [216.145.54.171] (HELO mrout1.yahoo.com) (216.145.54.171) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Oct 2009 03:47:05 +0000 Received: from [10.73.152.255] (snvvpn2-10-73-152-c255.hq.corp.yahoo.com [10.73.152.255]) by mrout1.yahoo.com (8.13.6/8.13.6/y.out) with ESMTP id n9N3kCtk066186; Thu, 22 Oct 2009 20:46:12 -0700 (PDT) Message-ID: <4AE12704.5080603@apache.org> Date: Thu, 22 Oct 2009 20:46:12 -0700 From: Patrick Hunt User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: zookeeper-user@hadoop.apache.org, SIDDHARTHR@audiencescience.com CC: Todd Greenwood Subject: Re: Restarting a single zookeeper Server on the same port within the process References: <4B94F7D3090A974E94A9BD23E57BB14303303E0B@corpdc-exch01.corp.digimine.com> In-Reply-To: <4B94F7D3090A974E94A9BD23E57BB14303303E0B@corpdc-exch01.corp.digimine.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Siddharth Raghavan wrote: > I need to restart a single zookeeper server node on the same port within > my unit tests. Are you testing c or java client? > > I tried stopping the server, having a delay and restarting it on the > same port. But the server doesn't startup. When I re-start on a > different port, it starts up correctly. You may be running into this: http://hea-www.harvard.edu/~fine/Tech/addrinuse.html Take a look at the zk tests, we do this in some cases and it works for us so you should be able to do similar. See RecoveryTest.java or TestClient.cc for java and c respectively. Ring us back if you still have questions. Patrick