问题描述
使用sbin/start-yarn.sh
启动yarn后,再使用jps
查看进程,发现只有Notemanager启动了,而resourcemanager没有启动。
代码如下所示:
[hadoop@hadoop-01 hadoop]$ sbin/start-yarn.sh
starting yarn daemons
starting resourcemanager, logging to /home/hadoop/app/hadoop-2.6.0-cdh5.10.0/logs/yarn-hadoop-resourcemanager-hadoop-01.out
hadoop-01: starting nodemanager, logging to /home/hadoop/app/hadoop-2.6.0-cdh5.10.0/logs/yarn-hadoop-nodemanager-hadoop-01.out
hadoop-02: starting nodemanager, logging to /home/hadoop/app/hadoop-2.6.0-cdh5.10.0/logs/yarn-hadoop-nodemanager-hadoop-02.out
hadoop-03: starting nodemanager, logging to /home/hadoop/app/hadoop-2.6.0-cdh5.10.0/logs/yarn-hadoop-nodemanager-hadoop-03.out
[hadoop@hadoop-01 hadoop]$ jps
15824 Jps
2241 QuorumPeerMain
13461 NameNode
14054 DFSZKFailoverController
13575 DataNode
13771 JournalNode
15691 NodeManager
原因分析:
先查看日志文件,启动resourcemanager的日志文件的位置如下图红框所示,将后缀.out改为.log就是日志文件。
#查看日志
cat /home/hadoop/app/hadoop-2.6.0-cdh5.10.0/logs/yarn-hadoop-resourcemanager-hadoop-01.log
在日志中发现错误原因是:yarn.resourcemanager.zk-address is not set,问题应该是在yarn的配置文件中没有找到yarn.resourcemanager.zk-address文章来源:https://www.toymoban.com/news/detail-513078.html
解决方案:
打开yarn的配置文件yarn-site.xml,找到如下图所示的配置段:
将hadoop.zk.address
改为yarn.resourcemanager.zk-address
随后重新启动yarn,发现resourcemanager进程已经存在。
文章来源地址https://www.toymoban.com/news/detail-513078.html
到了这里,关于启动yarn时,resourcemanager启动失败的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!