I am trying to set up a load balancer on GCE for 2 Tomcat servers, running individually on 2 VMs (vm-1
and vm-2
). Both listen on port 80 and the network firewall rules allow traffic on port 80
from any source (0.0.0.0/0
).
Now, I created an instance group of both these VMs together called vm-group
and set a named port named http
pointing to port 80
.
I created a health check too, on port 80
, pointing to /<app_name>/<health_url>
, which reports a HTTP 200 if the app is healthy.
Then, I setup a HTTP load balancer using instructions in this video. Once setup, I find that the load balancer reports that 0/2
instances are healthy, which means the health checks are failing.
When I manually hit the health check URLs, they return a HTTP 200
- so my app is healthy.
Now, I am not sure why the load balancer reports the VMs as unhealthy and is unable to route requests. How can I debug this further?
Edit: I verified that the google-address-manager
is running as mentioned in this question.