Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

LB Heathcheck isuue

Hi Team,

Facing issue in the healhcheck paas after creating the LB and backend the service is in uhealthy state and after whilisting the ips in firewall provide in the docs issue is not resolved,Please help for the same.

 

1 5 342
5 REPLIES 5

  1.  Where is the backend deployed? VMs or Kubernetes pods?
  2.  Can you verify that the health check endpoint is actually working by logging into the VMs/pods?

 

1.Backend is deployed on VMs.

2.yes healthcheck is working while hitting on the Vms getting 200 responce.

In such cases it's usually something very basic that's not configured correctly.

Can you double check the following

1. Is the health check URL correctly configured in the health check? Correct port and path?

2. Is the health check URL returning the correct response code if it's HTTP?. You already mentioned it's HTTP and returning 200.

3. Are you able to reach the health check URL on one VM from another VM? This will rule out the app listening on localhost.

4. Additionally, tail the logs of your app and see if they are receiving requests from the LB for the health checks. This will rule out cases where the LB is able to reach the health check URL but the expected response (usually a status code for HTTP) is not returned.

5. I'm assuming you have whitelisted the IPs as documented in https://cloud.google.com/load-balancing/docs/health-check-concepts#ip-ranges

1.yes check is correctly configured please find the screenshot below 

prashantsingh_0-1701062689569.png

2.yes it is returning 200 

3.yes i am able to reach the vm and healthcheck from another vms also please find the screenshots below

prashantsingh_1-1701063006121.png

prashantsingh_2-1701063013579.png

4.yes i am receiveing the hit from the lb and geeting 200 responce please find the screenshots belowm of the application logs 

prashantsingh_3-1701063303178.png

5 . yes i already whitelisted the ip in the firewall and attached to the vm where the application is running 

 

prashantsingh_5-1701063586986.png

 

 

I'm out of ideas, sorry.

Btw, how did you ensure that the requests in the logs are from the LB and not from your curl? They don't have a source IP.