HDFS_NAMENODE_USER, HDFS_DATANODE_USER & HDFS_SECONDARYNAMENODE_USER not defined

前端 未结 5 1087
北荒
北荒 2020-12-15 17:56

I am new to hadoop.
I\'m trying to install hadoop in my laptop in Pseudo-Distributed mode.
I am running it with root user, but I\'m getting the error below.

5条回答
  •  北荒
    北荒 (楼主)
    2020-12-15 18:30

    The root cause of this problem,

    1. hadoop install for different user and you start yarn service for different user. OR
    2. in hadoop config's hadoop-env.sh specified HDFS_NAMENODE_USER and HDFS_DATANODE_USER user is something else.

    Hence we need to correct and make it consistent at every place. So a simple solution of this problem is to edit your hadoop-env.sh file and add the user-name for which you want to start the yarn service. So go ahead and edit $HADOOP_HOME/etc/hadoop/hadoop-env.sh by adding the following lines

    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
    

    Now save and start yarn, hdfs service and check that it works.

提交回复
热议问题