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.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
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
4.yes i am receiveing the hit from the lb and geeting 200 responce please find the screenshots belowm of the application logs
5 . yes i already whitelisted the ip in the firewall and attached to the vm where the application is running
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.