Elastic Beanstalk Environment Health Sever: Process default has been unhealthy for 51 minutes (Target.ResponseCodeMismatch) or(Target.TimedOut) with ELB Target: 502 Bad Gateway
One of my environment start to get into Environment Health Sever state with Target.ResponseCodeMismatch
while on the ELB target, the instance was listed as HTTP 502: Bad gateway
I've verified below all looks correctly setup for me, but still not able to get the Environment Health back to normal
- Load Balancer setting for listener and processors all on HTTP, PORT 80, for processor the Health check path is
/health
(this is the same as my other environment), the respond code was left as default200
- Load Balancer is in a EB default created security group and EC2 Instance also has EB default created security group where is allowing traffic from and to ELB over 80
- Subnet is in a subnet where ACL is allowing traffic on all port
I also restarted and launched new instance couple of times, the error is not going away
Hello there,
The error "Target.ResponseCodeMismatch" is thrown when an application does not return the expect code to the ELB. For example, if you have configured health checks with expected status of 200 OK and your application returns 301 the error will be thrown.
Kindly confirm how your application is responding to the ELB health check requests by checking the application logic and the Apache/Nginx access logs.
To best troubleshoot this issue, we require information that is non-public information. Please open a support case with AWS Support using the following link
Relevant questions
Unable to delete my Elastic Beanstalk environment
asked 3 years agoElastic Beanstalk stuck aborting current environment operation
asked 4 months agoWhen I go to my site no error but my bean stalk environment has errors
asked 6 months agoEnvironment Creation Stuck in Pending
asked 3 years agoElastic beanstalk next.js application's health status become warning
asked 2 months agoElastic Beanstalk Environment Health Sever: Process default has been unhealthy for 51 minutes (Target.ResponseCodeMismatch) or(Target.TimedOut) with ELB Target: 502 Bad Gateway
asked a month agoElastic Beanstalk health is in Severe
asked 5 months agoElastic Beanstalk Error deploy python flask application sqlite3
asked 15 days agoElastic Beanstalk environment does not terminate
asked 3 years agoElastic BeanStalk shows unhealthy; health check not working
asked 13 days ago