1.tomcat能访问,但某个请求处理时间太长,超过30s,read超时,错误:
生效的配置【proxy_read_timeout 30s;】【tomcat的应答响应超过30s】
2019/04/03 12:07:46 [error] 17504#3308: *28 upstream timed out (10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond) while reading response header from upstream, client: 127.0.0.1, server: localhost, request: "GET /erp_new/s_test.jsp HTTP/1.1", upstream: "http://127.0.0.1:18080/erp_new/s_test.jsp", host: "localhost"
【10060+while reading response header from upstream】
2.nginx正访问一个tomcat时,关闭了这个tomcat,这时nginx会把消息转发给另外一个tomcat,同时报错误:
2019/04/03 16:46:03 [error] 17504#3308: *43 WSARecv() failed (10054: An existing connection was forcibly closed by the remote host) while reading response header from upstream, client: 127.0.0.1, server: localhost, request: "GET /erp_new/s_test.jsp HTTP/1.1", upstream: "http://127.0.0.1:18080/erp_new/s_test.jsp", host: "localhost", referrer: "http://localhost/erp_new/s_test.jsp"
3.所有tomcat都关闭,会每个tomcat都访问一下,connect超时,错误:
生效的配置【proxy_connect_timeout 2s;】【2s后就返回这个错误,连接失败了】
2019/04/03 12:39:52 [error] 17504#3308: *38 upstream timed out (10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond) while connecting to upstream, client: 127.0.0.1, server: localhost, request: "GET /erp_new/s_test.jsp HTTP/1.1", upstream: "http://127.0.0.1:28080/erp_new/s_test.jsp", host: "localhost"
【10060+while connecting to upstream】
4.如果每个tomcat都访问不了,还会再报一个错误:
2019/04/02 15:55:55 [error] 1606#0: *106592288 no live upstreams while connecting to upstream, client: 202.119.44.5, server: xxx.xxx.com, request: "GET / HTTP/1.1", upstream: "http://tomcat_new/", host: "xxx.xxx.com"
5.某个tomcat服务器网络访问不了,错误:
2019/04/02 15:56:24 [error] 1606#0: *106593488 connect() failed (113: No route to host) while connecting to upstream, client: 202.119.44.5, server: xxx.xxx.com, request: "GET /scripts/jquery/jquery.ui.datepicker-zh-CN.js HTTP/1.1", upstream: "http://xx.xx.xx.xx:9080/scripts/jquery/jquery.ui.datepicker-zh-CN.js", host: "xxx.xxx.com", referrer: "http://xxx.xxx.xxx/xxx/xxx.jsp"
6.tomcat的对应服务没有启动,或者网络负荷大丢包?错误:
2019/05/22 23:06:11 [error] 10223#0: *22167551 connect() failed (111: Connection refused) while connecting to upstream, client: xx.xx.xx.xx, server: localhost, request: "GET / HTTP/1.1", upstream: "http://xx.xx.xx.xx:9080/", host: "xxx.xxx.com"
参考文档
https://blog.51cto.com/nanchunle/1657410
https://blog.51cto.com/xiaosu/1689992
https://blog.youkuaiyun.com/qq_29663071/article/details/80759098