You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Arpit Agarwal (JIRA)" <ji...@apache.org> on 2017/11/22 20:41:00 UTC

[jira] [Comment Edited] (HADOOP-15066) Spurious error stopping secure datanode

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

Arpit Agarwal edited comment on HADOOP-15066 at 11/22/17 8:40 PM:
------------------------------------------------------------------

Thanks for the fix [~bharatviswa]. Couple of comments:
# The following can be replaced with elif:
{code}
    else
      if [[ -f "${pidfile}" ]]; then
{code}
# We'd also need a fix in hadoop_stop_secure_daemon here. The pid equality checks should be skipped if the pid file no longer exists.
{code}
  cur_daemon_pid=$(cat "$daemonpidfile")
  cur_priv_pid=$(cat "$privpidfile")

  if [[ "${daemon_pid}" = "${cur_daemon_pid}" ]]; then
    rm -f "${daemonpidfile}" >/dev/null 2>&1
  else
    hadoop_error "WARNING: daemon pid has changed for ${command}, skip deleting daemon pid file"
  fi

  if [[ "${priv_pid}" = "${cur_priv_pid}" ]]; then
    rm -f "${privpidfile}" >/dev/null 2>&1
  else
    hadoop_error "WARNING: priv pid has changed for ${command}, skip deleting priv pid file"
  fi
{code}


was (Author: arpitagarwal):
Thanks for the fix [~bharatviswa]. Couple of comments:
# The following can be replaced with elif:
{code}
    else
      if [[ -f "${pidfile}" ]]; then
{code}
# We'd also need a fix in hadoop_stop_secure_daemon here. The pid equality checks should be skipped if the pid file no longer exists.
{code}
  if [[ "${daemon_pid}" = "${cur_daemon_pid}" ]]; then
    rm -f "${daemonpidfile}" >/dev/null 2>&1
  else
    hadoop_error "WARNING: daemon pid has changed for ${command}, skip deleting daemon pid file"
  fi

  if [[ "${priv_pid}" = "${cur_priv_pid}" ]]; then
    rm -f "${privpidfile}" >/dev/null 2>&1
  else
    hadoop_error "WARNING: priv pid has changed for ${command}, skip deleting priv pid file"
  fi
{code}

> Spurious error stopping secure datanode
> ---------------------------------------
>
>                 Key: HADOOP-15066
>                 URL: https://issues.apache.org/jira/browse/HADOOP-15066
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: scripts
>    Affects Versions: 3.0.0
>            Reporter: Arpit Agarwal
>            Assignee: Bharat Viswanadham
>         Attachments: HADOOP-15066.00.patch
>
>
> There is a spurious error when stopping a secure datanode.
> {code}
> # hdfs --daemon stop datanode
> cat: /var/run/hadoop/hdfs//hadoop-hdfs-root-datanode.pid: No such file or directory
> WARNING: pid has changed for datanode, skip deleting pid file
> cat: /var/run/hadoop/hdfs//hadoop-hdfs-root-datanode.pid: No such file or directory
> WARNING: daemon pid has changed for datanode, skip deleting daemon pid file
> {code}
> The error appears benign. The service was stopped correctly.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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