zoukankan      html  css  js  c++  java
  • hadoop3.2.2 ERROR: but there is no HDFS_NAMENODE_USER defined. Aborting operation. Starting datanodes

    错误描述:

    [root@nna hadoop-3.2.2]# start-dfs.sh
    Starting namenodes on [nna nns]
    ERROR: Attempting to operate on hdfs namenode as root
    ERROR: but there is no HDFS_NAMENODE_USER defined. Aborting operation.
    Starting datanodes
    ERROR: Attempting to operate on hdfs datanode as root
    ERROR: but there is no HDFS_DATANODE_USER defined. Aborting operation.
    Starting journal nodes [dn1 dn3 dn2]
    ERROR: Attempting to operate on hdfs journalnode as root
    ERROR: but there is no HDFS_JOURNALNODE_USER defined. Aborting operation.
    Starting ZK Failover Controllers on NN hosts [nna nns]
    ERROR: Attempting to operate on hdfs zkfc as root
    ERROR: but there is no HDFS_ZKFC_USER defined. Aborting operation.
    [root@nna hadoop-3.2.2]# jps
    2457 NameNode
    2778 Jps
    [root@nna hadoop-3.2.2]#

    解决方法:

    在Hadoop安装目录下找到sbin文件夹

    在里面修改四个文件

    1、对于start-dfs.sh和stop-dfs.sh文件,添加下列参数:

    HDFS_DATANODE_USER=root
    HADOOP_SECURE_DN_USER=hdfs
    HDFS_NAMENODE_USER=root

    2、对于start-yarn.sh和stop-yarn.sh文件,添加下列参数:

    YARN_RESOURCEMANAGER_USER=root
    HADOOP_SECURE_DN_USER=yarn
    YARN_NODEMANAGER_USER=root
    欢迎关注微信公众号:大数据从业者
  • 相关阅读:
    Python-Basis-9th
    Python-Basis-8th
    Python-Basis-7th
    Ubuntu-Basis-4th
    Ubuntu-Basis-3rd
    Ubuntu-Basis-2nd
    Ubuntu-Basis-1st
    疯狂java第五章&&第六章-面向对象
    疯狂java第四章-流程控制与数组
    疯狂java第三章-数据类型和运算符
  • 原文地址:https://www.cnblogs.com/felixzh/p/14485961.html
Copyright © 2011-2022 走看看