1

一个实例因 ELB 系统健康检查失败而停止服务。

我用浏览器点击了健康检查端点,它返回正常,但我收到了上述消息。

我该如何调试呢?

我查看了instant settings => Get System Logsnginx 日志,

  • 编辑

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]"
    }
},

在此处输入图像描述

4

1 回答 1

2

根据评论,问题是 Auto Scaling 组中的宽限期太短。解决方案是增加它。

于 2020-03-27T07:03:13.987 回答