你隔壁的小王
2022-02-09 08:07
采纳率: 100%
浏览 82

Hadoop集群搭建时问题

问题遇到的现象和发生背景

我配置完的hadoop集群 想通过脚本运行 但是脚本实在低权限账户里的 运行之后出现报错 前边的报错我加了AUTO 但还是报错

问题相关代码,请勿粘贴截图

#!/bin/bash

if [ $# -lt 1 ]
then
echo "No Args Input..."
exit ;
fi

case $1 in
"start")
echo " =================== 启动 hadoop集群 ==================="

    echo " --------------- 启动 hdfs ---------------"
    ssh hadoop102 "/opt/module/hadoop-3.1.3/sbin/start-dfs.sh"
    echo " --------------- 启动 yarn ---------------"
    ssh hadoop103 "/opt/module/hadoop-3.1.3/sbin/start-yarn.sh"
    echo " --------------- 启动 historyserver ---------------"
    ssh hadoop102 "/opt/module/hadoop-3.1.3/bin/mapred --daemon start historyserver"

;;
"stop")
echo " =================== 关闭 hadoop集群 ==================="

    echo " --------------- 关闭 historyserver ---------------"
    ssh hadoop102 "/opt/module/hadoop-3.1.3/bin/mapred --daemon stop historyserver"
    echo " --------------- 关闭 yarn ---------------"
    ssh hadoop103 "/opt/module/hadoop-3.1.3/sbin/stop-yarn.sh"
    echo " --------------- 关闭 hdfs ---------------"
    ssh hadoop102 "/opt/module/hadoop-3.1.3/sbin/stop-dfs.sh"

;;
*)
echo "Input Args Error..."
;;
esac

运行结果及报错内容

=日aarEaa启动hadoop集群a::AAE--…-----------启动hdfs ---------------
Starting namenodes on [hadoop102]
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 [hadoop104]
ERROR: Attempting to operate on hdfs secondarynamenode as root
ERROR: but there is no HDFS_SECONDARYNAMENODE_USER defined. Aborting operation.------- --------启动yarn ------- -- ----
starting resourcemanager
ERROR: Unable to write in /opt/module/hadoop-3.1.3/logs. Aborting.Starting nodemanagers
hadoop103: ERROR:Unable to write in /opt/module/hadoop-3.1.3/logs. Aborting.hadoop104: ERROR: Unable to write in /opt/module/hadoop-3.1.3/logs.Aborting.hadoop102: ERROR: Unable to write in /opt/module/hadoop-3.1.3/logs. Aborting.------- - -------启动historyserver ---------------
ERROR:Unable to write in /opt/module/hadoop-3.1.3/logs.Aborting.「ai0hadnnn102 bin 1c.

我的解答思路和尝试过的方法

是我前边配置的时候在哪把root和低权限账号弄混了么,我尝试重置集群没有解决,有什么解决办法么

我想要达到的结果

1条回答 默认 最新

相关推荐 更多相似问题