欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

nginx报: [error] 35171#0: *35 no live upstreams while connecting to upstream, client

程序员文章站 2022-07-15 12:55:24
...

nginx报错:“[error] 35171#0: *35 no live upstreams while connecting to upstream, client: 114.241.109.14, server: jiangxinyanyi.com, request: “GET /admin/index HTTP/1.1”, upstream: “https://www.jiangxinyanyi.com/admin/index”, host: “www.jiangxinyanyi.com””

问题: no live upstreams while connecting to upstream

错误方式:

upstream tomcat1{
			ip_hash;
			server 39.106.21.243:80; 
			server 39.106.4.96:80;
            }

解决方式:

upstream tomcat1{
			ip_hash;
			server 39.106.21.243:80 max_fails=5 fail_timeout=60s; #为5秒,不要改为1秒
			server 39.106.4.96:80 max_fails=5 fail_timeout=60s;
            }