Return-Path: Delivered-To: apmail-hadoop-zookeeper-user-archive@minotaur.apache.org Received: (qmail 62576 invoked from network); 21 Apr 2010 09:53:08 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 21 Apr 2010 09:53:08 -0000 Received: (qmail 34875 invoked by uid 500); 21 Apr 2010 09:53:08 -0000 Delivered-To: apmail-hadoop-zookeeper-user-archive@hadoop.apache.org Received: (qmail 34649 invoked by uid 500); 21 Apr 2010 09:53:06 -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 34641 invoked by uid 99); 21 Apr 2010 09:53:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Apr 2010 09:53:05 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,NORMAL_HTTP_TO_IP,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of yeqian.zju@gmail.com designates 74.125.83.48 as permitted sender) Received: from [74.125.83.48] (HELO mail-gw0-f48.google.com) (74.125.83.48) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Apr 2010 09:52:59 +0000 Received: by gwb1 with SMTP id 1so602095gwb.35 for ; Wed, 21 Apr 2010 02:52:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:received:message-id:subject:from:to:content-type; bh=WJZ9k/7fDRUA5+9kwqJ+JJZtwIlPnq8osYiU3EmvR/8=; b=p+RXG7YYDsyDazXLFYGKvJjEsnvb2j3U/exgotvhHbDvZ9rFGW9J87KEX1BuFEcHjC YJoxyjERAhxa8H7QvX6dCeAk2ooQKZlJMjQaFTmu8tPtra3f/S0krbFT9ufMiDJXUpzw 36gwk743zBWqMtoK2JmdcZgUMvj3zKXPnbNr8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=xmCTS5kL/RRQgxmwOd9+6UwxiP5ULQOGlyube4X/jDeOElSNVlLumvGXoO3SgWrlb1 eVW5+5+b3aiqGZ1apRXTQD5dALXpirw8jLzD8G7NHN2qokF1/cQmlgiZGKX8NE9ZFLOI vC2PW2ApkxIRotZ3Qn+uo8ofrhSyyvkAW2VkY= MIME-Version: 1.0 Received: by 10.231.166.7 with HTTP; Wed, 21 Apr 2010 02:52:38 -0700 (PDT) In-Reply-To: <4BCEBAF9.9000409@bull.net> References: <4BCEBAF9.9000409@bull.net> Date: Wed, 21 Apr 2010 17:52:38 +0800 Received: by 10.151.3.30 with SMTP id f30mr8437753ybi.142.1271843558174; Wed, 21 Apr 2010 02:52:38 -0700 (PDT) Message-ID: Subject: Re: Client reconnection after a connection loss From: Qian Ye To: zookeeper-user@hadoop.apache.org Content-Type: multipart/alternative; boundary=000e0cd51c4c7eb1650484bc27cd X-Virus-Checked: Checked by ClamAV on apache.org --000e0cd51c4c7eb1650484bc27cd Content-Type: text/plain; charset=UTF-8 so far as I know, you should keep an eye on your client handler and reconnect to Zookeeper server when it is expired youself. It's the solution in my application for this kind of situation. On Wed, Apr 21, 2010 at 4:44 PM, Julien Vey wrote: > Hi all, > > I'm currently working with ZooKeeper in CXF D-OSGI and i'm facing a problem > that would require your help. > > When a client is connected to the ZooKeeper server, and the connection is > lost, it throws a ConnectionLossException. > The problem is when the connection is back, the client doesn't reconnect > itself. I can see the following trace on the server > > 2010-04-20 17:44:21,526 - INFO [NIOServerCxn.Factory:> > 0.0.0.0/0.0.0.0:2181:NIOServerCnxn$Factory@251] - Accepted socket > connection from /129.183.128.230:60471 > 2010-04-20 17:44:21,526 - INFO [NIOServerCxn.Factory: > 0.0.0.0/0.0.0.0:2181:NIOServerCnxn@742] - Client attempting to renew > session0x1281ba54e900005 at /129.183.128.230:60471 > 2010-04-20 17:44:21,527 - INFO [NIOServerCxn.Factory: > 0.0.0.0/0.0.0.0:2181:NIOServerCnxn@1424] - Invalid session > 0x1281ba54e900005 for client /129.183.128.230:60471, probably expired > 2010-04-20 17:44:21,527 - INFO [NIOServerCxn.Factory: > 0.0.0.0/0.0.0.0:2181:NIOServerCnxn@1286] - Closed socket connection for > client /129.183.128.230:60471 which had sessionid 0x1281ba54e900005 > > The client tries to reconnect with an expired session id. > Is it possible to configure zookeeper in order that it accepts this > connection by recreating a new session, or maybe something else that would > make the reconnection works ? > > Thanks in advance for your help > > Julien. > > > > -- With Regards! Ye, Qian --000e0cd51c4c7eb1650484bc27cd--