24 no live upstreams while connecting to upstream, client: 10.0.3.1 server: xxx
See original GitHub issue#I always get this error:
I set in jenkins two variables
“VIRTUAL_HOST=jenkins.xxx.com” “VIRTUAL_PORT=8020”
but in nginx-proxy console I get:
nginx.1 | jenkins.xxx.info 10.0.3.1 - - [26/Jan/2017:14:22:10 +0000] “GET / HTTP/1.1” 502 166 “-”
“Mozilla/5.0 (Windows NT 10.0; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0”
nginx.1 | 2017/01/26 14:22:10 [error] 39#39: *24 no live upstreams while connecting to upstream, client: 10.0.3.1, server: jen kins.xxx.info, request: “GET / HTTP/1.1”, upstream: “http://7388ea39588cd39638dc61b60d26fe329b4cdc1d/”, host: “jenkins.xxx. info”
Why is client 10.0.3.1?
My config:
docker exec 91d3279be4b6 cat /etc/nginx/conf.d/default.conf
cat: /etc/nginx/conf.d/default.conf.: No such file or directory
[/] # docker exec 91d3279be4b6 cat /etc/nginx/conf.d/default.conf
# If we receive X-Forwarded-Proto, pass it through; otherwise, pass along the
# scheme used to connect to this server
map $http_x_forwarded_proto $proxy_x_forwarded_proto {
default $http_x_forwarded_proto;
'' $scheme;
}
# If we receive X-Forwarded-Port, pass it through; otherwise, pass along the
# server port the client connected to
map $http_x_forwarded_port $proxy_x_forwarded_port {
default $http_x_forwarded_port;
'' $server_port;
}
# If we receive Upgrade, set Connection to "upgrade"; otherwise, delete any
# Connection header that may have been passed to this server
map $http_upgrade $proxy_connection {
default upgrade;
'' close;
}
# Set appropriate X-Forwarded-Ssl header
map $scheme $proxy_x_forwarded_ssl {
default off;
https on;
}
gzip_types text/plain text/css application/javascript application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
log_format vhost '$host $remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent"';
access_log off;
# HTTP 1.1 support
proxy_http_version 1.1;
proxy_buffering off;
proxy_set_header Host $http_host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $proxy_connection;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
proxy_set_header X-Forwarded-Ssl $proxy_x_forwarded_ssl;
proxy_set_header X-Forwarded-Port $proxy_x_forwarded_port;
# Mitigate httpoxy attack (see README for details)
proxy_set_header Proxy "";
server {
server_name _; # This is just an invalid value which will never trigger on a real hostname.
listen 80;
access_log /var/log/nginx/access.log vhost;
return 503;
}
# jenkins.xxx.info
upstream 7388ea39588cd39638dc61b60d26fe329b4cdc1d {
## Can be connect with "bridge" network
# jenkins-1
server 10.0.3.6 down;
}
server {
server_name jenkins.xxx.info;
listen 80 ;
access_log /var/log/nginx/access.log vhost;
location / {
proxy_pass http://7388ea39588cd39638dc61b60d26fe329b4cdc1d;
}
}
Issue Analytics
- State:
- Created 7 years ago
- Comments:5
Top Results From Across the Web
No live upstreams while connecting to upstream message in ...
My understanding is that port 443 is preferred for TURN, but on a jitsi-meet installation, the same port is used by the web...
Read more >no live upstreams while connecting to upstream [亲测解决]
1; 2. 永久关闭Selinux: [root@localhost ~]# vim /etc/sysconfig/selinux # This file controls the state of SELinux on the system.
Read more >Search Results - CVE
An issue was discovered in the Linux kernel through 6.0.6. drivers/char/pcmcia/scr24x_cs.c has a race condition and resultant use-after-free if a physically ...
Read more >2020-September.txt - Mailing Lists - OpenStack
This Openstack is not "live" as I've been trying to get to the bottom of the issues: Issue 1. When trying to launch...
Read more >压测引起的nginx报错502 no live upstreams while ... - 博客园
... 出现502 no live upstreams while connecting to upstream的报错, ... server { ··· location /zzz/ { proxy_pass http://yyy.xxx.web; ··· } }.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I was getting the same error when running a simple nodejs service behind the nginx-proxy. It turns out I forgot to
EXPOSE
my port in the Dockerfile. After fixing that the proxy worked as expected. Not sure if this information helps you, but I figured it may be worth mentioning.Solution in https://github.com/nginx-proxy/nginx-proxy/issues/693#issuecomment-282136792, closing.