Michael Noll created KAFKA-2874:
-----------------------------------
Summary: zookeeper-server-stop.sh may fail to shutdown ZK and/or
may stop unrelated processes
Key: KAFKA-2874
URL: https://issues.apache.org/jira/browse/KAFKA-2874
Project: Kafka
Issue Type: Bug
Affects Versions: 0.8.2.1, 0.9.0.0
Reporter: Michael Noll
We have run into the problem of ZK not shutting down properly when the included
{{bin/zookeeper-server-stop.sh}} is being used. In a nutshell, ZK may not
shutdown when you send only a SIGINT; instead, there are certain situations
(which unfortunately are a bit hard to pin down) where for some reason only a
SIGTERM will shut ZK down.
Similarly, the current
[zookeeper-server-stop|https://github.com/apache/kafka/blob/trunk/bin/zookeeper-server-stop.sh#L16]
script uses a very broad grep statement (`grep -i zookeeper`) that might cause
the script to shutdown other processes on the machine as well, think:
collateral damage.
For reference this is the current command to stop ZK:
{code}
ps ax | grep -i 'zookeeper' | grep -v grep | awk '{print $1}' | xargs kill
-SIGINT
{code}
Disclaimer: I don't know whether there are any unwanted side effects of
switching from SIGINT to SIGTERM.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)