When starting yarn, resourcemanager failed to start

Problem Description

After using sbin/start-yarn.shstart yarn, and then use jpsto view the process, it is found that only Notemanager is started, but resourcemanager is not started.
The code looks like this:

[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


Cause Analysis:

Check the log file first. The location of the log file for starting resourcemanager is shown in the red box in the figure below. Change the suffix .out to .log to get the log file.
log

#查看日志
cat /home/hadoop/app/hadoop-2.6.0-cdh5.10.0/logs/yarn-hadoop-resourcemanager-hadoop-01.log

mistake

The reason for the error found in the log is: yarn.resourcemanager.zk-address is not set, the problem should be that yarn.resourcemanager.zk-address is not found in the configuration file of yarn

solution:

Open the yarn configuration file yarn-site.xml, and find the configuration section as shown in the figure below:
configuration file
Change hadoop.zk.addressto yarn.resourcemanager.zk-address
and then restart yarn, and find that the resourcemanager process already exists.
problem solved

Guess you like

Origin blog.csdn.net/bragen/article/details/129028099