1

I have some global Load balancer on the GCP. This balancer should send requests to the instance group with two back services. And when I try to send some requests, I randomly get 502 errors failed_to_connect_to_backend from my load balancer.

I can get a successful answer seven times, one by one, and then 2-3 times 502 error for the same request.

In the Monitoring Dashboard I see this - my both services are healthy. The Instanse groups overwiev shows 100% healthy status too.

URL map rules is default default I also don`t see any problems with resource consumption

And, unfortunately, I couldn't get any logs from the back-end side for the 502 errors, have only logs from the Load Balancer

Olego
  • 26
  • 4
  • The backends will have logs as well unless logging is not configured. Locate or solve that problem as a first step in debugging. – John Hanley Dec 01 '21 at 01:56

2 Answers2

0

After hours of coffee and liters of manuals (I'm not very well versed in GCP yet) the "problem" is solved - at some point I noticed that the execution time of all failed requests is ~ 9 seconds. Therefore, I tried to search for results with similar symptoms, as a result I found a answer on the Google Groups

In my case - we have trobles with port mapping(was used two ports in mapping - like 80, 6000. And 80 - was not listening from the backend side) After removing closed - 502s gone away.

Olego
  • 26
  • 4
0

If port 80 was not allowed on the firewall rule applied on the backend instances?

  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Dec 06 '21 at 13:23