4

does anyone know if there is a way to find out why AWS Elastic Beanstalk classifies an environments health as Red when it is actually working ok (at least from my perspective).

It is a web based application and the health check path is specified to be just "/".

I can see the health checker making requests via the NGINX access logs and the response is a HTTP 200:

172.31.**.*** - - [22/Aug/2015:17:26:51 +0000] "GET / HTTP/1.1" 200 21099 "-" "ELB-HealthChecker/1.0"
172.31.**.** - - [22/Aug/2015:17:26:51 +0000] "GET / HTTP/1.1" 200 21099 "-" "ELB-HealthChecker/1.0"

The application is up, running and responding to requests via my browser.

One thing I have noticed is that on the monitoring tab of the AWS console it thinks there are 0.9 instances rather than 1. At this point in time the auto scaling is setup for a minimum of 1 instance and max of 1 because I only need a single instance at this point in time. The reason I configured it to use an auto scaling group in the first place is because I'm using the ELB for SSL termination. The app is currently running on 64bit Amazon Linux 2015.03 v1.4.1 running Docker 1.6.0 but I get the same problem on the latest build too (64bit Amazon Linux 2015.03 v2.0.0 running Docker 1.6.2).

David
  • 7,652
  • 21
  • 60
  • 98

1 Answers1

4

When you are using "64bit Amazon Linux 2015.03 v2.0.0 running Docker 1.6.2", you have the option of opting into "Enhanced" application health monitoring. Enhanced health monitoring is explained in this blog post and in the documentation. With enhanced health monitoring you get a list of causes explaining "Why" the health is what it is. You need to remember to select "Enhanced" in the console when launching an environment as shown here. With 2.0 solution stacks you can also switch from "basic" mode to "enhanced" mode using the console without launching a new environment.

Also with Elastic Beanstalk now you can pass a ServiceRole with elastic beanstalk environments. If you are using a Service Role then be sure to check that you are using the Service role with right permissions. Read about service roles here.

Rohit Banga
  • 18,458
  • 31
  • 113
  • 191