Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-2874

zookeeper-server-stop.sh may fail to shutdown ZK and/or may stop unrelated processes

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.8.2.1, 0.9.0.0
    • 0.10.0.0
    • None
    • None

    Description

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

      ps ax | grep -i 'zookeeper' | grep -v grep | awk '{print $1}' | xargs kill -SIGINT
      

      Disclaimer: I don't know whether there are any unwanted side effects of switching from SIGINT to SIGTERM.

      Attachments

        Activity

          People

            Unassigned Unassigned
            miguno Michael G. Noll
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: