Google Cloud Load Balancer - 502 - 非托管实例组健康检查失败

Google Cloud Load Balancer - 502 - 非托管实例组健康检查失败

我目前有一个 HTTPS 负载均衡器设置,它使用 443 前端、后端和健康检查运行,为单个主机 nginx 实例提供服务。

当通过浏览器直接导航到主机时,页面会使用有效的 SSL 证书正确加载。

当我尝试通过负载均衡器 IP 访问网站时,我收到 502 - 服务器错误消息。我检查了 Google 日志,发现负载均衡器出现“failed_to_pick_backend”错误。我还注意到它未能通过健康检查。

经过一番挖掘,我找到了以下两个链接:https://cloudplatform.googleblog.com/2015/07/Debugging-Health-Checks-in-Load-Balancing-on-Google-Compute-Engine.html

https://github.com/coreos/bugs/issues/1195

问题 #1 - 不确定 google-address-manager 是否在服务器 (RHEL 7) 上运行。我在路由中没有看到 HTTPS 负载均衡器 IP 的条目。Google SDK 已安装。这是 Google 提供的图像,如果我在控制台中更新 IP 地址,它也会更新到主机上。如何检查 google-address-manager 是否在 RHEL7 上运行?

[root@server]# ip route ls table local type local scope host
10.212.2.40 dev eth0 proto kernel src 10.212.2.40
127.0.0.0/8 dev lo proto kernel src 127.0.0.1
127.0.0.1 dev lo proto kernel src 127.0.0.1

所有谷歌服务的输出

[root@server]# systemctl list-unit-files
google-accounts-daemon.service                enabled
google-clock-skew-daemon.service              enabled
google-instance-setup.service                 enabled
google-ip-forwarding-daemon.service           enabled
google-network-setup.service                  enabled
google-shutdown-scripts.service               enabled
google-startup-scripts.service                enabled

问题 #2:未收到 200 OK 响应。证书在 LB 和服务器上均有效且相同。在针对应用服务器运行 curl 时,我收到了此响应。

[email protected]  curl -I https://app-server.com
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.haxx.se/docs/sslcerts.html

有什么想法吗?

答案1

排除健康检查故障,一旦它们启动并运行,其余问题很可能会消失(特别是因为你的后端正在返回内容)。

相关内容