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.

preguntada hace 24 días736 visualizaciones
2 Respuestas
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.

respondido hace 24 días
0
Respuesta aceptada

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
EXPERTO
Steve_M
respondido hace 24 días

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas