Error Unhealthy task in ECS

0

I have a task definition with two containers, app and nginx (port 80), I have created a service including a Application Load Balancer, but always but every task check unhealthy often.

Enter image description here

My target group is

Enter image description here

My load balancer

Enter image description here

What is the posible error, I need to change "Path"

1 Answer
1
Accepted Answer

I found the error, I must to have in nginx

server { listen 80;

location /health {
    access_log off;
    return 200 'ok';
    add_header Content-Type text/plain;
}

# Configuración adicional de tu servidor aquí

}

And update the PAth in my target groups "/health"

Working perfect now

answered 11 days ago
profile picture
EXPERT
reviewed 11 days ago
profile picture
EXPERT
reviewed 11 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions