question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

nginx: host not found in upstream

See original GitHub issue

Hello, 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:closed
  • Created 2 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
mreferrecommented, Mar 14, 2022

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.

Use x-aws-vpc as a top-level element in your Compose file to set the ARN of a VPC when deploying a Compose application

From: https://docs.docker.com/cloud/ecs-integration/

0reactions
mreferrecommented, Apr 21, 2022

I am closing this. Let me know if you need more help.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found