You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Martin A. Juell (Created) (JIRA)" <ji...@apache.org> on 2012/02/27 05:51:48 UTC
[jira] [Created] (HADOOP-8114) Init scripts in 1.0.0/1.0.1 .deb
distribution appear to rely on $USER in an unhealthy way - breaks status
functionality, inconsistency between manual and automatic service startups
Init scripts in 1.0.0/1.0.1 .deb distribution appear to rely on $USER in an unhealthy way - breaks status functionality, inconsistency between manual and automatic service startups
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Key: HADOOP-8114
URL: https://issues.apache.org/jira/browse/HADOOP-8114
Project: Hadoop Common
Issue Type: Bug
Affects Versions: 1.0.0, 1.0.1
Environment: Debian/Ubuntu
Reporter: Martin A. Juell
When I run hadoop using
{{$ sudo /etc/init.d/hadoop-namenode start}} (or whatever service),
it creates pid file {{/var/run/hadoop/hadoop-root-namenode.pid}}.
When the namenode is automatically started at boot, the file is called
{{/var/run/hadoop/hadoop--namenode.pid}} , i.e. the user part is missing.
Either way, doing /etc/init.d/hadoop-namenode status always returns an error exit code.
I've snooped around a bit, and the cause seems to be that the name of the pid file to look for is hardcoded:
{{if start-stop-daemon --stop --quiet --oknodo --pidfile ${HADOOP_PID_DIR}/hadoop-hdfs-namenode.pid; then}}
(Line 77 of /etc/init.d/hadoop-jobtracker from hadoop-1.0.1 , .deb version)
{{start-stop-daemon -c}} doesn't change the {{$USER}} variable, but it appears that it should be set. I tried prepending {{USER=hdfs}} to the above line, starting the namenode, and now the pid file was named {{/var/run/hadoop/hadoop-hdfs-namenode.pid}}
Assuming I've understood thsi correctly, my proposed solution is to make the init scripts use a method of changing user where the {{$USER}} variable is also changed.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira