Uploaded image for project: 'CDH (READ-ONLY)'
  1. CDH (READ-ONLY)
  2. DISTRO-211

Zookeeper startup script (zkServer.sh) losts PID when started twice

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: CDH3b4
    • Fix Version/s: CDH3u1
    • Component/s: Packaging, ZooKeeper
    • Labels:
    • Environment:
      CentOS

      Description

      Hello,

      If I execute twice the command

      /etc/init.d/hadoop-zookeeper start

      Of course the second zookeeper process is not launched, but the second call has erased the zookeeper's PID.

      Since that, the command

      /etc/init.d/hadoop-zookeeper stop

      won't work..

      To fix that, a check - like in the Hadoop scripts - need to be added in zkServer.sh, after the line

      echo "Starting zookeeper ... "

      add

          if [ -f $ZOOPIDFILE ]; then
              if kill -0 `cat $ZOOPIDFILE` > /dev/null 2>&1; then
                  echo zookeeper running as process `cat $ZOOPIDFILE`.  Stop it first.
                  exit 1
              fi
          fi
      

        Attachments

          Activity

            People

            • Assignee:
              rvs Roman V Shaposhnik
              Reporter:
              guinotphil Philippe Guinot
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: