hadoop无法停止

停止hadoop集群,运行命令

$ sh stop-all.sh

出现提示:

no resourcemanager to stop
host10: no nodemanager to stop
host9: no nodemanager to stop
no proxyserver to stop

添加日志重新操作:

export HADOOP_ROOT_LOGGER=DEBUG,console
18/11/13 11:07:16 DEBUG util.PerformanceAdvisory: Falling back to shell based
18/11/13 11:07:16 DEBUG security.JniBasedUnixGroupsMappingWithFallback: Group mapping impl=org.apache.hadoop.security.ShellBasedUnixGroupsMapping
18/11/13 11:07:16 DEBUG security.Groups: Group mapping impl=org.apache.hadoop.security.JniBasedUnixGroupsMappingWithFallback; cacheTimeout=300000; warningDeltaMs=5000
18/11/13 11:07:16 DEBUG security.UserGroupInformation: hadoop login
18/11/13 11:07:16 DEBUG security.UserGroupInformation: hadoop login commit
18/11/13 11:07:16 DEBUG security.UserGroupInformation: using local user:UnixPrincipal: udap
18/11/13 11:07:16 DEBUG security.UserGroupInformation: Using user: "UnixPrincipal: udap" with name udap
18/11/13 11:07:16 DEBUG security.UserGroupInformation: User entry: "udap"
18/11/13 11:07:16 DEBUG security.UserGroupInformation: UGI loginUser:udap (auth:SIMPLE)
18/11/13 11:07:16 DEBUG security.UserGroupInformation: PrivilegedAction as:udap (auth:SIMPLE) from:org.apache.hadoop.hdfs.tools.GetConf.run(GetConf.java:314)
stopping yarn daemons
no resourcemanager to stop
host10: no nodemanager to stop
host9: no nodemanager to stop
no proxyserver to stop

没什么报错信息,这不科学,所以观察脚本,发现错误在寻找pid的时候没找到,默认pid存在:

if [ "$HADOOP_PID_DIR" = "" ]; then
  HADOOP_PID_DIR=/tmp
fi

当tmp目录被删除时,此时就无法运行脚本停止进程,所以只能手动一台台停止进程了,如果要避免错误应该是启动脚本中将“HADOOP_PID_DIR”配置到不删除目录

 

posted @ 2018-11-13 15:54  但行好事-莫问前程  阅读(1227)  评论(0编辑  收藏  举报