but there is no HDFS_NAMENODE_USER defined. Aborting operation.

but there is no HDFS_NAMENODE_USER defined. Aborting operation.

  • 错误信息
  • 解决方案

错误信息

Starting namenodes on [cpucode100]
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 [cpucode101]
ERROR: Attempting to operate on hdfs secondarynamenode as root
ERROR: but there is no HDFS_SECONDARYNAMENODE_USER defined. Aborting operation.

but there is no HDFS_NAMENODE_USER defined. Aborting operation._第1张图片

解决方案

vim /etc/profile.d/my_env.sh

内容 :

export HDFS_NAMENODE_USER=root
export HDFS_DATANODE_USER=root
export HDFS_SECONDARYNAMENODE_USER=root
export YARN_RESOURCEMANAGER_USER=root
export YARN_NODEMANAGER_USER=root

but there is no HDFS_NAMENODE_USER defined. Aborting operation._第2张图片

让新的环境变量 PATH 生效

source /etc/profile
sudo /usr/local/sbin/xsync /etc/profile.d/

but there is no HDFS_NAMENODE_USER defined. Aborting operation._第3张图片

你可能感兴趣的:(Hadoop,hdfs,hadoop,big,data)