ALB health checks failing

0

I have ALB on ECS fargate service running FAST API. Health checks are constantly failing even though with curl I can access that same endpoint and get result with status code 200.

Enter image description here

Enter image description here

Enter image description here

Security group of ecs task:

  1. VPN so it's working with curl
  2. Inbound from load balancer.

Enter image description here

  • What are the rules on your security group?

  • hello iBenhr, I upload screenshot of my security group.

  • ELB SG should also allow the egress connection. Have you checked that? The error showing is a timeout which means that the ELB is unable to connect to the ECS Task. I'd double check the SG rules from both sides to confirm.

질문됨 25일 전739회 조회
2개 답변
2

Hi,

Whenever you deploy your application through AWS ECS Fargate, sometimes in an AWS Free Tier account, it shows the target group health check as 'Unhealthy', even though the website opens successfully. If you need to check if the ALB security group allows inbound rules for HTTP and HTTPS on port SSH, or if HTTPS and port SSH are not required, leave them out. When checking the ECS security group, ensure that the necessary ports are allowed, including those you've mentioned by their port numbers.

답변함 25일 전
0
수락된 답변

The screengrab of the security group rule (presumably the one associated with ECS cluster) shows it allows inbound port 80 from (what is presumably) the load balancer security group.

A rule the other way round needs to exist as well, that is the security group associated with the load balancer needs to have an outbound rule whose target is ECS on port 3000 - whether that's IP address(es), or the subnet, or the security group which is already associated with the ECS cluster.

profile picture
전문가
Steve_M
답변함 25일 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인