首页 > 解决方案 > AWS ECS private namespace list-instances remain unhealthy

问题描述

i have a private namespace with a service im using for ECS service discovery. The service is created like so

aws servicediscovery create-service --name elixir --dns-config 'NamespaceId="ns-XXXXX",DnsRecords=[{Type="A",TTL="300"}]' --health-check-custom-config FailureThreshold=1 --region XXXX --profile XXXX

My custom healthcheck in my task definition is:

 sh -c curl localhost:4000/status

docker ps lists each instance as healthy - ec2 status checks are 2/2/green - yet i cant seem to get the discovery service list-instances to flip from IS_INITIALIZING: true, and AWS_INIT_HEALTH_STATUS: UNHEALTHY.

The service discovery DNS properly routes to each instance as by design.

标签: amazon-web-servicesaws-cliamazon-ecsservice-discovery

解决方案


向 AWS 打开了一张票 - 事实证明,这是他们方面的一个错误,特定于 US-WEST-2 (AFAICT) 区域,其中服务发现在 Ec2 初始化和状态检查上没有正确更新。我会在它解决后更新它。


推荐阅读