google-cloud-platformload-balancinghttp-status-code-504pega

Google Cloud Platform - receiving a 502 error for a backend not passing health checks


I have been following this guide to deploy Pega 7.4 on Google Cloud compute engine. Everything went smoothly however on the Load Balancer health check the service continues to be unhealthy.

enter image description here

When visiting the external IP a 502 is returned and in trying to troubleshoot GCP told us to "Make sure that your backend is healthy and supports HTTP/2 protocol". Well in the guide this command:

gcloud compute backend-services create pega-app \
    --health-checks=pega-health \
    --port-name=pega-web \
    --session-affinity=GENERATED_COOKIE \
    --protocol=HTTP --global

The protocol is HTTP but is this the same as HTTP/2?

What else could be wrong besides checking that the firewall setup allows the health checker and load balancer to pass through (below)?

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

Edit: So the Instance group has a named port on 8080

gcloud compute instance-groups managed set-named-ports pega-app \
    --named-ports=pega-web:8080 \
    --region=${REGION}

And the health check config:

gcloud compute health-checks create http pega-health \
    --request-path=/prweb/PRRestService/monitor/pingservice/ping \
    --port=8080

I have checked VM Instance logs on the pega-app and getting 404 when trying to hit the ping service. enter image description here


Solution

  • My problem was that I used a configured using a Static IP address without applying a domain name system record like this: gcloud compute addresses create pega-app --global I skipped this step so it generates ephemeral IP addresses each time the instances have to boot up.