在Hadoop-3.2.0中运行start-dfs.sh时出错

时间:2020-02-12 07:22:22

标签: hadoop hdfs bigdata yarn

我在用于YARN学习的Hadoop3.2.1的配置中遇到了一些问题。而且我发现当我运行sbin / start-all.sh时,用户root和用户host1有两种不同的条件。您能告诉我如何解决它,以及它是否与SSH连接吗?非常感谢你。

根目录:

root@host1-virtual-machine:/home/host1/usr/hadoop-3.2.1# sbin/start-all.sh
Starting namenodes on [localhost]
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 secondary namenodes [host1-virtual-machine]
ERROR: Attempting to operate on hdfs secondarynamenode as root
ERROR: but there is no HDFS_SECONDARYNAMENODE_USER defined. Aborting operation.
2020-02-12 14:40:27,093 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Starting resourcemanager
ERROR: Attempting to operate on yarn resourcemanager as root
ERROR: but there is no YARN_RESOURCEMANAGER_USER defined. Aborting operation.
Starting nodemanagers
ERROR: Attempting to operate on yarn nodemanager as root
ERROR: but there is no YARN_NODEMANAGER_USER defined. Aborting operation.

在host1用户中:

host1@host1-virtual-machine:~/usr/hadoop-3.2.1$ sbin/start-all.sh
WARNING: Attempting to start all Apache Hadoop daemons as host1 in 10 seconds.
WARNING: This is not a recommended production deployment configuration.
WARNING: Use CTRL-C to abort.
Starting namenodes on [localhost]
localhost: host1@localhost: Permission denied (publickey,password).
Starting datanodes
localhost: host1@localhost: Permission denied (publickey,password).
Starting secondary namenodes [host1-virtual-machine]
host1-virtual-machine: host1@host1-virtual-machine: Permission denied (publickey,password).
Starting resourcemanager
Starting nodemanagers
localhost: host1@localhost: Permission denied (publickey,password).

1 个答案:

答案 0 :(得分:0)

您需要在节点之间建立无密码连接。此链接可能有帮助 http://mynotesonhadoop.blogspot.com/2017/07/configuring-passwordless-ssh-from.html?m=1