当前位置:   article > 正文

but there is no HDFS_NAMENODE_USER defined. Aborting operation.

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.

在这里插入图片描述

解决方案

vim /etc/profile.d/my_env.sh
  • 1

内容 :

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
  • 1
  • 2
  • 3
  • 4
  • 5

在这里插入图片描述

让新的环境变量 PATH 生效

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

在这里插入图片描述

声明:本文内容由网友自发贡献,转载请注明出处:【wpsshop博客】
推荐阅读
相关标签
  

闽ICP备14008679号