[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2078?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

metatech updated ZOOKEEPER-2078:
--------------------------------
    Description: 
The script "zkServer.sh" contains a pattern 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}


  was:
The script "zkServer.sh" contains a pattern 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}




> 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 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)

Reply via email to