{"id":98010,"date":"2026-08-30T22:24:51","date_gmt":"2026-08-30T14:24:51","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/98010.html"},"modified":"2026-08-30T22:24:51","modified_gmt":"2026-08-30T14:24:51","slug":"hadoop-yarn-%e4%bb%bb%e5%8a%a1%e5%a4%b1%e8%b4%a5%e6%8e%92%e6%9f%a5%e6%8c%87%e5%8d%97%ef%bc%9a%e4%bb%8e%e5%ae%9a%e4%bd%8d%e5%88%b0%e8%a7%a3%e5%86%b3","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/98010.html","title":{"rendered":"Hadoop YARN \u4efb\u52a1\u5931\u8d25\u6392\u67e5\u6307\u5357\uff1a\u4ece\u5b9a\u4f4d\u5230\u89e3\u51b3"},"content":{"rendered":"<p>\u4efb\u52a1\u7c7b\u578b&#xff1a;MapReduce\u3001Spark\u3001Hive on MR\u3001Spark\u2011SQL&#xff1b;\u8fd0\u884c\u5728 YARN \u4e0a\u3002<\/p>\n<p>\u6838\u5fc3\u601d\u8def&#xff1a;\u5148\u770b\u4efb\u52a1\u72b6\u6001 \u2192 \u770b YARN \u65e5\u5fd7 \u2192 \u770b\u5177\u4f53\u5f02\u5e38\u6808 \u2192 \u533a\u5206\u8d44\u6e90\u95ee\u9898 \/ \u4ee3\u7801\u903b\u8f91 \/ \u96c6\u7fa4\u5e95\u5c42\u95ee\u9898\u3002<\/p>\n<h3>\u4e00\u3001\u7b2c\u4e00\u6b65&#xff1a;YARN WebUI \u521d\u6b65\u5b9a\u4f4d&#xff08;\u6700\u4f18\u5148&#xff09;<\/h3>\n<p>\u8bbf\u95ee ResourceManager WebUI&#xff0c;\u67e5\u770b\u5931\u8d25\u4efb\u52a1&#xff08;Failed \u72b6\u6001&#xff09;\u3002<\/p>\n<li>\u67e5\u770bApplication ID&#xff0c;\u8bb0\u5f55 application_xxxx\u3002<\/li>\n<li>\u67e5\u770b\u6700\u7ec8\u72b6\u6001&#xff1a;\n<ul>\n<li>FINISHED&#xff1a;\u6b63\u5e38\u7ed3\u675f\u3002<\/li>\n<li>FAILED&#xff1a;\u4efb\u52a1\u81ea\u8eab\u4ee3\u7801\u5f02\u5e38\u3002<\/li>\n<li>KILLED&#xff1a;\u88ab\u4eba\u4e3a\u6740\u6b7b&#xff0c;\u6216\u8d44\u6e90\u62a2\u5360\u3001\u8d85\u65f6\u3001\u5185\u5b58\u8d85\u4e86\u88ab NM \u6740\u6389\u3002<\/li>\n<li>SUBMITTED&#xff1a;\u8fd8\u6ca1\u5206\u914d\u8d44\u6e90\u3002<\/li>\n<li>ACCEPTED&#xff1a;\u5df2\u7ecf\u63a5\u6536&#xff0c;\u7b49\u5f85\u8d44\u6e90\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\u67e5\u770b\u5931\u8d25\u539f\u56e0\u6458\u8981&#xff1a;UI \u4e0a\u4f1a\u5c55\u793a\u7b80\u5355 message\u3002<\/li>\n<p>\u533a\u5206&#xff1a;<\/p>\n<ul>\n<li>Application \u5931\u8d25&#xff1a;\u6574\u4e2a\u4f5c\u4e1a\u6302\u6389\u3002<\/li>\n<li>Application \u6210\u529f&#xff0c;\u4f46\u90e8\u5206 Task \u5931\u8d25&#xff1a;map task \/ reduce task \/ spark task \u5931\u8d25&#xff0c;\u4efb\u52a1\u4f1a\u91cd\u8bd5&#xff0c;\u91cd\u8bd5\u8017\u5c3d\u540e\u4f5c\u4e1a\u5931\u8d25\u3002<\/li>\n<\/ul>\n<h3>\u4e8c\u3001\u533a\u5206\u662f Application \u88ab KILL&#xff0c;\u8fd8\u662f FAILED<\/h3>\n<h4>1&#xff09;\u72b6\u6001\u4e3a KILLED<\/h4>\n<p>\u5e38\u89c1\u539f\u56e0&#xff1a;<\/p>\n<li>\u4eba\u4e3a\u6267\u884c yarn application -kill appId\u3002<\/li>\n<li>AM&#xff08;ApplicationMaster&#xff09;\u5185\u5b58\u6ea2\u51fa OOM&#xff0c;NodeManager \u628a\u5bb9\u5668\u6740\u6389\u3002<\/li>\n<li>\u8d44\u6e90\u62a2\u5360&#xff1a;\u961f\u5217\u8d44\u6e90\u4e0d\u8db3&#xff0c;YARN \u62a2\u5360\u5bb9\u5668\u3002<\/li>\n<li>AM \u8d85\u65f6\u5931\u8054&#xff1a;AM \u957f\u65f6\u95f4\u6ca1\u6709\u5411 RM \u5fc3\u8df3&#xff0c;\u8d85\u65f6\u88ab kill\u3002<\/li>\n<li>\u78c1\u76d8\u8d85\u51fa\u9608\u503c&#xff1a;NodeManager \u672c\u5730\u78c1\u76d8\u4f7f\u7528\u7387\u8fc7\u9ad8&#xff0c;\u6740\u6389\u5bb9\u5668\u3002<\/li>\n<h4>2&#xff09;\u72b6\u6001\u4e3a FAILED<\/h4>\n<p>\u4e1a\u52a1\u4ee3\u7801\u3001\u6570\u636e\u3001\u903b\u8f91\u3001Shuffle \u5f02\u5e38&#xff0c;\u770b\u65e5\u5fd7\u91cc\u7684 Exception \u5806\u6808\u3002<\/p>\n<h3>\u4e09\u3001\u83b7\u53d6\u65e5\u5fd7&#xff08;\u5173\u952e\u64cd\u4f5c&#xff09;<\/h3>\n<h4>\u65b9\u5f0f 1&#xff1a;\u547d\u4ee4\u884c\u6293\u53d6\u65e5\u5fd7&#xff08;\u751f\u4ea7\u6700\u5e38\u7528&#xff09;<\/h4>\n<p># \u83b7\u53d6\u6574\u4e2a application \u5168\u90e8\u65e5\u5fd7<br \/>\nyarn logs -applicationId application_xxxxxx &gt; app.log<br \/>\n\u53ea\u770b AM \u65e5\u5fd7&#xff08;\u4f18\u5148\u770b AM&#xff0c;AM \u662f\u4f5c\u4e1a\u7ba1\u7406\u8005&#xff09;<br \/>\nyarn logs -applicationId application_xxxxxx -am &gt; am.log<\/p>\n<p>AM \u65e5\u5fd7&#xff1a;\u4f5c\u4e1a\u7684\u5165\u53e3&#xff0c;\u80fd\u770b\u5230\u4f5c\u4e1a\u7684\u6574\u4f53\u62a5\u9519\u3001\u914d\u7f6e\u3001\u521d\u59cb\u5316\u5f02\u5e38\u3002\u5982\u679c\u53ea\u662f\u4e2a\u522b task \u5931\u8d25&#xff0c;\u9700\u8981\u770b\u5177\u4f53 Container \u65e5\u5fd7\u3002<\/p>\n<h4>\u65b9\u5f0f 2&#xff1a;WebUI \u70b9\u51fb logs \u94fe\u63a5&#xff0c;\u76f4\u63a5\u6d4f\u89c8\u5668\u67e5\u770b\u5bb9\u5668\u65e5\u5fd7<\/h4>\n<p>\u6ce8\u610f&#xff1a;\u5bb9\u5668\u5b8c\u6210\u540e&#xff0c;\u65e5\u5fd7\u805a\u5408\u5f00\u542f\u624d\u53ef\u4ee5\u770b&#xff1b;\u6ca1\u6709\u5f00\u542f\u65e5\u5fd7\u805a\u5408&#xff0c;\u5bb9\u5668\u9500\u6bc1\u65e5\u5fd7\u5c31\u4e22\u5931\u3002\u914d\u7f6e&#xff1a;yarn.log\u2011aggregation\u2011enable&#061;true<\/p>\n<h3>\u56db\u3001\u5206\u5c42\u6392\u67e5&#xff0c;\u6309\u987a\u5e8f<\/h3>\n<h4>\u7b2c\u4e00\u5c42&#xff1a;AM \u65e5\u5fd7&#xff08;ApplicationMaster&#xff09;<\/h4>\n<p>\u5148\u770b AM&#xff0c;\u5224\u65ad\u662f\u4f5c\u4e1a\u521d\u59cb\u5316\u5931\u8d25&#xff0c;\u8fd8\u662f task \u8fd0\u884c\u9636\u6bb5\u5931\u8d25\u3002<\/p>\n<ul>\n<li>\u5982\u679c AM \u76f4\u63a5\u62a5\u9519\u9000\u51fa&#xff1a;\u4f5c\u4e1a\u8fd8\u6ca1\u5f00\u59cb\u8dd1 task \u5c31\u5931\u8d25\u3002\u5e38\u89c1&#xff1a;jar \u5305\u7f3a\u5931\u3001\u7c7b\u51b2\u7a81\u3001\u53c2\u6570\u9519\u8bef\u3001\u6743\u9650\u3001\u961f\u5217\u4e0d\u5b58\u5728\u3002<\/li>\n<li>AM \u6b63\u5e38\u8fd0\u884c&#xff0c;\u662f\u90e8\u5206 Container Task \u5931\u8d25&#xff1a;\u9700\u8981\u770b\u5bf9\u5e94 Container \u65e5\u5fd7\u3002<\/li>\n<\/ul>\n<h4>\u7b2c\u4e8c\u5c42&#xff1a;Container&#xff08;Map\/Reduce\/Spark Task&#xff09;\u65e5\u5fd7<\/h4>\n<p>\u4e00\u4e2a Container \u5bf9\u5e94\u4e00\u4e2a task&#xff0c;stdout\u3001stderr \u65e5\u5fd7\u3002\u91cd\u70b9\u770b stderr&#xff0c;\u5f02\u5e38\u5806\u6808\u6253\u5370\u5728\u8fd9\u91cc\u3002<\/p>\n<p>\u5e38\u89c1\u5f02\u5e38\u5206\u7c7b&#xff1a;<\/p>\n<h4>\u2460 \u5185\u5b58\u76f8\u5173&#xff08;\u6700\u9ad8\u9891&#xff09;<\/h4>\n<p>1. Container is running beyond memory limits<\/p>\n<p>Container \u8d85\u51fa\u5206\u914d\u7684\u5185\u5b58\u4e0a\u9650&#xff0c;\u88ab NodeManager \u76f4\u63a5\u6740\u6b7b\u3002<\/p>\n<ul>\n<li>\u4e24\u79cd\u5185\u5b58&#xff1a;\u7269\u7406\u5185\u5b58\u3001\u865a\u62df\u5185\u5b58\u3002<\/li>\n<li>\u5e38\u89c1\u539f\u56e0&#xff1a;\u6570\u636e\u503e\u659c\u5bfc\u81f4\u5355\u4e2a task \u5904\u7406\u7684\u6570\u636e\u91cf\u8fc7\u5927&#xff1b;\u5185\u5b58\u53c2\u6570\u8bbe\u7f6e\u8fc7\u5c0f&#xff1b;\u4ee3\u7801\u4e2d\u5b58\u5728\u5927\u5bf9\u8c61\u3002<\/li>\n<li>\u5904\u7406\u65b9\u5f0f&#xff1a;\u8c03\u5927 map\/reduce\/spark executor \u5185\u5b58&#xff1b;\u6392\u67e5\u6570\u636e\u503e\u659c&#xff1b;\u4f18\u5316\u4ee3\u7801\u3002<\/li>\n<\/ul>\n<p>2. java.lang.OutOfMemoryError&#xff1a;OOM \u5806\u5185\u5b58\u6ea2\u51fa&#xff0c;\u9700\u8981\u533a\u5206\u662f AM OOM \u8fd8\u662f task OOM\u3002<\/p>\n<p>AM OOM \u662f ApplicationMaster \u8fdb\u7a0b\u5185\u5b58\u6ea2\u51fa\u3002AM \u662f\u6574\u4e2a\u4f5c\u4e1a\u7684\u8c03\u5ea6\u8fdb\u7a0b&#xff0c;\u4e00\u4e2a job \u53ea\u6709\u4e00\u4e2a AM&#xff0c;\u4e00\u65e6\u53d1\u751f OOM&#xff0c;\u6574\u4e2a job \u4f1a\u76f4\u63a5\u5931\u8d25\u3002\u8fd9\u79cd\u60c5\u51b5\u5927\u591a\u662f task \u6570\u91cf\u8fc7\u591a&#xff0c;AM \u9700\u8981\u7ef4\u62a4\u5927\u91cf\u4efb\u52a1\u5143\u6570\u636e&#xff0c;\u6700\u7ec8\u6491\u7206\u5806\u5185\u5b58\u3002<\/p>\n<p>\u5904\u7406&#xff1a;\u8c03\u5927 AM \u5bb9\u5668\u5185\u5b58\u4e0e JVM \u5806&#xff1b;\u4f18\u5148\u5408\u5e76\u5c0f\u6587\u4ef6\u4ee5\u51cf\u5c11 task \u603b\u6570&#xff0c;\u4e0d\u80fd\u53ea\u5355\u7eaf\u52a0\u5927\u5185\u5b58\u3002<\/p>\n<p>yarn.app.mapreduce.am.resource.mb&#061;4096<br \/>\nyarn.app.mapreduce.am.java.opts&#061;-Xmx3072m<\/p>\n<p>Task OOM \u662f Map \u6216 Reduce \u8ba1\u7b97\u4efb\u52a1\u53d1\u751f OOM&#xff0c;\u8d1f\u8d23\u5b9e\u9645\u7684\u6570\u636e\u8ba1\u7b97\u3002\u4e00\u822c\u662f\u4e2a\u522b task \u62a5\u9519&#xff0c;\u4f1a\u81ea\u52a8\u91cd\u8bd5&#xff0c;\u591a\u6b21\u5931\u8d25\u540e\u624d\u4f1a\u5bfc\u81f4 job \u5931\u8d25\u3002\u5e38\u89c1\u539f\u56e0\u662f\u5355\u4efb\u52a1\u6570\u636e\u91cf\u5927\u3001\u6570\u636e\u503e\u659c\u3002<\/p>\n<p>\u5904\u7406&#xff1a;\u8c03\u5927\u5bf9\u5e94 map\/reduce \u5185\u5b58&#xff1b;\u68c0\u67e5\u662f\u5426\u5b58\u5728\u6570\u636e\u503e\u659c&#xff0c;\u589e\u52a0 reduce \u5e76\u884c\u5ea6\u3001\u5bf9\u70ed\u70b9 key \u6253\u6563&#xff0c;\u5408\u5e76\u5c0f\u6587\u4ef6\u3002<\/p>\n<p>\u8be6\u89e3&#xff1a;Map Task OOM\u3001Reduce Task OOM<\/p>\n<p>1&#xff09;Map Task OOM<\/p>\n<p>\u539f\u56e0&#xff1a;\u5355\u4e2a\u5206\u7247\u6570\u636e\u8fc7\u5927&#xff0c;\u8bfb\u53d6\u6570\u636e\u65f6\u52a0\u8f7d\u4e86\u5927\u91cf\u5bf9\u8c61&#xff1b;\u5c0f\u6587\u4ef6\u5408\u5e76\u4e0d\u5230\u4f4d\u3002<\/p>\n<p>\u5904\u7406&#xff1a;<\/p>\n<ul>\n<li>\u8c03\u5927 map \u5185\u5b58&#xff1a;mapreduce.map.memory.mb&#xff0c;\u540c\u65f6\u8c03\u5927 -Xmx\u3002<\/li>\n<li>\u5408\u5e76\u5c0f\u6587\u4ef6&#xff0c;\u63a7\u5236\u6bcf\u4e2a map \u5904\u7406\u7684\u6570\u636e\u91cf&#xff0c;\u907f\u514d\u5355\u4e2a map \u5904\u7406\u8d85\u5927\u6587\u4ef6\u3002<\/li>\n<\/ul>\n<p>2&#xff09;Reduce Task OOM&#xff08;\u5c24\u5176\u6570\u636e\u503e\u659c&#xff09;<\/p>\n<p>\u6700\u5e38\u89c1\u7684\u662f\u6570\u636e\u503e\u659c&#xff1a;\u67d0\u4e00\u4e2a reduce key \u7684\u6570\u636e\u91cf\u5de8\u5927&#xff0c;\u5168\u90e8\u52a0\u8f7d\u8fdb\u5185\u5b58\u805a\u5408&#xff0c;\u76f4\u63a5\u5bfc\u81f4 OOM\u3002<\/p>\n<p>\u5904\u7406\u6b65\u9aa4&#xff1a;<\/p>\n<li>\u8c03\u5927 reduce \u5bb9\u5668\u5185\u5b58\u548c\u5806\n<p>mapreduce.reduce.memory.mb&#061;8192<br \/>\nmapreduce.reduce.java.opts&#061;-Xmx6144m\n<\/li>\n<li>\u6392\u67e5\u6570\u636e\u503e\u659c&#xff1a;\u67e5\u770b Counter&#xff08;\u8ba1\u6570\u5668&#xff09;&#xff0c;\u89c2\u5bdf\u6bcf\u4e2a reduce \u5904\u7406\u7684\u6570\u636e\u91cf&#xff0c;\u5b9a\u4f4d\u70ed\u70b9 key\u3002<\/li>\n<li>\u89e3\u51b3\u65b9\u6848&#xff1a;\n<ul>\n<li>\u5f00\u542f MapReduce \u6570\u636e\u503e\u659c\u4f18\u5316&#xff1b;<\/li>\n<li>\u5bf9\u70ed\u70b9 key \u52a0\u76d0\u6253\u6563&#xff0c;\u8fdb\u884c\u4e8c\u6b21\u805a\u5408&#xff1b;<\/li>\n<li>\u8c03\u5927 reduce \u5e76\u884c\u5ea6&#xff0c;\u589e\u52a0 reduce \u6570\u91cf\u4ee5\u5206\u644a\u6570\u636e\u3002<\/li>\n<\/ul>\n<\/li>\n<li>shuffle \u9636\u6bb5\u6ea2\u5199\u53c2\u6570\u4f18\u5316&#xff1a;\u8c03\u5927\u6ea2\u5199\u9608\u503c&#xff0c;\u51cf\u5c11\u5185\u5b58\u538b\u529b\u3002<\/li>\n<p>Task OOM \u5e94\u4f18\u5148\u6392\u67e5\u6570\u636e\u503e\u659c&#xff0c;\u4e0d\u8981\u4e00\u4e0a\u6765\u5c31\u65e0\u8111\u5806\u5185\u5b58\u3002<\/p>\n<h4>\u2461 \u6570\u636e \/ \u4e1a\u52a1\u903b\u8f91\u5f02\u5e38<\/h4>\n<ul>\n<li>NullPointerException&#xff1a;NPE \u7a7a\u6307\u9488&#xff0c;\u5c5e\u4e8e\u4e1a\u52a1\u4ee3\u7801 bug\u3002<\/li>\n<li>ArrayIndexOutOfBounds&#xff1a;\u6570\u7ec4\u8d8a\u754c\u3002<\/li>\n<li>\u6570\u636e\u683c\u5f0f\u5f02\u5e38&#xff1a;Hive \u8bfb\u53d6\u810f\u6570\u636e\u3001\u7c7b\u578b\u8f6c\u6362\u5f02\u5e38\u3001\u5b57\u7b26\u4e32\u8f6c\u6570\u5b57\u5931\u8d25\u3002<\/li>\n<li>\u5e8f\u5217\u5316\u5f02\u5e38&#xff1a;\u5e8f\u5217\u5316 \/ \u53cd\u5e8f\u5217\u5316\u62a5\u9519\u3002<\/li>\n<\/ul>\n<h4>\u2462 Shuffle \u76f8\u5173\u5931\u8d25&#xff08;MR\u3001Spark&#xff09;<\/h4>\n<ul>\n<li>\u62c9\u53d6 shuffle \u6570\u636e\u5931\u8d25&#xff1a;Failed to fetch map output\u3002\u539f\u56e0&#xff1a;DataNode \u6302\u6389\u3001\u7f51\u7edc\u6296\u52a8\u3001\u78c1\u76d8 IO \u8fc7\u9ad8\u3001shuffle \u6570\u636e\u78c1\u76d8\u6ee1\u3002<\/li>\n<li>Shuffle \u6587\u4ef6\u635f\u574f\u3002<\/li>\n<li>\u5927\u91cf fetch \u5931\u8d25&#xff0c;\u4efb\u52a1\u91cd\u8bd5\u8fbe\u5230\u4e0a\u9650&#xff0c;\u4f5c\u4e1a\u5931\u8d25\u3002<\/li>\n<\/ul>\n<h4>\u2463 HDFS \u8bfb\u5199\u5f02\u5e38<\/h4>\n<ul>\n<li>FileNotFound&#xff1a;\u6587\u4ef6\u4e0d\u5b58\u5728&#xff0c;\u8f93\u5165\u8def\u5f84\u88ab\u5220\u9664&#xff0c;\u8def\u5f84\u5199\u9519\u3002<\/li>\n<li>\u6743\u9650\u5f02\u5e38&#xff1a;Permission denied&#xff0c;\u7528\u6237\u6ca1\u6709\u8bfb \/ \u5199 HDFS \u76ee\u5f55\u6743\u9650\u3002<\/li>\n<li>HDFS \u96c6\u7fa4\u5f02\u5e38&#xff1a;DN \u5b95\u673a&#xff0c;\u5757\u635f\u574f&#xff0c;\u78c1\u76d8\u6ee1\u3002<\/li>\n<\/ul>\n<h4>\u2464 \u672c\u5730\u78c1\u76d8&#xff08;NodeManager \u672c\u5730\u76ee\u5f55&#xff09;\u95ee\u9898<\/h4>\n<p>YARN \u5bb9\u5668\u4f1a\u5199\u672c\u5730\u78c1\u76d8&#xff08;nm\u2011local\u2011dirs&#xff09;&#xff0c;shuffle \u4e2d\u95f4\u6570\u636e\u5199\u8fd9\u91cc&#xff01;\u62a5\u9519&#xff1a;No space left on device&#xff0c;NodeManager \u672c\u5730\u78c1\u76d8\u6ee1&#xff0c;task \u5199 shuffle \u5931\u8d25\u3002<\/p>\n<p>\u6ce8\u610f&#xff1a;\u4e0d\u662f HDFS \u78c1\u76d8&#xff01;\u662f YARN \u8282\u70b9\u673a\u5668\u672c\u5730\u78c1\u76d8\u3002<\/p>\n<h4>\u2465 \u8d44\u6e90\u961f\u5217\u95ee\u9898<\/h4>\n<ul>\n<li>\u961f\u5217\u5bb9\u91cf\u5df2\u6ee1&#xff0c;\u62ff\u4e0d\u5230\u8d44\u6e90&#xff0c;\u4efb\u52a1\u4e00\u76f4 ACCEPTED&#xff0c;\u6700\u540e\u8d85\u65f6\u5931\u8d25\u3002<\/li>\n<li>\u7528\u6237\u6ca1\u6709\u8be5\u961f\u5217\u63d0\u4ea4\u6743\u9650\u3002<\/li>\n<li>\u6700\u5927\u5e76\u53d1\u4efb\u52a1\u6570\u9650\u5236\u3002<\/li>\n<\/ul>\n<h3>\u4e94\u3001\u8f85\u52a9\u6392\u67e5\u547d\u4ee4<\/h3>\n<p># \u67e5\u770b yarn \u961f\u5217\u8d44\u6e90<br \/>\nyarn queue -status \u961f\u5217\u540d<br \/>\n# \u67e5\u770b\u96c6\u7fa4\u8282\u70b9\u72b6\u6001&#xff0c;\u662f\u5426\u6709\u8282\u70b9 UNHEALTHY \u4e0d\u5065\u5eb7<br \/>\nyarn node -list -all<br \/>\n# \u67e5\u770b HDFS \u72b6\u6001&#xff0c;\u662f\u5426\u6709\u635f\u574f\u5757<br \/>\nhdfs fsck \/<br \/>\n# \u67e5\u770b NodeManager \u5065\u5eb7\u72b6\u6001&#xff1a;UNHEALTHY \u4ee3\u8868\u672c\u5730\u78c1\u76d8\u6ee1\/\u6545\u969c&#xff0c;\u8be5\u8282\u70b9\u4e0d\u518d\u5206\u914d\u5bb9\u5668<br \/>\nyarn node -list -all<\/p>\n<p>NodeManager \u72b6\u6001\u53d8\u6210 unhealthy&#xff1a;\u672c\u673a\u591a\u5757\u672c\u5730\u78c1\u76d8\u6545\u969c \/ \u78c1\u76d8\u6ee1&#xff0c;\u8be5\u8282\u70b9\u4e0d\u63a5\u6536\u65b0\u5bb9\u5668\u3002<\/p>\n<h3>\u516d\u3001\u9ad8\u9891\u73b0\u8c61\u603b\u7ed3<\/h3>\n<li>\u4efb\u52a1\u4e00\u76f4 ACCEPTED&#xff0c;\u4e0d\u8fd0\u884c&#xff1a;\u961f\u5217\u8d44\u6e90\u8017\u5c3d&#xff0c;\u6ca1\u6709\u53ef\u7528\u8d44\u6e90&#xff1b;NodeManager \u5168\u90e8\u4e0d\u5065\u5eb7&#xff1b;\u6807\u7b7e\u8d44\u6e90\u4e0d\u5339\u914d\u3002<\/li>\n<li>\u90e8\u5206 task \u5931\u8d25&#xff0c;\u5927\u90e8\u5206 task \u6210\u529f&#xff0c;\u91cd\u8bd5\u51e0\u6b21\u540e\u4f5c\u4e1a\u5931\u8d25&#xff1a;\u4f18\u5148\u6000\u7591\u6570\u636e\u503e\u659c\u3001\u5355 task \u6570\u636e\u91cf\u8fc7\u5927 OOM\u3001\u810f\u6570\u636e\u3001shuffle \u8bfb\u53d6\u5931\u8d25\u3002<\/li>\n<li>\u4e00\u63d0\u4ea4\u76f4\u63a5\u5931\u8d25&#xff0c;\u6ca1\u6709\u4efb\u4f55 map\/reduce task \u8fd0\u884c&#xff1a;\u770b AM \u65e5\u5fd7&#xff0c;\u68c0\u67e5 jar \u5305\u3001\u7c7b\u4e0d\u5b58\u5728\u3001\u53c2\u6570\u9519\u8bef\u3001\u8def\u5f84\u9519\u8bef\u3001\u6743\u9650\u3002<\/li>\n<li>Container killed by NodeManager&#xff1a;\u7edd\u5927\u591a\u6570\u662f\u5185\u5b58\u8d85\u9650&#xff1b;\u5176\u6b21\u662f NM \u672c\u5730\u78c1\u76d8\u6ee1&#xff0c;\u8282\u70b9\u4e0d\u5065\u5eb7\u3002<\/li>\n<h3>\u4e03\u3001\u7cbe\u7b80\u7248<\/h3>\n<p>YARN \u4e0a\u4efb\u52a1\u5931\u8d25\u6392\u67e5\u6b65\u9aa4&#xff1a;<\/p>\n<li>\u8bbf\u95ee RM WebUI&#xff0c;\u62ff\u5230 applicationId&#xff0c;\u89c2\u5bdf\u4f5c\u4e1a\u72b6\u6001\u662f FAILED \u8fd8\u662f KILLED\u3002<\/li>\n<li>\u4f18\u5148\u67e5\u770b AM \u65e5\u5fd7&#xff0c;\u5224\u65ad\u662f\u4f5c\u4e1a\u521d\u59cb\u5316\u9636\u6bb5\u5931\u8d25&#xff0c;\u8fd8\u662f Task \u8fd0\u884c\u9636\u6bb5\u5931\u8d25\u3002<\/li>\n<li>\u5982\u679c\u662f Task \u5931\u8d25&#xff0c;\u67e5\u770b\u5bf9\u5e94 Container stderr \u65e5\u5fd7&#xff0c;\u6293\u53d6\u5f02\u5e38\u5806\u6808\u3002<\/li>\n<li>\u5f52\u7c7b\u95ee\u9898&#xff1a;\n<ul>\n<li>\u5bb9\u5668\u88ab KILL&#xff1a;\u5185\u5b58\u8d85\u9650\u5236 OOM\u3001NM \u672c\u5730\u78c1\u76d8\u6ee1\u3001\u8d44\u6e90\u62a2\u5360\u3001AM \u5fc3\u8df3\u8d85\u65f6\u3002<\/li>\n<li>FAILED&#xff1a;\u4e1a\u52a1\u4ee3\u7801 bug\u3001\u810f\u6570\u636e\u3001\u5e8f\u5217\u5316\u5f02\u5e38\u3002<\/li>\n<li>Shuffle \u62a5\u9519&#xff1a;\u7f51\u7edc\u3001\u78c1\u76d8 IO\u3001\u8282\u70b9\u6545\u969c\u3002<\/li>\n<li>HDFS \u62a5\u9519&#xff1a;\u8def\u5f84\u3001\u6743\u9650\u3001\u5757\u635f\u574f\u3001\u78c1\u76d8\u6ee1\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\u8f85\u52a9\u68c0\u67e5 YARN \u8282\u70b9\u5065\u5eb7\u72b6\u6001\u3001\u961f\u5217\u8d44\u6e90\u3001HDFS \u96c6\u7fa4\u72b6\u6001\u3002<\/li>\n<h3>\u8865\u5145\u8e29\u5751\u70b9<\/h3>\n<li>\u65e5\u5fd7\u805a\u5408\u6ca1\u5f00\u542f&#xff0c;\u5bb9\u5668\u9500\u6bc1\u540e\u65e5\u5fd7\u4e22\u5931&#xff0c;\u65e0\u6cd5\u6392\u67e5&#xff1b;\u751f\u4ea7\u5fc5\u987b\u5f00\u542f\u65e5\u5fd7\u805a\u5408\u3002<\/li>\n<li>\u533a\u5206\u4e24\u5957\u78c1\u76d8&#xff1a;\n<ul>\n<li>HDFS \u78c1\u76d8&#xff1a;DataNode \u5b58\u50a8\u4e1a\u52a1\u6570\u636e\u3002<\/li>\n<li>YARN\u2011NM \u672c\u5730\u78c1\u76d8&#xff1a;\u5b58\u653e\u5bb9\u5668\u4e34\u65f6\u6587\u4ef6\u3001shuffle \u4e2d\u95f4\u7ed3\u679c\u3002NM \u672c\u5730\u78c1\u76d8\u6ee1\u4f1a\u76f4\u63a5\u5bfc\u81f4 task \u5931\u8d25&#xff0c;\u548c HDFS \u78c1\u76d8\u65e0\u5173&#xff01;<\/li>\n<\/ul>\n<\/li>\n<li>\u4efb\u52a1\u4f1a\u81ea\u52a8\u91cd\u8bd5&#xff0c;\u4e2a\u522b task \u5931\u8d25\u4f1a\u91cd\u8bd5&#xff0c;\u91cd\u8bd5\u6b21\u6570\u8017\u5c3d&#xff0c;\u6574\u4e2a\u4f5c\u4e1a\u624d\u6807\u8bb0\u5931\u8d25\u3002<\/li>\n","protected":false},"excerpt":{"rendered":"<p>\u4efb\u52a1\u7c7b\u578b&#xff1a;MapReduce\u3001Spark\u3001Hive on MR\u3001Spark\u2011SQL&#xff1b;\u8fd0\u884c\u5728 YARN \u4e0a\u3002\u6838\u5fc3\u601d\u8def&#xff1a;\u5148\u770b\u4efb\u52a1\u72b6\u6001 \u2192 \u770b YARN \u65e5\u5fd7 \u2192 \u770b\u5177\u4f53\u5f02\u5e38\u6808 \u2192 \u533a\u5206\u8d44\u6e90\u95ee\u9898 \/ \u4ee3\u7801\u903b\u8f91 \/ \u96c6\u7fa4\u5e95\u5c42\u95ee\u9898\u3002\u4e00\u3001\u7b2c\u4e00\u6b65&#xff1a;YARN WebUI \u521d\u6b65\u5b9a\u4f4d&#xff08;\u6700\u4f18\u5148&#xff09;\u8bbf\u95ee ResourceManager WebUI&#xff0c;\u67e5\u770b\u5931\u8d25\u4efb\u52a1&#xff08;Failed \u72b6\u6001&amp;#xff0<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[5971,365,323],"topic":[],"class_list":["post-98010","post","type-post","status-publish","format-standard","hentry","category-server","tag-mr","tag-spark","tag-323"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Hadoop YARN \u4efb\u52a1\u5931\u8d25\u6392\u67e5\u6307\u5357\uff1a\u4ece\u5b9a\u4f4d\u5230\u89e3\u51b3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/98010.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Hadoop YARN \u4efb\u52a1\u5931\u8d25\u6392\u67e5\u6307\u5357\uff1a\u4ece\u5b9a\u4f4d\u5230\u89e3\u51b3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u4efb\u52a1\u7c7b\u578b&#xff1a;MapReduce\u3001Spark\u3001Hive on MR\u3001Spark\u2011SQL&#xff1b;\u8fd0\u884c\u5728 YARN \u4e0a\u3002\u6838\u5fc3\u601d\u8def&#xff1a;\u5148\u770b\u4efb\u52a1\u72b6\u6001 \u2192 \u770b YARN \u65e5\u5fd7 \u2192 \u770b\u5177\u4f53\u5f02\u5e38\u6808 \u2192 \u533a\u5206\u8d44\u6e90\u95ee\u9898 \/ \u4ee3\u7801\u903b\u8f91 \/ \u96c6\u7fa4\u5e95\u5c42\u95ee\u9898\u3002\u4e00\u3001\u7b2c\u4e00\u6b65&#xff1a;YARN WebUI \u521d\u6b65\u5b9a\u4f4d&#xff08;\u6700\u4f18\u5148&#xff09;\u8bbf\u95ee ResourceManager WebUI&#xff0c;\u67e5\u770b\u5931\u8d25\u4efb\u52a1&#xff08;Failed \u72b6\u6001&amp;#xff0\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/98010.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-08-30T14:24:51+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/98010.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/98010.html\",\"name\":\"Hadoop YARN \u4efb\u52a1\u5931\u8d25\u6392\u67e5\u6307\u5357\uff1a\u4ece\u5b9a\u4f4d\u5230\u89e3\u51b3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-08-30T14:24:51+00:00\",\"dateModified\":\"2026-08-30T14:24:51+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/98010.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/98010.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/98010.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Hadoop YARN \u4efb\u52a1\u5931\u8d25\u6392\u67e5\u6307\u5357\uff1a\u4ece\u5b9a\u4f4d\u5230\u89e3\u51b3\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Hadoop YARN \u4efb\u52a1\u5931\u8d25\u6392\u67e5\u6307\u5357\uff1a\u4ece\u5b9a\u4f4d\u5230\u89e3\u51b3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/98010.html","og_locale":"zh_CN","og_type":"article","og_title":"Hadoop YARN \u4efb\u52a1\u5931\u8d25\u6392\u67e5\u6307\u5357\uff1a\u4ece\u5b9a\u4f4d\u5230\u89e3\u51b3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u4efb\u52a1\u7c7b\u578b&#xff1a;MapReduce\u3001Spark\u3001Hive on MR\u3001Spark\u2011SQL&#xff1b;\u8fd0\u884c\u5728 YARN \u4e0a\u3002\u6838\u5fc3\u601d\u8def&#xff1a;\u5148\u770b\u4efb\u52a1\u72b6\u6001 \u2192 \u770b YARN \u65e5\u5fd7 \u2192 \u770b\u5177\u4f53\u5f02\u5e38\u6808 \u2192 \u533a\u5206\u8d44\u6e90\u95ee\u9898 \/ \u4ee3\u7801\u903b\u8f91 \/ \u96c6\u7fa4\u5e95\u5c42\u95ee\u9898\u3002\u4e00\u3001\u7b2c\u4e00\u6b65&#xff1a;YARN WebUI \u521d\u6b65\u5b9a\u4f4d&#xff08;\u6700\u4f18\u5148&#xff09;\u8bbf\u95ee ResourceManager WebUI&#xff0c;\u67e5\u770b\u5931\u8d25\u4efb\u52a1&#xff08;Failed \u72b6\u6001&amp;#xff0","og_url":"https:\/\/www.wsisp.com\/helps\/98010.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-08-30T14:24:51+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/98010.html","url":"https:\/\/www.wsisp.com\/helps\/98010.html","name":"Hadoop YARN \u4efb\u52a1\u5931\u8d25\u6392\u67e5\u6307\u5357\uff1a\u4ece\u5b9a\u4f4d\u5230\u89e3\u51b3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-08-30T14:24:51+00:00","dateModified":"2026-08-30T14:24:51+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/98010.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/98010.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/98010.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"Hadoop YARN \u4efb\u52a1\u5931\u8d25\u6392\u67e5\u6307\u5357\uff1a\u4ece\u5b9a\u4f4d\u5230\u89e3\u51b3"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/98010","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=98010"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/98010\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=98010"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=98010"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=98010"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=98010"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}