title: Google Cloud Platform - receiving a 502 error for a backend not passing health checks
body: <p>I have been following this <a href="https://cloud.google.com/solutions/deploying-pega-platform-using-compute-engine-and-cloud-sql" rel="nofollow noreferrer">guide</a> 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. </p>
  
  <p><a href="https://i.stack.imgur.com/OPMZP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OPMZP.png" alt="enter image description here"></a></p>
  
  <p>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:</p>
  
  <pre><code>gcloud compute backend-services create pega-app \
      --health-checks=pega-health \
      --port-name=pega-web \
      --session-affinity=GENERATED_COOKIE \
      --protocol=HTTP --global
  </code></pre>
  
  <p>The protocol is HTTP but is this the same as HTTP/2?</p>
  
  <p>What else could be wrong besides checking that the firewall setup allows the health checker and load balancer to pass through (below)?</p>
  
  <pre><code>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
  </code></pre>
  
  <p>Edit:
  So the Instance group has a named port on 8080</p>
  
  <pre><code>gcloud compute instance-groups managed set-named-ports pega-app \
      --named-ports=pega-web:8080 \
      --region=${REGION}
  </code></pre>
  
  <p>And the health check config:</p>
  
  <pre><code>gcloud compute health-checks create http pega-health \
      --request-path=/prweb/PRRestService/monitor/pingservice/ping \
      --port=8080
  </code></pre>
  
  <p>I have checked VM Instance logs on the pega-app and getting 404 when trying to hit the ping service. 
  <a href="https://i.stack.imgur.com/JaS8R.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JaS8R.png" alt="enter image description here"></a></p>