AWS:ELB health is failing or not available for all instances

Imran Sheikh picture Imran Sheikh · May 7, 2018 · Viewed 10.8k times · Source

Our ELB is intermittently failing health checks on instances and throws errors "Environment health has transitioned from Ok to Warning. 2 out of 2 instances are impacted. See instance health for details" and after a minute it throws "Environment health has transitioned from Warning to Severe. ELB health is failing or not available for all instances"

It happens everyday on same time. Also I suspect that it happens whenever our CRON runs but I am not sure as it doesn't happens on other ELB instances.

I would like to know the root cause of this kind of problem as I searched through the forum and everyone had some different situations and cannot figure out what problem it would be for us.

This is our Production instance.

Answer

Gökhan Ayhan picture Gökhan Ayhan · Apr 22, 2019

Application load balancer(a part of ELB) looking default "/" endpoint for health check and ELB gets 404 status code so ElasticBeanstalk instances turn red. You should create an endpoint for health check and send 200 status code. İf you want to use another path you should modify load balancer for example: "default 80 HTTP /" to "default 80 HTTP /healthCheck"