-
Notifications
You must be signed in to change notification settings - Fork 1.8k
host not found in up stream #127
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
Comments
have you solved the problems? can you teach me ?thanks! |
@cedvdb which version of docker-compose are you running? i think in older versions depends_on didn't link containers. |
Try adding networks, e.g.
Also maybe depends_on expects dictionary:
|
Sorry, I am blind, here is what my awesome colleague wrote to fix it: # nginx can't resolve hosts using resolv.conf, and one can't be sure
# which IP address the nameserver has.
command: [/bin/sh, -c,
"export NAMESERVER=$$(cat /etc/resolv.conf \
| grep 'nameserver' | awk '{print $$2}' | tr '\\n' ' ') && env \
&& echo Creating /etc/nginx/conf.d/resolver.conf \
using nameserver $$NAMESERVER from /etc/resolv.conf \
&& echo 'resolver' $$NAMESERVER ';' > /etc/nginx/conf.d/resolver.conf; \
(test -e /etc/nginx/conf.d/default.conf \
&& rm /etc/nginx/conf.d/default.conf); nginx -g 'daemon off;'"] It would be awesome if Nginx did it natively. |
btw, is it alpine image? |
@andreif I think the docker was an alpine image (I made this question 6 months ago). Thanks! |
If it was alpine, then it's related to #78 |
I'm having this exact issue. I have 4 computers at work running docker. 2 of them have this issue, two of them don't when running the exact same docker-compose. Any idea what could be causing this? |
I'm trying to run nginx as a reverse proxy inside docker. The issue is that nginx is exiting because it doesn't find the host in upstream (nginx strts faster than keycloak I assume) so it just exits.
The text was updated successfully, but these errors were encountered: