HDFS_NAMENODE_USER, HDFS_DATANODE_USER & HDFS_SECONDARYNAMENODE_USER not defined

前端 未结 5 1073
北荒
北荒 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.

    0 讨论(0)
  • 2020-12-15 18:31

    just do what it asks you:

    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"
    
    0 讨论(0)
  • 2020-12-15 18:44

    Vim ${HADOOP_HOME}sbin/start-dfs.sh & ${HADOOP_HOME}sbin/stop-dfs.sh, then add:

    HDFS_DATANODE_USER=root
    HADOOP_SECURE_DN_USER=hdfs 
    HDFS_NAMENODE_USER=root 
    HDFS_SECONDARYNAMENODE_USER=root 
    
    0 讨论(0)
  • 2020-12-15 18:44
    1. Check your pdsh default rcmd rsh

    pdsh -q -w localhost -- should get something like this

    -- DSH-specific options -- Separate stderr/stdout Yes Path prepended to cmd none Appended to cmd none Command: none Full program pathname /usr/bin/pdsh Remote program path /usr/bin/pdsh

    -- Generic options -- Local username enock Local uid 1000 Remote username enock Rcmd type rsh one ^C will kill pdsh No Connect timeout (secs) 10 Command timeout (secs) 0 Fanout 32 Display hostname labels Yes Debugging No

    -- Target nodes -- localhost

    1. Modify pdsh default rcmd. Add pdsh to bashrc nano ~/.bashrc -- add this line towards the end export PDSH_RCMD_TYPE=ssh -- update source ~/.bashrc

    That should solve your problem

    C. sbin/start-dfs.sh

    0 讨论(0)
  • 2020-12-15 18:50

    Based on on the first warning, HADOOP_PREFIX, sounds like you've not defined HADOOP_HOME correctly.

    This would be done in your /etc/profile.d.

    hadoop-env.sh is where the remainder of those variables are are defined.

    Please refer to the UNIX Shell Guide

    hadoop is not able to access ssh service with other user

    This has nothing to do with Hadoop itself. It's basic SSH account management. You need to

    1. Make the hadoop (and other, like yarn) accounts on all machines of a cluster (see adduser command documentation)
    2. Copy a passwordless SSH key using ssh-copy-id hadoop@localhost, for example

    If you don't need distributed mode and just want to use Hadoop locally, you can use a Mini Cluster.

    The documentation also recommends making a single node installation before continuing to pseudo distributed

    0 讨论(0)
提交回复
热议问题