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

nkeywal commented on HBASE-6970:
--------------------------------

Doing things completely is actually far from simple...
- Ensuring that the java path is clean and we can always return the right 
status seems very complicated if we don't want to have endless bugs around 
forgotten cases.
- Failure return code from the stop: easy to add in the script shell
- Only write a new pid if the start was actually successful. The only way I see 
to do this is to write the pid file from the java program. This should cover 
most cases, but we should do it soon enough (likely at the very beginning of 
the "run" method) to ensure we've generated the file even if we have a endless 
loop later.
                
> hbase-deamon.sh creates/updates pid file even when that start failed.
> ---------------------------------------------------------------------
>
>                 Key: HBASE-6970
>                 URL: https://issues.apache.org/jira/browse/HBASE-6970
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Lars Hofhansl
>            Assignee: nkeywal
>
> We just ran into a strange issue where could neither start nor stop services 
> with hbase-deamon.sh.
> The problem is this:
> {code}
>     nohup nice -n $HBASE_NICENESS "$HBASE_HOME"/bin/hbase \
>         --config "${HBASE_CONF_DIR}" \
>         $command "$@" $startStop > "$logout" 2>&1 < /dev/null &
>     echo $! > $pid
> {code}
> So the pid file is created or updated even when the start of the service 
> failed. The next stop command will then fail, because the pid file has the 
> wrong pid in it.
> Edit: Spelling and more spelling errors.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to