1 instance of autoscale group always fails health check even though the application is started.

0

Using Elastic Bean Stalk, SpringBoot configured with an autoscaling group using Elastic Load Balancer health checks (700 second grace period).

When deploying new version of the application via Elastic Bean Stalk console, only 2 of 3 instances report as healthy via the /health check. Health check is positive for 2 healthy instances, but NGINX returns 404 for the unhealthy instance, which is eventually terminated and replaced, over and over.

The logs for the unhealthy instance show the SpringBoot app start just as the others, but the app is unreachable, as if NGINX is unable to proxy requests to new instance. NGINX access logs show failed /health attempts, etc. The fact NGINX starts indicates there is nothing wrong with the EC2 container itself, and it is reachable via it's public IP.

With the exact same code deployed to 2 working instances, what could be wrong with the 3rd?

1 Answer
1

Hi, please ensure that the subnets in the Load Balancer and the subnets in the Auto Scaling Group (ASG) match. If they don't match, the load balancer will have no way to reach the instances in those particular subnets.

profile picture
answered 9 months ago
  • The Load Balancer health checks are hitting the EBS NGINX, so there's no issue with the networking there. The issue is between NGINX and its application.

    The application is functioning - sending it's daily email and even reporting to external New Relic. And it doesn't appear to be an application issue because the 2 other instances started by the ASG work fine.

    Thanks!

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