[
https://issues.apache.org/jira/browse/ZOOKEEPER-2042?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
John Lindwall updated ZOOKEEPER-2042:
-------------------------------------
Description:
There are two issues in the zkServer.sh that make it not work properly out of
the box.
1. The bin/zkServer.sh script uses plain "echo" in all instances but one: when
writing the pid to the pid file. In that instance it uses "/bin/echo".
The "/bin/echo" on Solaris does not understand the "-n" parameter and
interprets it as a literal string, so the "-n" gets written into the pid file
along with the pid. This causes the "stop" command to fail.
2. The /bin/grep command in Solaris does not understand special character
classes like "[[:space:]]". You must use the alternate posix version of grep
as found in /usr/xpg4/bin/grep for this to work. If the script cannot be made
completely generic then at least we should document the need to the posix grep
implementation on Solaris.
was:
There are two issues in the zkServer.sh that make it not work properly out of
the box.
1. The bin/zkServer.sh script uses plain "echo" in all instances but one: when
writing the pid to the pid file. In that instance it uses /"/bin/echo".
The "/bin/echo" on Solaris does not understand the "-n" parameter and
interprets it as a literal string, so the "-n" gets written into the pid file
along with the pid. This causes the "stop" command to fail.
2. The /bin/grep command in Solaris does not understand special character
classes like "[[:space:]]". You must use the alternate posix version of grep
as found in /usr/xpg4/bin/grep for this to work. If the script cannot be made
completely generic then at least we should document the need to the posix grep
implementation on Solaris.
> zkServer.sh does not work properly on Solaris
> ---------------------------------------------
>
> Key: ZOOKEEPER-2042
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2042
> Project: ZooKeeper
> Issue Type: Bug
> Components: scripts
> Affects Versions: 3.4.6
> Environment: Solaris 5.11
> Reporter: John Lindwall
> Priority: Minor
>
> There are two issues in the zkServer.sh that make it not work properly out of
> the box.
> 1. The bin/zkServer.sh script uses plain "echo" in all instances but one:
> when writing the pid to the pid file. In that instance it uses "/bin/echo".
> The "/bin/echo" on Solaris does not understand the "-n" parameter and
> interprets it as a literal string, so the "-n" gets written into the pid file
> along with the pid. This causes the "stop" command to fail.
> 2. The /bin/grep command in Solaris does not understand special character
> classes like "[[:space:]]". You must use the alternate posix version of grep
> as found in /usr/xpg4/bin/grep for this to work. If the script cannot be
> made completely generic then at least we should document the need to the
> posix grep implementation on Solaris.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)