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
+ [ = ]
+ return 1
+ echo 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.