【发布时间】:2020-02-29 11:27:10
【问题描述】:
我正在使用 Fargate 启动 ECS 任务,容器在 PENDING 几分钟后最终处于 STOPPED 状态。状态给出以下错误消息:
CannotPullContainerError: context canceled
我正在使用 PrivateLink 允许 ECS 主机与 ECR 注册表对话,而无需通过公共 Internet,这就是它的配置方式(无服务器语法增强 CloudFormation):
Properties:
PrivateDnsEnabled: true
ServiceName: com.amazonaws.ap-southeast-2.ecr.dkr
SubnetIds:
- { Ref: frontendSubnet1 }
- { Ref: frontendSubnet2 }
VpcEndpointType: Interface
VpcId: { Ref: frontendVpc }
关于导致错误的原因有什么想法吗?
【问题讨论】:
-
它是因为路由表,检查这个问题github.com/aws/amazon-ecs-agent/issues/1266
-
@Adiii 我不确定是不是 - aws.amazon.com/premiumsupport/knowledge-center/… 说 PrivateLink 是填充路由的替代方法,使用 PrivateLink 为我清除了该错误。
标签: amazon-web-services aws-ecr