New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: no servers are inside upstream in #438
Comments
Same problem here. |
I had to revert back to a72c7e6 |
@mrvini can you paste |
Same error here.
Sorry, 'docker network' command is not available here (ubuntu 15.10) |
I have two docker inspect output, inspecting the diff, the only suspecting things are: working version (0.4.2, 3 months ago):
Non-working version (current, 0.7.0):
Working version:
Non-working version (current):
|
I exported both images (docker save -o working.tar). update: version 0.4.2 works like a charm. (I scp'd to the new server from the old server).
(the only other difference is the docker.sock:ro difference between the new readme, and the old readme) |
@klaszlo hmm not sure i follow. 0.4.2 and 0.7.0 are versions of what? lastest for nginx-proxy seems to be 0.3.0 |
@wader, thanks for your comment, that made me look a little deeper and probably it should be the first thing anyone look at. version for my docker was 1.7.1 which is old, after I upgraded to version 1.11.1, everything works as it should. as always thanks for a good product and support, if no other support needed for @klaszlo , please close it |
@wader Sorry for the noise, I wrongly read the version string inspecting the image file I have no idea what is the exact version of my older nginx-proxy docker image, I know that I locally launched (and therefore imported from docker hub) on "2016-01-26T22:39:17.462882618Z". I'm on ubuntu 15.10, which ships with docker 1.6.2: Are you suggesting, that only ubuntu 16.04+ supported? |
The image $ docker --version
Docker version 1.10.3, build 8acee1b |
I am using the two-container solution with docker-gen and have the same problem in all my machines. |
@benzht hi, what versions of docker? |
Sorry, forgot the details:
|
Thanks, anything interesting in |
machine1 and machine2 have revprox-environment variables set
|
Weird, i run a setup with nginx-proxy and some container on the same bridge network that works. Only difference i can see is that you have a No port expose changes? try exact same docker-gen version (0.7.0 i think), does single container version work? |
I'm not running the nginx-proxy itself (and right now cannot test if it would work with it), but I am using a vanilla nginx with docker-gen and the template from nginx-proxy..as described in the documentation. Later this afternoon I will be able to test a vanilla nginx-proxy |
I had this problem on nginx-proxy, so then tried setting up vanilla nginx and docker-gen, had the same problem again. By reverting back to a older template (commit 97c6340) it started working again. |
It's also not working for me. I've uploaded all of my |
Just to confirm: 0.3.0 does not work for me neither. Reverting back to 0.2.0 works. Same problems (not registering upstream servers, error on refresh)
Docker Networking:
|
Same issue here on
Docker version info:
Docker networking info:
|
Just an (untested) hypothesis: Could it be that only containers attached to the default bridge are affected? |
Tried to reproduce but no go. But ended up with a command to dump template context that might be useful. But remember to clear out secrets if your going to post the output!
Pipe thru |
I did some debugging. |
@ginkel can you dump context and also see how |
I wonder if nginx-proxy/docker-gen#186 could be the cause of some of these problems |
I can dump the context, but it contains loads of secrets. What do you need to know? |
@ginkel Oh ah yeah. I guess the useful stuff would be .Docker.CurrentContainerID and the container IDs. Does one of them match up or how does the container look that should match up |
I added some info why empty upstreams can occur: #565 (comment) |
TL;DR
|
I can confirm that upstream is empty. As a workaround, I mounted conf.d to a volume and edited default.conf manually. |
@DeKugelschieber use https://raw.githubusercontent.com/jwilder/nginx-proxy/a72c7e6e20df3738ca365bf6c14598f6a8017500/nginx.tmpl instead of the one on master and you'll be fine. Below is my nginx-gen.service if it helps
|
I had this issue and tried all tips and tricks everywhere. |
Just to put my 2 cents in the bucket. I modified the template like this:
https://github.com/jwilder/nginx-proxy/blob/6bdd184d6abaebfbb6f1d28593a897a96ee020c4/nginx.tmpl#L118 It requires me atm to give also the VIRTUAL_PORT but it does work. Full block where i added the line shown below. I did not try to get it any nicer but if someone knows a permanent fix i am all ears. For now this works as a workaround.
|
I've just hit the same issue when trying to add a backend which only publishes port 443. It ends up with an empty upstream block. I've used the following workaround:
As long as reverse-proxy and the backends do share the same network it seems to work perfectly fine. |
same as #479 ? looks like as soon as some container with VIRTUAL_HOST isnt on the same network, it breaks the nginx config and container ? |
@revolunet yes you are right, in all my later cases proxy container and nginx container were in different networks. Adding one to another |
For those running this in a swarm, make sure to check if you are still receiving |
I had this error as well. This was my docker-compose.yml
I fixed it by adding |
I have same problem on MacOS, never seen it on Windows 10 |
I had the same issue as above. I found the docker-compose files in https://blog.ssdnodes.com/blog/tutorial-using-docker-and-nginx-to-host-multiple-websites/ to fix my issue. It appears it was how I was defining environment variables in the improper format |
experiencing this same issue on AWS ECS. Has anyone fixed this on ECS? ecs-cli compose service up - the client that brings up the services doesn't support "networks" and it skips these from the docker-compose.yml file. Any solutions for ECS? By default it uses a bridge network, but it still gets the empty upstream. |
I have been experiencing the "empty upstream" issue for a long time and spent the last week doing some extensive debugging. In my case the entire problem stems from docker.proxy.service
docker.letsencyrpt.service
docker.www.service
(NB host names, email and paths have been obfuscated in these samples) |
I know this is an old issue, but for me to fix this all I had to do was ensure that my application and Nginx were on the same network. (I use two different compose files, one for Nginx/Docker gen/letsencrypt and one for my web-app). I know that is a fairly dumb thing to forget, but I wanted to put it out there for anyone else who might be reading through this. |
...Also in the realm of silly mistakes, I had a boilerplate of environment variables being used in unrelated docker-compose files on the same machine that unnecessarily defined VIRTUAL_HOST on a different network. They interfered with the real VIRTUAL_HOST in the correct network/docker-compose. The "docker network inspect $(docker network ls -q)" command tipped me off. |
Thank you ryanalexanderson ! That was my problem: i forgot to put one container in the right network. |
I had the same problem, in my case it was related to systemd-docker. I explain the problem in case someone else has the same problem. (@shikasta-net?) by default, systemd-docker will move all application cgroups to systemd. This will cause
But docker-gen uses
I use docker-gen, but this would also apply to nginx-proxy. Note that this problem only occurred when the container was directly started from systemd. After using the docker commands to restart the container, container ID could be found. Also, when using docker exec to inspect the container, |
In my case this happened because I started a container with It couldn't fetch the ip address for this container, created an empty value for this Shutting down the new container with |
I had to use network_mode: "bridge" in my docker-compose.yml to fix this error. |
I fixed this by stopping the container and removing the volume that contained the config ( |
Solved by recreating containers. If the problem persists please reopen. |
I've updated my proxy image today, and tried to restart all my other containers behind the proxy, however all of them failed, am I doing something wrong? ( i did follow explanations in issue #64, however that didn't help)
proxy
my dev container (nodejs) built locally and it exposes port 8181
Right before I run dev container, i can see output of nginx -t
After I start dev container, i see the following
when I check /etc/nginx/conf.d/default.conf i see empty upstream
Is there anything I am doing wrong? I've been using same startup script for a good 6 month and it used to work right before I pulled the new image, did anything changed? Please help
The text was updated successfully, but these errors were encountered: