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

hadoop init scripts status action return not running even if the service is running

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: CDH3u0
    • Fix Version/s: CDH2u0, CDH3u0
    • Component/s: Packaging
    • Labels:
      None
    • Environment:
      Ubuntu

      Description

      Running the status command from the init script always return not running:

      $ sudo service hadoop-0.20-namenode status
      hadoop-0.20-namenode is not running.

      This is due to a wrong pid filename:

      $ sudo /etc/init.d/hadoop-0.20-jobtracker status
      hadoop-0.20-jobtracker is + local pidfile=/usr/lib/hadoop-0.20/pids/hadoop-root-jobtracker.pid
      + local pid
      + cat /usr/lib/hadoop-0.20/pids/hadoop-root-jobtracker.pid
      + pid=
      + [ = ]
      + return 1
      + echo not running.
      not running.
      + exit 1

      The pid filename by default includes the user under which the script is run. The init script is run as root whereas the hadoop service is run under the hadoop system user.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                eli Eli Collins
                Reporter:
                mathiaz Mathias Gug
              • Votes:
                1 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: