Return-Path: X-Original-To: apmail-zookeeper-dev-archive@www.apache.org Delivered-To: apmail-zookeeper-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 833F717802 for ; Fri, 1 May 2015 05:59:07 +0000 (UTC) Received: (qmail 35435 invoked by uid 500); 1 May 2015 05:59:07 -0000 Delivered-To: apmail-zookeeper-dev-archive@zookeeper.apache.org Received: (qmail 35399 invoked by uid 500); 1 May 2015 05:59:07 -0000 Mailing-List: contact dev-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@zookeeper.apache.org Delivered-To: mailing list dev@zookeeper.apache.org Received: (qmail 35387 invoked by uid 99); 1 May 2015 05:59:07 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 May 2015 05:59:07 +0000 Date: Fri, 1 May 2015 05:59:07 +0000 (UTC) From: "Chris Nauroth (JIRA)" To: dev@zookeeper.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Assigned] (ZOOKEEPER-1927) zkServer.sh fails to read dataDir (and others) from zoo.cfg on Solaris 10 (grep issue, manifests as FAILED TO WRITE PID). MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/ZOOKEEPER-1927?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Chris Nauroth reassigned ZOOKEEPER-1927: ---------------------------------------- Assignee: Chris Nauroth > zkServer.sh fails to read dataDir (and others) from zoo.cfg on Solaris 10 (grep issue, manifests as FAILED TO WRITE PID). > --------------------------------------------------------------------------------------------------------------------------- > > Key: ZOOKEEPER-1927 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1927 > Project: ZooKeeper > Issue Type: Bug > Components: scripts > Affects Versions: 3.4.6 > Environment: Solaris 5.10 > Reporter: Ed Schmed > Assignee: Chris Nauroth > Attachments: ZOOKEEPER-1927.001.patch > > > Fails to write PID file with a permissions error, because the startup script fails to read the dataDir variable from zoo.cfg, and then tries to use the drive root ( / ) as the data dir. > Tracked the problem down to line 84 of zkServer.sh: > ZOO_DATADIR="$(grep "^[[:space:]]*dataDir" "$ZOOCFG" | sed -e 's/.*=//')" > If i run just that line and point it right at the config file, ZOO_DATADIR is empty. > If I remove [[:space:]]* from the grep: > ZOO_DATADIR="$(grep "^dataDir" "$ZOOCFG" | sed -e 's/.*=//')" > Then it works fine. (If I also make the same change on line 164 and 169) > My regex skills are pretty bad, so I'm afraid to comment on why [[space]]* needs to be in there? -- This message was sent by Atlassian JIRA (v6.3.4#6332)