nginx: host not found in upstream
See original GitHub issueHello, I’m going through this tutorial on AWS ECS and I’m at the point where I’m attempting to run docker compose up with the ecs context.
Everything is going well up until it attempts to start the yelb-ui container which results in failure consistently. The error I see in the logs is:
nginx: [emerg] host not found in upstream "yelb-appserver" in /etc/nginx/conf.d/default.conf:5
I’ve googled around and it seems like the consensus is that it’s a startup issue and that yelb-appserver must start before yelb-ui. The solutions suggest to use depends-on, but it would appear that’s already being used in the docker-compose.yaml file. I’m not sure what else to do.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Docker Nginx stopped: [emerg] 1#1: host not found in upstream
typically this can be for two reasons: either the service in dev-exapmle.io:5016 is down or not responding to requests; or either you have...
Read more >Docker nginx: [emerg] host not found in upstream “web:3000”
I released my reactJs application. I have code information as below. But I get the error “11 # 11: host not found in...
Read more >nginx: [emerg] host not found in upstream - Reddit
The solution 1) won't help you with the startup issue, but using a resolver directive will allow you to track DNS changes for...
Read more >[emerg] host not found in upstream "app" in /etc/nginx ... - GitHub
When I attempt to deploy this, the nginx container fails and stops with an error "nginx: [emerg] host not found in upstream "app"...
Read more >What can nginx error mean: host not found in upstream "my ...
The error I see with systemctl status nginx.service is host not found in upstream "sync.mydomain.net" : Nov 20 01:05:40 mydomain.net ...
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

Mh… now that you mention that I think I remember seeing people having troubles with misconfigured VPC (especially around DNS settings etc because Service Discovery relies on that). Please note that if you create a brand new VPC you’d need to add a parameter to the compose file so that docker uses that VPC instead of the default one.
From: https://docs.docker.com/cloud/ecs-integration/
I am closing this. Let me know if you need more help.