ERROR: but there is no HDFS_ZKFC_USER defined. Aborting operation

错误

执行下面命令:

start-dfs.sh

显示错误如下:

ERROR: Attempting to operate on hdfs zkfc as root
ERROR: but there is no HDFS_ZKFC_USER defined. Aborting operation.

解决

在 hadoop-env.sh 文件的 最下面 添加下面配置:

export HDFS_DATANODE_USER=root
export HDFS_NAMENODE_USER=root
export HDFS_JOURNALNODE_USER=root
export HDFS_ZKFC_USER=root

原文出处:/show_1IX26jwDVYgQ.html