[ 
https://issues.apache.org/jira/browse/HADOOP-13632?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15508265#comment-15508265
 ] 

Andrew Wang commented on HADOOP-13632:
--------------------------------------

Poked around a bit, I think we could move up the {{ps -p $!}} check from the 
end of the start functions to right after the sleep before the renice. And/or, 
add a hadoop_error message to the {{ps -p}} if case, something like:

{code}
  if ! ps -p $! > /dev/null 2>&1; then
    hadoop_error "ERROR: Could not start ${daemonname}. Check ${outfile} for 
more information."
    return 1;
  fi
{code}

[~aw] any opinions on this?

> Daemonization does not check process liveness before renicing
> -------------------------------------------------------------
>
>                 Key: HADOOP-13632
>                 URL: https://issues.apache.org/jira/browse/HADOOP-13632
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: scripts
>    Affects Versions: 3.0.0-alpha1
>            Reporter: Andrew Wang
>
> If you try to daemonize a process that is incorrectly configured, it will die 
> quite quickly. However, the daemonization function will still try to renice 
> it even if it's down, leading to something like this for my namenode:
> {noformat}
> -> % bin/hdfs --daemon start namenode
> ERROR: Cannot set priority of namenode process 12036
> {noformat}
> It'd be more user-friendly instead of this renice error, we said that the 
> process couldn't be started.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to