Return-Path: Delivered-To: apmail-hadoop-zookeeper-user-archive@minotaur.apache.org Received: (qmail 23017 invoked from network); 16 Jul 2010 00:25:14 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 16 Jul 2010 00:25:14 -0000 Received: (qmail 26815 invoked by uid 500); 16 Jul 2010 00:25:14 -0000 Delivered-To: apmail-hadoop-zookeeper-user-archive@hadoop.apache.org Received: (qmail 26706 invoked by uid 500); 16 Jul 2010 00:25:13 -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 26695 invoked by uid 99); 16 Jul 2010 00:25:13 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Jul 2010 00:25:13 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,NORMAL_HTTP_TO_IP,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of rich.schu@gmail.com designates 209.85.160.48 as permitted sender) Received: from [209.85.160.48] (HELO mail-pw0-f48.google.com) (209.85.160.48) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Jul 2010 00:25:03 +0000 Received: by pwj2 with SMTP id 2so1017630pwj.35 for ; Thu, 15 Jul 2010 17:23:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:content-type:mime-version :subject:from:in-reply-to:date:content-transfer-encoding:message-id :references:to:x-mailer; bh=HZr+YvQ4NmVnYLMig2RzWFEDb0xekZRtgZbXI6+slEw=; b=ptkqL+V6N48lso8dtleBe+Kj2eQWaDzzjoBR5mFEdj74LP/ZNqlRFj/vvb92eUmt4H gorc4/6sVZOacqO3cgpqpMNJDI8zl9sQcqhikCwOyWXNf+P+Ud47CiYXHzqD4HcI5sRv yHbzhU132b5+oVhYFSU2GghJd1ZV2K2pUy7zA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; b=sgt10qL5mW2wXPs4F9PlpOlIH5vbBqK1gUsiJJSgkXiCOGrf2m0xnSphUVJmlxUDI4 U/QmN8ZUYCaGnbSWuZybA7tIEn2fHpoANsmblAm88Zie0Gy5A4B2Ixl/Ge2wXklB3O/Y JJiZ/FBYuWn+KMzgQAO7M3pJJ/6d2wi7Kz2OE= Received: by 10.114.113.5 with SMTP id l5mr325071wac.155.1279239821783; Thu, 15 Jul 2010 17:23:41 -0700 (PDT) Received: from [10.135.135.133] (64-71-7-198.static.wiline.com [64.71.7.198]) by mx.google.com with ESMTPS id d39sm12417558wam.16.2010.07.15.17.23.39 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 15 Jul 2010 17:23:40 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1081) Subject: Re: Errors with Python bindings From: Rich Schumacher In-Reply-To: Date: Thu, 15 Jul 2010 17:24:24 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <6F921ADE-C8B4-4A1B-A856-3E755C0E1C48@gmail.com> References: <312DD59B-9C2E-4572-A994-06804D06994F@gmail.com> To: zookeeper-user@hadoop.apache.org X-Mailer: Apple Mail (2.1081) X-Virus-Checked: Checked by ClamAV on apache.org Hey Henry, Good to know! I was under the impression the 3.3.0 release had the = updated bindings but it seems I was mistaken. I'll get those built and = then see what happens. Just curious, have you ever run into or heard of = this? A quick Google search didn't return anything interesting. As for the version in the Python bindings, how about this trivial patch: Index: src/c/zookeeper.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- src/c/zookeeper.c (revision 964617) +++ src/c/zookeeper.c (working copy) @@ -1510,6 +1510,11 @@ PyModule_AddObject(module, "ZooKeeperException", ZooKeeperException); Py_INCREF(ZooKeeperException); =20 + char version_str[]; + sprintf(version_str, "%i.%i.%i", ZOO_MAJOR_VERSION, = ZOO_MINOR_VERSION, ZOO_PATCH_VERSION); + + PyModule_AddStringConstant(module, "__version__", version_str); + ADD_INTCONSTANT(PERM_READ); ADD_INTCONSTANT(PERM_WRITE); ADD_INTCONSTANT(PERM_CREATE); On Jul 14, 2010, at 2:57 PM, Henry Robinson wrote: > Hi Rich - >=20 > No, there's not a very easy way to verify the Python bindings version = afaik > - would be a useful feature to have though. >=20 > My first suggestion is to move to the bindings shipped with 3.3.1 - we = fixed > a lot of problems with the Python bindings which improved their = stability a > lot. Could you try that and then let us know if you continue to see > problems? >=20 > cheers, > Henry >=20 > On 14 July 2010 13:14, Rich Schumacher wrote: >=20 >> I'm running a Tornado webserver and using ZooKeeper to store some = metadata >> and occasionally the ZooKeeper connection will error out irrevocably. = Any >> subsequent calls to ZooKeeper from this process will result in a >> SystemError. >>=20 >> Here is the relevant portion of the Python traceback: >> ... >> File "/usr/lib/pymodules/python2.5/zuul/storage/zoo.py", line 69, in = call >> return getattr(zookeeper, name)(self.handle, *args) >> SystemError: NULL result without error in PyObject_Call >>=20 >> I found this in the ZooKeeper server logs: >>=20 >> 2010-07-13 06:52:46,488 - INFO [NIOServerCxn.Factory: >> 0.0.0.0/0.0.0.0:2181:NIOServerCnxn$Factory@251] - Accepted socket >> connection from /10.2.128.233:54779 >> 2010-07-13 06:52:46,489 - INFO [NIOServerCxn.Factory: >> 0.0.0.0/0.0.0.0:2181:NIOServerCnxn@742] - Client attempting to renew >> session 0x429b865a6270003 at /10.2.128.233:54779 >> 2010-07-13 06:52:46,489 - INFO [NIOServerCxn.Factory: >> 0.0.0.0/0.0.0.0:2181:Learner@95] - Revalidating client: = 299973596915630083 >> 2010-07-13 06:52:46,793 - INFO >> [QuorumPeer:/0:0:0:0:0:0:0:0:2181:NIOServerCnxn@1424] - Invalid = session >> 0x429b865a6270003 for client /10.2.128.233:54779, probably expired >> 2010-07-13 06:52:46,794 - INFO [NIOServerCxn.Factory: >> 0.0.0.0/0.0.0.0:2181:NIOServerCnxn@1286] - Closed socket connection = for >> client /10.2.128.233:54779 which had sessionid 0x429b865a6270003 >>=20 >>=20 >> The ZooKeeper ensemble is healthy; each node responds as expected to = the >> four letter word commands and a simple restart of the Tornado = processes >> "fixes" this. >>=20 >> My question is, if this really is due to session expiration why is a >> SessionExpiredException not raised? Another question, is there an = easy way >> to determine the version of the ZooKeeper Python bindings I'm using? = I >> built the 3.3.0 bindings but I just want to be able to verify that. >>=20 >> Thanks for the help, >>=20 >> Rich >=20 >=20 >=20 >=20 > --=20 > Henry Robinson > Software Engineer > Cloudera > 415-994-6679