Details
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
- relates to
-
DISTRO-35 Zookeeper init script status, force-stop and force-reload commands are broken
- Resolved