hadoop3. X startup yarn error: setting to operate on HDFS namenode as root (start-all. SH) startup failure solution

Big data learning monk 2022-02-13 07:16:52 阅读数:973

hadoop3. hadoop startup yarn error

Recently installed. hadoop3.X Version cluster , Feeling contrast 2.X There are many holes in the version
After completing the cluster configuration , start-up hdfs.sh and yarn.sh Have encountered this problem
 Insert picture description here
The solution :
Need modification

start-dfs.sh
stop-dfs.sh
start-yarn.sh
stop-yarn.sh

To configure sbin Under the start-dfs.sh add to

HDFS_DATANODE_USER=root
HADOOP_SECURE_DN_USER=hdfs
HDFS_NAMENODE_USER=root
HDFS_SECONDARYNAMENODE_USER=root

To configure stop-dfs.sh add to

HDFS_DATANODE_USER=root
HADOOP_SECURE_DN_USER=hdfs
HDFS_NAMENODE_USER=root
HDFS_SECONDARYNAMENODE_USER=root

To configure sbin Under the start-yarn.sh add to

YARN_RESOURCEMANAGER_USER=root
HADOOP_SECURE_DN_USER=yarn
YARN_NODEMANAGER_USER=root

To configure sbin Under the stop-yarn.sh add to

YARN_RESOURCEMANAGER_USER=root
HADOOP_SECURE_DN_USER=yarn
YARN_NODEMANAGER_USER=root

To configure vi /etc/selinux/config
Will be modified SELINUX=enforcing Change to SELINUX=disabled

Copy it back to another node , Then start hadoop That's it

copyright:author[Big data learning monk],Please bring the original link to reprint, thank you. https://en.javamana.com/2022/02/202202130716499830.html