【大数据报错】ERROR: Attempting to operate on hdfs namenode as root

hadoop3.1格式化后启动集群报错

报错信息:
# ./sbin/start-dfs.sh
Starting namenodes on [note01]
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 [note01]
ERROR: Attempting to operate on hdfs secondarynamenode as root
ERROR: but there is no HDFS_SECONDARYNAMENODE_USER defined. Aborting operation.
2019-02-06 18:36:04,824 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable

原因:
解压安装包后,修改了文件夹的用户和属组,即执行了下面的命令
chown root:root hadoop3.1.1后,启动集群报错。

解决:
只能删除现在的软件文件夹,重新解压安装包,修改相关配置文件后格式化文件系统即可,即相当于从头开始操作一遍。

 

你可能感兴趣的:(大数据报错)