nginx错误代码如下
2021/05/18 09:47:04 [error] 11085#0: *1 connect() failed (113: No route to host) while connecting to upstream, client: 192.168.2.110, server: www.baibai.com, request: “GET / HTTP/1.1”, upstream: “http://192.168.2.226:9090/”, host: “www.baibai.com”
2021/05/18 09:47:04 [error] 11085#0: *1 no live upstreams while connecting to upstream, client: 192.168.2.110, server: www.baibai.com, request: “GET /favicon.ico HTTP/1.1”, upstream: “http://mystream/favicon.ico”, host: “www.baibai.com”, referrer: “http://www.baibai.com/”
2021/05/18 09:47:33 [error] 11085#0: *5 connect() failed (113: No route to host) while connecting to upstream, client: 192.168.2.110, server: www.baibai.com, request: “GET / HTTP/1.1”, upstream: “http://192.168.2.226:9090/”, host: “www.baibai.com”
2021/05/18 09:47:36 [error] 11085#0: *5 connect() failed (113: No route to host) while connecting to upstream, client: 192.168.2.110, server: www.baibai.com, request: “GET / HTTP/1.1”, upstream: “http://192.168.2.225:8081/”, host: “www.baibai.com”
之前我在nginx(www.baibai.com)上做了本机的两个tomcat,负载均衡没有问题。改为使用192.168.2.225和192.168.2.226服务器上的tomcat(都能单个正常显示),访问www.baibai.com,不行,检查nginx配置也没问题,查了很多资料,都是说防火墙,自己只能自行排查,后来发现,是我在192.168.2.225和192.168.2.226上做了lo接口的子接口。解决网卡问题后,就访问正常了。