我是靠谱客的博主 悲凉小丸子,最近开发中收集的这篇文章主要介绍hadoop集群启动失败YARN_RESOURCEMANAGER_USER=root HADOOP_SECURE_DN_USER=yarn YARN_NODEMANAGER_USER=root错误原因:Hadoop中没有默认root的用户,需要手动添加 两种解决方法 ,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

 

[root@hadoop102 job]# myhadoop.sh start
=================== 启动 hadoop集群 ===================
--------------- 启动 hdfs ---------------
Starting namenodes on [hadoop102]
Starting datanodes
ERROR: Attempting to operate on hdfs namenode as root
ERROR: but there is no HDFS_NAMENODE_USER defined. Aborting operation.
ERROR: Attempting to operate on hdfs datanode as root
ERROR: but there is no HDFS_DATANODE_USER defined. Aborting operation.
Starting secondary namenodes [hadoop104]
ERROR: Attempting to operate on hdfs secondarynamenode as root
ERROR: but there is no HDFS_SECONDARYNAMENODE_USER defined. Aborting operation.
--------------- 启动 yarn ---------------
Starting resourcemanager
Starting nodemanagers
ERROR: Attempting to operate on yarn resourcemanager as root
ERROR: but there is no YARN_RESOURCEMANAGER_USER defined. Aborting operation.
ERROR: Attempting to operate on yarn nodemanager as root
ERROR: but there is no YARN_NODEMANAGER_USER defined. Aborting operation.
--------------- 启动 historyserver ---------------
historyserver is running as process 13059.
Stop it first.

错误原因:

Hadoop中没有默认root的用户,需要手动添加 

两种解决方法 

1、输入如下命令,在环境变量中添加下面的配置 ,然后向里面加入如下的内容。输入命令使改动生效

vi /etc/profile
export HDFS_NAMENODE_USER=root
export HDFS_DATANODE_USER=root
export HDFS_SECONDARYNAMENODE_USER=root
export YARN_RESOURCEMANAGER_USER=root
export YARN_NODEMANAGER_USER=root
source /etc/profile

 

 

 2、方案1不成功使用2方案hadoop中sbin路径下文件

添加再顶部

vim start-dfs.sh
添加:
HDFS_DATANODE_USER=root
HADOOP_SECURE_DN_USER=hdfs
HDFS_NAMENODE_USER=root
HDFS_SECONDARYNAMENODE_USER=root
vim stop-dfs.sh
添加:
HDFS_DATANODE_USER=root
HADOOP_SECURE_DN_USER=hdfs
HDFS_NAMENODE_USER=root
HDFS_SECONDARYNAMENODE_USER=root
vim start-yarn.sh
添加:
YARN_RESOURCEMANAGER_USER=root
HADOOP_SECURE_DN_USER=yarn
YARN_NODEMANAGER_USER=root
vim stop-yarn.sh
添加:
YARN_RESOURCEMANAGER_USER=root
HADOOP_SECURE_DN_USER=yarn
YARN_NODEMANAGER_USER=root
vim
/etc/selinux/config
修改:
SELINUX=enforcing 改为 SELINUX=disabled

 最后分发到其他节点

 

 

最后

以上就是悲凉小丸子为你收集整理的hadoop集群启动失败YARN_RESOURCEMANAGER_USER=root HADOOP_SECURE_DN_USER=yarn YARN_NODEMANAGER_USER=root错误原因:Hadoop中没有默认root的用户,需要手动添加 两种解决方法 的全部内容,希望文章能够帮你解决hadoop集群启动失败YARN_RESOURCEMANAGER_USER=root HADOOP_SECURE_DN_USER=yarn YARN_NODEMANAGER_USER=root错误原因:Hadoop中没有默认root的用户,需要手动添加 两种解决方法 所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(48)

评论列表共有 0 条评论

立即
投稿
返回
顶部