我有一个 ECS 服务,它反复启动和停止在 EC2 ( m5.large
) 启动类型容器上运行的任务。事件选项卡循环显示这些消息 -
service test-service deregistered 1 targets in target-group localhost-localhost-default
service test-service has begun draining connections on 1 tasks.
service test-service deregistered 1 targets in target-group localhost-localhost-default
service test-service has started 2 tasks: task 4e1569b3-a15c-4bac-85f7-396b530113a5 task d5651035-8e3d-48df-b457-d05e5b7be8db.
没有什么可以帮助了解可能发生的事情了。当我检查目标组本身时,实例不再注册到它。我已经为任务分配了
memory: 1024
和 cpu: 512
,这应该足够了。我能做些什么来了解这里的问题是什么?
最佳答案
在这条线上,
service test-service has started 2 tasks: task 4e1569b3-a15c-4bac-85f7-396b530113a5 task d5651035-8e3d-48df-b457-d05e5b7be8db.
任务 ID 是一个超链接,当您单击它时,它将带您进入可以找到有关该特定任务的所有详细信息的页面。这里有一个条目“停止原因”,它将显示任务停止的原因。
如果它因为健康检查失败而停止,它将显示在事件页面本身中。
关于containers - ECS 服务不断注销 Target Group 和启动/停止任务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59699194/