Google Load-balancer randomly failing requests to backend

99封情书 提交于 2019-12-06 15:37:11

If your Tomcat was listening only on 8080 instead of 80, then the instance group, backend service configs were problematic. In particular, the health check was configured to check port 80, which would make the load balancer think the backend service was not healthy and return 404.

In addition, you can check Tomcat log to see how many requests were received and what were the responses.

Edit: Since you confirmed another process was listening on 80. The reason for 404 NOT FOUND could be, the requests were dispatched internally to 80. You can verify this theory by hosting a page on both 80 and 8080, e.g. /a.html, but the content is different, one is "i'm 80", the other is "i'm 8080". This way, you can know exactly what happened. Checking the log of the process listening on 80 can also help.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!