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

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条回答

      报告相同问题?

      相关推荐 更多相似问题

      问题事件

      • 系统已结题 2月21日
      • 已采纳回答 2月13日
      • 创建了问题 2月9日

      悬赏问题

      • ¥15 请问这个脚本bat清除tmp文件,会导致硬盘文件损坏吗?(操作系统-windows)
      • ¥15 IncredBuild报错
      • ¥15 锂电池偏最小二乘法参数辩识
      • ¥20 有偿求 matlab解GP方程程序
      • ¥15 session失效问题
      • ¥15 GMS地下水数值模拟无法打开
      • ¥15 树型结构的数据怎么匹配分支
      • ¥15 stm32F4用.引不出来结构体成员怎么解决
      • ¥30 Syntax Error: TypeError: this.getOptions is not a function的问题
      • ¥15 eclipse Android环境搭建