Debugging AWS ELB OutOfService

AWS_ELB_Scheme_sYour load balancer checks the health of its registered instances using either the default health check configuration provided by Elastic Load Balancing or a custom health check configuration that you specify. The health check configuration contains information such as the protocol, ping port, ping path, response timeout, and health check interval.

If the current state of some or all your instances is OutOfService and the description field displays the message that the Instance has failed at least the Unhealthy Threshold number of health checks consecutively, the instances have failed the load balancer health check.

ELB Out Of Service Error

ELB_Error

Some of the important factors you should lookout for are the following

  • Check whether your instance is reachable from your ELB. Both ping & http/https.
  • Check whether the health check configurations are applicable for your http server.
    • Screen Shot 2016-02-21 at 9.12.29 AM
    • Ping Target
    • Timeout
    • Interval
    • Unhealthy Threshold
    • Healthy Threshold
  • The Ping target link can be configured to any page that can load faster. It would be better to be configured to any static rendering page or image instead of dynamically loading pages which can take time in loading.
  • AWS_ELB_monitoring
  • Look at the monitoring statistics to check for HTTP 4xx & 5xx graphs. These graphs shows the errors incurred during a specific span of time. The stats in this page provides various details related to latency , unhealthy hosts, connection errors etc
  • Make sure you have the HTTPD server listening on the primary IP of your instance.
  • If you have configured your HTTPD server to listen on any secondary IP then follow the trick suggested by me in the following link.
  • Check the ELB access logs. The following link provides details related to accessing access logs

 

There are various reasons why a ELB health check can fail. It would be better to start with the following trouble shooting link provided by AWS. Click here for link.