Hadoop2- YARN - ApplicationMaster UI - Connection refused issue

眉间皱痕 提交于 2021-02-19 05:26:44

问题


I'm getting below issue while accessing ApplicationMaster UI from the RM WebUI (hadoop 2.6.0). There is no standalone WebProxy server running. The Proxy is running as a part of ResourceManager.

"HTTP ERROR 500
Problem accessing /proxy/application_1431357703844_0004/. Reason:
    Connection refused"

Log entries in resourcemanager logs:

2015-05-11 19:25:01,837 INFO  webproxy.WebAppProxyServlet (WebAppProxyServlet.java:doGet(330)) - ubuntu is accessing unchecked http://slave1:51704/ which is the app master GUI of application_1431357703844_0004 owned by ubuntu
2015-05-11 19:25:01,845 WARN  mortbay.log (Slf4jLog.java:warn(76)) - /proxy/application_1431357703844_0004/: java.net.ConnectException: Connection refused

When I do wget of the AppMaster Url from RM, below is the output

ubuntu@resource-manager:/mnt/logs/yarn$ wget -O- "http://slave1:51704/"
--2015-05-11 19:26:47--  http://slave1:51704/
HTTP request sent, awaiting response... 302 Found
Location: http://slave1:51704/mapreduce [following]
--2015-05-11 19:26:47--  http://slave1:51704/mapreduce
HTTP request sent, awaiting response... 302 Found
Location: http://slave1:8088/proxy/application_1431357703844_0004/mapreduce [following]
--2015-05-11 19:26:47--  http://slave1:8088/proxy/application_1431357703844_0004/mapreduce
Connecting to slave1|:8088... failed: Connection refused.

When i do wget of same AppMaster URL from the node where appMaster is running, I got 200 response.

ubuntu@slave1:~$ wget -O- http://slave1:51704/
--2015-05-11 19:31:13--  http://slave1:51704/
Connecting to slave1|:51704... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://slave1:51704/mapreduce [following]
--2015-05-11 19:31:13--  http://slave1:51704/mapreduce
HTTP request sent, awaiting response... 200 OK
Length: 6846 (6.7K) [text/html]

The main difference to note here is, when the request was made from RM, the nodemanager redirected to a different URL "http://slave1:8088/proxy/application_1431357703844_0004/mapreduce" which resulted in "Connection refused". But when the request was made from where NM was running, it didn't redirect to above URL, but resulted in 200 response.

Please help me understand the differential behaviour of redirection and resolve the issue.


回答1:


You can specify the yarn.resourcemanager.webapp.address to your RM's host address in yarn-site.xml on NodeManager device.

<property>
    <name>yarn.resourcemanager.webapp.address</name>
    <value>rm.hostname.com:8088</value>
</property>

not

<property>
    <name>yarn.resourcemanager.webapp.address</name>
    <value>0.0.0.0:8088</value>
</property>


来源:https://stackoverflow.com/questions/30176322/hadoop2-yarn-applicationmaster-ui-connection-refused-issue

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!