You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Chris Nauroth (JIRA)" <ji...@apache.org> on 2015/05/01 07:58:06 UTC

[jira] [Commented] (ZOOKEEPER-2078) zkServer.sh uses pattern unsupported by "grep" on Solaris

    [ https://issues.apache.org/jira/browse/ZOOKEEPER-2078?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14522807#comment-14522807 ] 

Chris Nauroth commented on ZOOKEEPER-2078:
------------------------------------------

[~metatech], thank you for filing the bug report.  I'm going to resolve this as a duplicate of ZOOKEEPER-1927.  I've added you as a watcher on that issue so that you'll continue to get status updates.  I'll post a patch on that issue shortly.


> zkServer.sh uses pattern unsupported by "grep" on Solaris
> ---------------------------------------------------------
>
>                 Key: ZOOKEEPER-2078
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2078
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: scripts
>    Affects Versions: 3.4.5
>         Environment: Solaris 11
>            Reporter: metatech
>            Priority: Minor
>
> The script "zkServer.sh" contains a pattern (POSIX "character class syntax") which is not supported by "grep" on Solaris (both versions 10 and 11).
> {code}
> ZOO_DATADIR="$(grep "^[[:space:]]*dataDir" "$ZOOCFG" | sed -e 's/.*=//')"
> {code}
> This results into the environment variable being set with an empty value, which later gives the following error : 
> {code}
> Starting zookeeper ... bin/zkServer.sh: line 114: /zookeeper_server.pid: Permission denied
> {code}
> The workaround is to simplify the pattern used by "grep" :
> {code}
> ZOO_DATADIR="$(grep "^dataDir" "$ZOOCFG" | sed -e 's/.*=//')"
> {code}
> The same pattern is also used in the "status" command, which fails to read the "clientPort", which results into the following error :
> {code}
> Error contacting service. It is probably not running.
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)