Google Cloud Platform - 收到后端未通过健康检查的 502 错误
Google Cloud Platform - receiving a 502 error for a backend not passing health checks
我一直在关注 guide 在 Google 云计算引擎上部署 Pega 7.4。一切顺利,但在负载均衡器健康检查中,服务仍然不健康。
访问外部 IP 时返回 502,在尝试对 GCP 进行故障排除时告诉我们 "Make sure that your backend is healthy and supports HTTP/2 protocol"。那么在指南中这个命令:
gcloud compute backend-services create pega-app \
--health-checks=pega-health \
--port-name=pega-web \
--session-affinity=GENERATED_COOKIE \
--protocol=HTTP --global
协议是 HTTP,但这与 HTTP/2 相同吗?
除了检查防火墙设置是否允许运行状况检查器和负载平衡器通过(下),还有什么问题?
gcloud compute firewall-rules create pega-internal \
--description="Pega node to node communication requirements" \
--action=ALLOW \
--rules=tcp:9300-9399,tcp:5701-5800 \
--source-tags=pega-app \
--target-tags=pega-app
gcloud compute firewall-rules create pega-web-external \
--description="Pega external web ports" \
--action=ALLOW \
--rules=tcp:8080,tcp:8443 \
--source-ranges=130.211.0.0/22,35.191.0.0/16 \
--target-tags=pega-app
编辑:
所以实例组在 8080
上有一个命名端口
gcloud compute instance-groups managed set-named-ports pega-app \
--named-ports=pega-web:8080 \
--region=${REGION}
以及健康检查配置:
gcloud compute health-checks create http pega-health \
--request-path=/prweb/PRRestService/monitor/pingservice/ping \
--port=8080
我已经检查了 pega-app 上的 VM 实例日志,并在尝试访问 ping 服务时收到 404。
我的问题是我使用了一个使用静态 IP 地址的配置,而没有像这样应用域名系统记录:gcloud compute addresses create pega-app --global 我跳过了这一步,所以它每次都会生成临时 IP 地址实例必须启动。
我一直在关注 guide 在 Google 云计算引擎上部署 Pega 7.4。一切顺利,但在负载均衡器健康检查中,服务仍然不健康。
访问外部 IP 时返回 502,在尝试对 GCP 进行故障排除时告诉我们 "Make sure that your backend is healthy and supports HTTP/2 protocol"。那么在指南中这个命令:
gcloud compute backend-services create pega-app \
--health-checks=pega-health \
--port-name=pega-web \
--session-affinity=GENERATED_COOKIE \
--protocol=HTTP --global
协议是 HTTP,但这与 HTTP/2 相同吗?
除了检查防火墙设置是否允许运行状况检查器和负载平衡器通过(下),还有什么问题?
gcloud compute firewall-rules create pega-internal \
--description="Pega node to node communication requirements" \
--action=ALLOW \
--rules=tcp:9300-9399,tcp:5701-5800 \
--source-tags=pega-app \
--target-tags=pega-app
gcloud compute firewall-rules create pega-web-external \
--description="Pega external web ports" \
--action=ALLOW \
--rules=tcp:8080,tcp:8443 \
--source-ranges=130.211.0.0/22,35.191.0.0/16 \
--target-tags=pega-app
编辑: 所以实例组在 8080
上有一个命名端口gcloud compute instance-groups managed set-named-ports pega-app \
--named-ports=pega-web:8080 \
--region=${REGION}
以及健康检查配置:
gcloud compute health-checks create http pega-health \
--request-path=/prweb/PRRestService/monitor/pingservice/ping \
--port=8080
我已经检查了 pega-app 上的 VM 实例日志,并在尝试访问 ping 服务时收到 404。
我的问题是我使用了一个使用静态 IP 地址的配置,而没有像这样应用域名系统记录:gcloud compute addresses create pega-app --global 我跳过了这一步,所以它每次都会生成临时 IP 地址实例必须启动。