[root@hadoop01 etc]# stop-dfs.sh
WARNING: HADOOP_SECURE_DN_USER has been replaced by HDFS_DATANODE_SECURE_USER. Using value of HADOOP_SECURE_DN_USER.
Stopping namenodes on [hadoop01 hadoop02 hadoop03]
Stopping datanodes
Stopping journal nodes [hadoop03 hadoop02 hadoop01]
ERROR: Attempting to operate on hdfs journalnode as root
ERROR: but there is no HDFS_JOURNALNODE_USER defined. Aborting operation.
Stopping ZK Failover Controllers on NN hosts [hadoop01 hadoop02 hadoop03]
ERROR: Attempting to operate on hdfs zkfc as root
ERROR: but there is no HDFS_ZKFC_USER defined. Aborting operation.
在搭建hadoop-HA高可用性集群,搭建完成启动测试时报如上的错误,我的解决方案是:
在sbin目录下编辑start-dfs.sh和stop-dfs.sh脚本,增加如下字段:
HDFS_JOURNALNODE_USER=root
HDFS_ZKFC_USER=root
同步至集群:
xsync sbin
重新启动:start-dfs.sh
[root@hadoop01 sbin]# start-dfs.sh
WA