HADOOP 3.2.1,的HA,装好之后,测试wordcount程序时报下面的错误
For more detailed output, check the application tracking page: http://hadoop102:8088/cluster/app/application_1590917926429_0002 Then click on links to logs of each attempt.
. Failing the application.
2020-05-31 17:44:08,998 INFO org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMAppImpl: application_1590917926429_0002 State change from FINAL_SAVING to FAILED on event = APP_UPDATE_SAVED
2020-05-31 17:44:08,998 WARN org.apache.hadoop.yarn.server.resourcemanager.RMAuditLogger: USER=deploy OPERATION=Application Finished - Failed TARGET=RMAppManager RESULT=FAILURE DESCRIPTION=App failed with state: FAILED PERMISSIONS=Application application_1590917926429_0002 failed 2 times due to AM Container for appattempt_1590917926429_0002_000002 exited with exitCode: 1
Failing this attempt.Diagnostics: [2020-05-31 17:44:08.952]Exception from container-launch.
Container id: container_e31_1590917926429_0002_02_000001
Exit code: 1
[2020-05-31 17:44:08.959]Container exited with a non-zero exit code 1. Error file: prelaunch.err.
Last 4096 bytes of prelaunch.err :
Last 4096 bytes of stderr :
log4j:WARN No appenders could be found for logger (org.apache.hadoop.mapreduce.v2.app.MRAppMaster).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
[2020-05-31 17:44:08.961]Container exited with a non-zero exit code 1. Error file: prelaunch.err.
Last 4096 bytes of prelaunch.err :
Last 4096 bytes of stderr :
log4j:WARN No appenders could be found for logger (org.apache.hadoop.mapreduce.v2.app.MRAppMaster).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
终极解决方案是修改yarn-site.xml,增加如下配置
<!--新版本指定文件-->
<property>
<name>yarn.resourcemanager.webapp.address.rm1</name>
<value>hadoop102</value>
</property>
<property>
<name>yarn.resourcemanager.scheduler.address.rm2</name>
<value>hadoop103</value>
</property>
<property>
<name>yarn.resourcemanager.webapp.address.rm2</name>
<value>hadoop103</value>
</property>
重启yarn,hdfs再测试,搞定。