我在需求实例上使用0-256 m3.medium的计算环境。我的Job定义需要1个CPU和3 GB的Ram,m3.medium有。
AWS Batch Jobs陷入状态RUNNABLE
的原因是什么?
AWS说:
A job that resides in the queue, has no outstanding dependencies, and is therefore ready to be scheduled to a host. Jobs in this state are started as soon as sufficient resources are available in one of the compute environments that are mapped to the job’s queue. However, jobs can remain in this state indefinitely when sufficient resources are unavailable.
但这不回答我的问题
答案 0 :(得分:19)
还有其他原因导致Job无法进入RUNNABLE:
另外,请务必阅读AWS Batch troubleshooting
答案 1 :(得分:5)
至少应使用下一个策略和可信关系来定义角色。否则,由于它们没有足够的特权来启动,它们将陷入RUNNABLE状态:
AWSBatchServiceRole
受信任的关系:batch.amazonaws.com
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": "batch.amazonaws.com"
},
"Action": "sts:AssumeRole"
}
]
}
AmazonEC2ContainerServiceforEC2Role
受信任的关系:ec2.amazonaws.com
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": "ec2.amazonaws.com"
},
"Action": "sts:AssumeRole"
}
]
}
答案 2 :(得分:2)
我为此战斗了一段时间,发现了the answer。
作业可能卡在Runnable
中的一个可能原因是因为没有实例可以在其上运行该作业。如果是这种情况,查看上面答案中提到的自动缩放组可以向您显示阻止实例启动的实际错误,将您引向确切的问题,而不是让您去尝试解决任何数字问题的方法没有。错误消息是我们的朋友。
答案 3 :(得分:1)
如果有用,希望与AWS Cloud Support工程师分享这个非常有用的视频:
https://aws.amazon.com/premiumsupport/knowledge-center/batch-job-stuck-runnable-status/
答案 4 :(得分:0)