ELB健康检查失败

时间:2020-03-27 05:26:06

标签: amazon-web-services aws-elb

实例因响应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]"
    }
},

enter image description here

1 个答案:

答案 0 :(得分:1)

根据评论,问题在于Auto Scaling组中的grace period太短。解决方案是增加它。