mapreduce在yarn上运行,Container killed by the ApplicationMaster, Exit code is 143

mapreduce 程序在yarn上运行时报错,报错信息具体如下:

.....

[2021-03-28 17:38:50.081]Container killed on request. Exit code is 143
[2021-03-28 17:38:50.085]Container exited with a non-zero exit code 143. 

2021-03-28 17:38:57,155 INFO mapreduce.Job: Task Id : attempt_1616924256514_0001_m_000000_1, Status : FAILED
[2021-03-28 17:38:55.966]Container [pid=3061,containerID=container_1616924256514_0001_01_000003] is running 288238080B beyond the 'VIRTUAL' memory limit. Current usage: 90.1 MB of 1 GB physical memory used; 2.4 GB of 2.1 GB virtual memory used. Killing container.
Dump of the process-tree for container_1616924256514_0001_01_000003 :
	|- PID PPID PGRPID SESSID CMD_NAME USER_MODE_TIME(MILLIS) SYSTEM_TIME(MILLIS) VMEM_USAGE(BYTES) RSSMEM_USAGE(PAGES) FULL_CMD_LINE

.....

[2021-03-28 17:38:56.028]Container killed on request. Exit code is 143
[2021-03-28 17:38:56.035]Container exited with a non-zero exit code 143. 

2021-03-28 17:39:03,274 INFO mapreduce.Job: Task Id : attempt_1616924256514_0001_m_000000_2, Status : FAILED
[2021-03-28 17:39:02.076]Container [pid=3106,containerID=container_1616924256514_0001_01_000004] is running 293661184B beyond the 'VIRTUAL' memory limit. Current usage: 99.2 MB of 1 GB physical memory used; 2.4 GB of 2.1 GB virtual memory used. Killing container.
Dump of the process-tree for container_1616924256514_0001_01_000004 :
	|- PID PPID PGRPID SESSID CMD_NAME USER_MODE_TIME(MILLIS) SYSTEM_TIME(MILLIS) VMEM_USAGE(BYTES) RSSMEM_USAGE(PAGES) FULL_CMD_LINE

.....

显示当前使用情况:使用了90.1 MB的1 GB物理内存;使用了2.4 GB的2.1 GB虚拟内存。容器被 kill 掉了。

说到底还是物理内存不够用导致的。

可以在  yarn-site.xml 文件中增加如下属性,并重启 yarn 服务解决。

<property>
   <name>yarn.nodemanager.vmem-check-enabled</name>
   <value>false</value>
   <description>Whether virtual memory limits will be enforced for containers</description>
</property>

<property>
   <name>yarn.nodemanager.vmem-pmem-ratio</name>
   <value>4</value>
   <description>Ratio between virtual memory to physical memory when setting memory limits for containers</description>
</property>

 

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值