[AWS] The target instance of LB's Target Group is unhealthy, with a status code of 404.

Modified on Fri, Oct 21, 2022 at 10:40 AM

Question

 

Target instances registered with LB's Target Group are in an unhealthy state. The Health status details indicate that a 404 error code is occurring.

 

What should I check?

 

 

Answer

 

First of all, there are many reasons for 404 errors, and it usually occurs most often when a page or files requested by users cannot be found in HTTP.

 

The most common cause may be that the page is not in that directory, moved, or deleted.

 

It's a good idea to check the contents below one by one.

 

1. Firewalls

The port registered in the target group may not have been allowed in the target instance firewall.

 

2. Path Directory

Please make sure that the health check path actually exists and that the html file exists in that path.

 

For more information, please refer to the links below.

 

#1 Stack overflow -

https://stackoverflow.com/questions/53936905/aws-load-balancer-404-error-with-path-routing

 

 

 

3. Other Technical Documents

I am sending you a link for your reference regarding setting ALB listener rules and checking the status of the target group. It is also a good idea to check the link from the beginning.

 

#2 Listener rules for ALB -

https://docs.aws.amazon.com/ko_kr/elasticloadbalancing/latest/application/listener-update-rules.html

 

#3 Health checks for your target groups-

https://docs.aws.amazon.com/ko_kr/elasticloadbalancing/latest/application/target-group-health-checks.html

 

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article