编程语言
首页 > 编程语言> > Attempting to operate on hdfs namenode as root

Attempting to operate on hdfs namenode as root

作者:互联网

在/hadoop/sbin路径下:
将start-dfs.sh,stop-dfs.sh两个文件顶部添加以下参数

#!/usr/bin/env bash
HDFS_DATANODE_USER=root
HADOOP_SECURE_DN_USER=hdfs
HDFS_NAMENODE_USER=root
HDFS_SECONDARYNAMENODE_USER=root

还有,start-yarn.sh,stop-yarn.sh顶部也需添加以下:

#!/usr/bin/env bash
YARN_RESOURCEMANAGER_USER=root
HADOOP_SECURE_DN_USER=yarn
YARN_NODEMANAGER_USER=root


# Licensed to the Apache Software Foundation (ASF) under one or more

修改后重启 ./start-dfs.sh,成功!

标签:hdfs,HDFS,dfs,start,sh,USER,namenode,operate,root
来源: https://blog.csdn.net/u013596478/article/details/110728894