当前位置:   article > 正文

ERROR: Attempting to operate on hdfs namenode as root ERROR: but there is no HDFS_NAMENODE_USER defi

error: attempting to operate on hdfs namenode as root error: but there is no

问题:

ERROR: Attempting to operate on hdfs namenode as root
ERROR: but there is no HDFS_NAMENODE_USER defined. Aborting operation
  • 1
  • 2

解决方案:

在/hadoop/sbin路径下查找start-dfs.sh和stop-dfs.sh两个文件,在其顶部都添加上

#!/usr/bin/env bash
HDFS_DATANODE_USER=root
HADOOP_SECURE_DN_USER=hdfs
HDFS_NAMENODE_USER=root
HDFS_SECONDARYNAMENODE_USER=root
  • 1
  • 2
  • 3
  • 4
  • 5

顺便在start-yarn.sh和stop-yarn.sh两个文件顶部也分别加上

#!/usr/bin/env bash
YARN_RESOURCEMANAGER_USER=root
HADOOP_SECURE_DN_USER=yarn
YARN_NODEMANAGER_USER=root
  • 1
  • 2
  • 3
  • 4
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Monodyee/article/detail/472765
推荐阅读
相关标签
  

闽ICP备14008679号