[ 
https://issues.apache.org/jira/browse/HADOOP-8114?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Allen Wittenauer resolved HADOOP-8114.
--------------------------------------
    Resolution: Won't Fix

code no longer exists in trunk

> 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: Ubuntu Lucid (10.04) - Installed .deb package from 
> mirror using dpkg. 
>            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: 
> {code:title=/etc/init.d/hadoop-namenode:89|borderStyle=solid}
> if start-stop-daemon --stop --quiet --oknodo --pidfile 
> ${HADOOP_PID_DIR}/hadoop-hdfs-namenode.pid; then
> {code} 
> {{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}} , i.e. what we want. 
> Assuming I've understood this correctly, an easy solution is to make the init 
> scripts use a method of changing user where the {{$USER}} variable is also 
> changed. 
> This applies to all init scripts, not just the namenode.
> Error present in both 1.0.0 and 1.0.1, possibly earlier versions also. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to