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 E6875F33A for ; Thu, 21 Mar 2013 03:22:35 +0000 (UTC) Received: (qmail 18783 invoked by uid 500); 21 Mar 2013 03:22:35 -0000 Delivered-To: apmail-zookeeper-user-archive@zookeeper.apache.org Received: (qmail 18572 invoked by uid 500); 21 Mar 2013 03:22:34 -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 18543 invoked by uid 99); 21 Mar 2013 03:22:33 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Mar 2013 03:22:33 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of bahman.kalali@gmail.com designates 209.85.220.175 as permitted sender) Received: from [209.85.220.175] (HELO mail-vc0-f175.google.com) (209.85.220.175) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Mar 2013 03:22:26 +0000 Received: by mail-vc0-f175.google.com with SMTP id hf12so1935933vcb.20 for ; Wed, 20 Mar 2013 20:22:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=p0g25K16v8fem9/8XZDCxeEfaOz8XpXevlNQFy4ilbw=; b=wu6GXG/35/+hCu855xPVemt3J2K13qUixqoJIG8oR63bB2NkHk76Jh48C/pP8IiIG6 txcMBXg3ThH0gGUuXDv0fBT4IAQhGBIPJU+PAtolvwqIiDzHqLFT+x0kt2dHgG/e8qXA psM+coBnU2xZZZQVet2wuK4lbZM42+Do6S3LxD0bd8QsxNoyX9B/2DhAOwQUy6SsEiyZ 0WYxPrvVZvBK537XREAACnyCtupZ518Az6dYiByzO06EpU0Xx2hMd4Gjqr+dL3zp7eBC dQGwZ+WFmch7MmmILdOXn2F6ht0EDN2mRMEsfyX/giVKbqnFSyM2bZOIJQ/yrocfFdHz Sqjw== MIME-Version: 1.0 X-Received: by 10.220.221.143 with SMTP id ic15mr11410151vcb.32.1363836125222; Wed, 20 Mar 2013 20:22:05 -0700 (PDT) Received: by 10.52.32.137 with HTTP; Wed, 20 Mar 2013 20:22:05 -0700 (PDT) In-Reply-To: References: Date: Wed, 20 Mar 2013 22:22:05 -0500 Message-ID: Subject: Re: Error Path when creating a node From: Bahman Kalali To: user@zookeeper.apache.org Content-Type: multipart/alternative; boundary=14dae9cdc33bc69b1d04d866d702 X-Virus-Checked: Checked by ClamAV on apache.org --14dae9cdc33bc69b1d04d866d702 Content-Type: text/plain; charset=ISO-8859-1 I think I find a way to create this /apps/neo4j/zookeeper/data path recursively in Java code, but I need it change the mode to CreateMode.PERSISTENT instead of CreateMode.EPHEMERAL_ SEQUENTIAL. I am not sure why I did not run into issues on windows. The only difference is that on windows the root is /zookeeper/data and on unix is /apps/neo4j/zookeeper/data. BR//Bahman . On Wed, Mar 20, 2013 at 5:06 PM, Camille Fournier wrote: > Did you create this path on the unix file system, or in ZooKeeper? > ZooKeeper isn't reading the unix file system for nodes, it's reading its > own internal data tree. You need to create the nodes in ZooKeeper. > > > On Wed, Mar 20, 2013 at 6:04 PM, Bahman Kalali >wrote: > > > Hi Camille, > > > > Thank you very much for your reply! > > > > I already created the path /apps/neo4j/zookeeper/data on unix box. Under > > this path for a cluster of three servers, I have zk1,zk2,zk3 for each > > server where each zk1, zk2, zk3 have myid files. Also, I can see that > > version-2 also created under zk1,zk2,zk3. All these directors are > created > > manualy under my user id and not root. > > > > However, I still when I create a node under /apps/neo4j/zookeeper/data, I > > will get an error "Error Path:/apps/neo4j/zookeeper/data > > Error:KeeperErrorCode = NoNode for /apps/neo4j/zookeeper/data" > > > > BR//Bahman > > > > > > > > On Wed, Mar 20, 2013 at 4:29 PM, Camille Fournier > >wrote: > > > > > The path /apps/neo4j/zookeeper/data has not been created in the ZK on > > your > > > unix box. You need to create that path before you can write an > ephemeral > > > node to it. You probably did this already on your windows ZK which is > why > > > you aren't seeing the error. ZooKeeper does not create parent nodes in > a > > > path for you, you must create the full path yourself if it hasn't been > > > created. > > > As per the documentation: > > > "If the parent node does not exist in the ZooKeeper, a KeeperException > > with > > > error code KeeperException.NoNode will be thrown." > > > > > > > > > On Wed, Mar 20, 2013 at 4:52 PM, Bahman Kalali < > bahman.kalali@gmail.com > > > >wrote: > > > > > > > Hi, > > > > > > > > I am using this API to create a node: > > > > > > > > lockPath = zk.create(/apps/neo4j/zookeeper/data/searchlock, > > null, > > > > Ids.OPEN_ACL_UNSAFE, > > > CreateMode.EPHEMERAL_SEQUENTIAL); > > > > > > > > Here is my setting in zoo.cfg in one of three servers: > > > > > > > > tickTime=2000 > > > > initLimit=10 > > > > syncLimit=5 > > > > dataDir=/apps/neo4j/zookeeper/data/zk1 > > > > dataLogDir=/apps/neo4j/zookeeper/log/zk1 > > > > clientPort=2185 > > > > server.1=upladevzoo01v:2988:3988 > > > > server.2=upladevzoo01v:2989:3989 > > > > server.3=upladevzoo01v:2990:3990 > > > > > > > > > > > > However, I get this exception on the server log "Error > > > > Path:/apps/neo4j/zookeeper/data" > > > > > > > > 2013-03-20 15:39:44,882 [myid:2] - INFO [ProcessThread(sid:2 > > > > cport:-1)::PrepRequestProcessor@627] - Got user-level > KeeperException > > > when > > > > processing sessionid:0x23d895990500004 type:create cxid:0x1 > > > > zxid:0x100000020 txntype:-1 reqpath:n/a Error > > > > Path:/apps/neo4j/zookeeper/data Error:KeeperErrorCode = NoNode for > > > > /apps/neo4j/zookeeper/data > > > > > > > > The same setting works fine on my local windows box, but not on a > unix > > > box. > > > > > > > > Does this have anything to do with permission on unix box? > > > > > > > > BR//Bahman > > > > > > > > > > --14dae9cdc33bc69b1d04d866d702--