ZooKeeper
  1. ZooKeeper
  2. ZOOKEEPER-1991

zkServer.sh returns with a zero exit status when a ZooKeeper process is already running

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.4.6
    • Fix Version/s: 3.5.2, 3.6.0
    • Component/s: scripts
    • Labels:
      None

      Description

      If ZooKeeper is started with zkServer.sh, and an error is shown that a ZooKeeper process is already running, the command returns with an exit status of 0, while it should end with a non-zero exit status.

      Example:
      $ bin/zkServer.sh start
      JMX enabled by default
      Using config: /home/reed/zookeeper/bin/../conf/zoo.cfg
      Starting zookeeper ... already running as process 25063.
      $ echo $?
      0

      This can make it difficult for automated scripts to check if creating a new ZooKeeper process was successful, as it won't catch if a user accidentally started it before.

        Activity

        Michi Mutsuzaki made changes -
        Fix Version/s 3.5.2 [ 12331981 ]
        Fix Version/s 3.6.0 [ 12326518 ]
        Fix Version/s 3.4.7 [ 12325149 ]
        Fix Version/s 3.5.1 [ 12326786 ]
        Patrick Hunt made changes -
        Fix Version/s 3.5.1 [ 12326786 ]
        Fix Version/s 3.5.0 [ 12316644 ]
        Patrick Hunt made changes -
        Fix Version/s 3.4.7 [ 12325149 ]
        Fix Version/s 3.5.0 [ 12316644 ]
        Patrick Hunt made changes -
        Field Original Value New Value
        Assignee Reed Wanderman-Milne [ reedwm ]
        Hide
        Patrick Hunt added a comment -

        Reed you want to give this a try? (patch I mean). Thanks.

        Show
        Patrick Hunt added a comment - Reed you want to give this a try? (patch I mean). Thanks.
        Reed Wanderman-Milne created issue -

          People

          • Assignee:
            Reed Wanderman-Milne
            Reporter:
            Reed Wanderman-Milne
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:

              Development