1.现象

flink任务提交任务虚拟内存不足导致的失败

Container [pid=3007,containerID=container_1599018748796_0004_01_000004] is  
running 342252032B beyond the 'VIRTUAL' memory limit. Current usage: 416.0 MB  
of 1 GB physical memory used; 2.4 GB of 2.1 GB virtual memory used.  
Killing container.

2.原因

因为yarn强制检查虚拟内存是否符合配置导致的,当我们的服务器或者虚拟机的内存达不到配置要求,可能就会报这个错误 。

3.解决

修改检查虚拟内存的属性为false

<property>  
	<name>yarn.nodemanager.vmem-check-enabled</name>  
	<value>false</value>  
</property>