一个实例因 ELB 系统健康检查失败而停止服务。
我用浏览器点击了健康检查端点,它返回正常,但我收到了上述消息。
我该如何调试呢?
我查看了instant settings => Get System Logs
nginx 日志,
- 编辑
nginx有
- [27/Mar/2020:05:35:42 +0000] "GET /littlehome/heartbeat/ HTTP/1.1" 200 2 2.920 2.920 "-" "ELB-HealthChecker/2.0"
- [27/Mar/2020:05:35:42 +0000] "GET /littlehome/heartbeat/ HTTP/1.1" 200 2 2.858 2.856 "-" "ELB-HealthChecker/2.0"
它肯定返回200..
并且仍然认为它收到了502
{
"Target": {
"Id": "i-085e8dffe8781f876",
"Port": 80
},
"HealthCheckPort": "80",
"TargetHealth": {
"State": "unhealthy",
"Reason": "Target.ResponseCodeMismatch",
"Description": "Health checks failed with these codes: [502]"
}
},