0

I have set up a load balancer with nginx. In here I used health check in my configuration file. when I add 'match' parameter to health check and restart the server, I got 'no live upstream' in the error log. But at that time all the other servers are available to get requests.

Why has this kind of error occurred?

My match function in nginx.conf file

match check_server {
        status 200;
        header Content-Type = text/html;
    }

load_balancer.conf

health_check interval=2 passes=3 fails=2 match=check_server;

error in error.log:

2019/01/17 13:16:26 [error] 9853#9853: *13 no live upstreams while connecting to upstream, client: xxx.xxx.x.x, server: xxx.com, request: "GET / HTTP/1.1", upstream: "https://backends/", host: "xxx.com"

halfer
  • 19,824
  • 17
  • 99
  • 186
lnash
  • 53
  • 10
  • show us your upstream section – Qteb Jan 18 '19 at 12:56
  • Thank you for your kindly response. upstream backend { zone backend 64k; server 127.0.0.1:9443; server 127.0.0.1:9444; #ip_hash; sticky learn create=$upstream_cookie_jsessionid lookup=$cookie_jsessionid zone=client_sessions:1m; } – lnash Jan 19 '19 at 17:11
  • But now it works without showing that error. I didn't change anything. – lnash Jan 19 '19 at 17:13
  • good for you))) – Qteb Jan 19 '19 at 21:05
  • 1
    See https://stackoverflow.com/questions/35113279/no-live-upstreams-while-connecting-to-upstream-but-upsteam-is-ok – rogerdpack Nov 18 '19 at 17:53

0 Answers0