Tag Archives: Big data report error

Error: attempting to operate on HDFS namenode as root

Hadoop 3.1 starts the cluster after formatting and reports an error

Error message:
;./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

Reason:
after decompressing the installation package, the user and group of the folder are modified, that is, the following command is executed
chown root:root hadoop3.1.1 After that, start the cluster to report an error.

Solution:
you can only delete the current software folder, decompress the installation package, modify the relevant configuration files, and then format the file system, which is equivalent to operating from the beginning.