简体   繁体   English

AWS ECS-EC2 错误:在您的集群中找不到容器实例

[英]AWS ECS-EC2 ERROR: No Container Instances were found in your cluster

I have a terraform setup that deploys successfully without error.我有一个 terraform 设置,可以成功部署且没有错误。 It uses Github actions, but I don't think that matters.它使用 Github 动作,但我认为这不重要。

It creates an ECS-EC2 cluster.它创建一个 ECS-EC2 集群。 I'm using an ECS-Optimized AMI (have verified it in the console), have an inte.net gateway with the right things in the route table, but the service does not place a task... in the console, I see:我正在使用 ECS-Optimized AMI(已在控制台中对其进行验证),在路由表中有一个带有正确内容的 inte.net 网关,但该服务没有放置任务......在控制台中,我看到了:

No Container Instances found in your cluster

As far as I can tell, I've jumped through all the hoops.据我所知,我已经克服了所有障碍。 My code is here: https://gist.github.com/afisher-stelligent/efbbb32debef3f2eae4b61957f225c44我的代码在这里: https://gist.github.com/afisher-stelligent/efbbb32debef3f2eae4b61957f225c44

Any pointers would be appreciated.任何指针将不胜感激。 Been banging my head on this quite a bit.一直在努力解决这个问题。 Have tried suggestions here , here , and several other places.在此处此处和其他几个地方尝试过建议。

Stranger still, if I drill down far enough, it says I have no ec2 instances registered to my cluster.更奇怪的是,如果我深入研究,它会说我没有 ec2 实例注册到我的集群。

Update #1更新 #1

I ran the AWS Systems Manager runbook for Troubleshooting ECS Issues (AWSSupport-TroubleshootECSContainerInstance)... it pointed out that my VPC Endpoints were not allowing traffic, which is strange because I have an ingress rule from the private su.nets properly configured.我运行了 AWS Systems Manager 运行手册以解决 ECS 问题 (AWSSupport-TroubleshootECSContainerInstance)...它指出我的 VPC 端点不允许流量,这很奇怪,因为我有一个来自正确配置的私有 su.net 的入口规则。

I changed the inbound CIDR block to 0.0.0.0/0 and I now get errors about log group creation.我将入站 CIDR 块更改为0.0.0.0/0 ,现在我收到有关创建日志组的错误。 Which is progress.这是进步。 But not super secure.但不是超级安全。

Turns out the problem was the Security Group for the ECS cluster.原来问题是 ECS 集群的安全组。 It was using dynamic port mapping and the ephemeral ports weren't open.它使用的是动态端口映射,临时端口未打开。 Adding an ingress rule to cover them was the ticket.添加入口规则来覆盖它们是门票。

ingress {
  description = "Allow ephemeral ports"
  from_port   = 49153
  to_port     = 65535
  protocol    = "tcp"
  cidr_blocks = [cider_block]
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM