Bug#650882: zookeeper: zkServer.sh fails to start zookeeper
Akira Kitada
akitada at gmail.com
Sun Dec 4 09:14:49 UTC 2011
Package: zookeeper
Version: 3.3.4+dfsg1-1
Severity: important
Dear Maintainer,
zkServer.sh does not work because, unlike upstream ZooKeeper release,
$cygwin variable is not set by zkEnv.sh.
====
$ sudo -u zookeeper /usr/share/zookeeper/bin/zkServer.sh start /etc/zookeeper/conf/zoo.cfg
JMX enabled by default
Using config:/etc/zookeeper/conf/zoo.cfg
/usr/share/zookeeper/bin/zkServer.sh: 1: /usr/share/zookeeper/bin/zkServer.sh: cygpath: not found
Using config:
grep: : No such file or directory
Starting zookeeper ... /usr/share/zookeeper/bin/zkServer.sh: 103: /usr/share/zookeeper/bin/zkServer.sh: cannot create /zookeeper_server.pid: Permission denied
FAILED TO WRITE PID
====
The following patch fixes the issue.
====
--- /usr/share/zookeeper/bin/zkServer.sh.orig 2011-11-30 19:50:33.000000000 +0900
+++ /usr/share/zookeeper/bin/zkServer.sh 2011-12-04 18:12:56.000000000 +0900
@@ -70,15 +70,6 @@
echo "Using config:$2" >&2
fi
-if $cygwin
-then
- ZOOCFG=`cygpath -wp "$ZOOCFG"`
- # cygwin has a "kill" in the shell itself, gets confused
- KILL=/bin/kill
-else
- KILL=kill
-fi
-
echo "Using config: $ZOOCFG" >&2
if [ -z $ZOOPIDFILE ]
@@ -126,7 +117,7 @@
then
echo "no zookeeper to stop (could not find file $ZOOPIDFILE)"
else
- $KILL -9 $(cat "$ZOOPIDFILE")
+ kill -9 $(cat "$ZOOPIDFILE")
rm "$ZOOPIDFILE"
echo STOPPED
fi
====
-- System Information:
Debian Release: wheezy/sid
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 3.0.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash
Versions of packages zookeeper depends on:
ii adduser 3.113
ii default-jre-headless [java6-runtime-headless] 1:1.6-44
ii libzookeeper-java 3.3.4+dfsg1-1
ii openjdk-6-jre-headless [java6-runtime-headless] 6b23~pre11-1
ii sun-java6-jre [java6-runtime-headless] 6.26-3
zookeeper recommends no packages.
zookeeper suggests no packages.
-- no debconf information
More information about the pkg-java-maintainers
mailing list