I have configured a HTTP external load balancer with VM instances on my google cloud project. When I am trying to connect backend VM instances through External HTTP load balancer IP address; I am getting 502 status as an error. Due to this I am unable to launch my web server using External HTTP load balancer. Please suggest if any configurations are required to set up the load balancer.
1 Answers
Root causes for 502 status error:
Firewall misconfigured / not configured which may block traffic. Kindly check whether health check firewall rules are configured or not with health check probers: 35.191.0.0/16 and 130.211.0.0/22.
Check for the default firewall rules if they are properly configured or not which allow the traffic from load balancer to backend services.
Check whether the VM instances / web server is not running on the backend side.
Check whether the VM instances resources(CPU/memory) are exhausted and not accepting the connection request.
Please refer below links to troubleshoot:
Setting up an external HTTPS load balancer: https://cloud.google.com/iap/docs/load-balancer-howto
Troubleshooting VM start up: https://cloud.google.com/compute/docs/troubleshooting/vm-startup