# 502 Gateway Inválido - nginx/1.14.0 (Ubuntu): Imagem não encontrada localmente + Erro de resposta do daemon

**URL:** <https://meta.discourse.org/t/502-bad-gateway-nginx-1-14-0-ubuntu-unable-to-find-image-locally-error-response-from-daemon/133392>\
**Category:** Self-hosting\
**Created:** [14 Novembro , 2019 13:48 UTC](https://meta.discourse.org/t/502-bad-gateway-nginx-1-14-0-ubuntu-unable-to-find-image-locally-error-response-from-daemon/133392 "2019-11-14T13:48:41Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![naupe](https://avatars.discourse-cdn.com/v4/letter/n/eb8c5e/32.png) [@naupe](https://meta.discourse.org/u/naupe)\
**Post date:** [17 Novembro , 2019 01:48 UTC](https://meta.discourse.org/t/502-bad-gateway-nginx-1-14-0-ubuntu-unable-to-find-image-locally-error-response-from-daemon/133392/11 "2019-11-17T01:48:15Z")

</div>

Então, mais algumas notícias:

# Boas notícias

Não estou mais recebendo o erro `/usr/bin/docker: Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers).`!

`docker run ubuntu` não reporta mais erro. @Falco, deveria haver alguma saída que eu deveria estar vendo?

```plaintext
root@forum:/var/discourse# docker run ubuntu
root@forum:/var/discourse#

```

Então, o que fiz para resolver o erro? [Substituí o nameserver (DNS) usado nesta VM pelo serviço Google Public DNS:](https://askubuntu.com/questions/249203/what-does-sudo-echo-nameserver-8-8-8-8-etc-resolv-conf-do)  
`echo "nameserver 8.8.8.8" > /etc/resolv.conf`

Preciso executar o comando acima toda vez _após_ a VM ser reiniciada (então parece ser apenas temporário), ou receberei os dois erros ao tentar executar qualquer comando `./launcher`. Depois disso, apenas um dos erros aparece (`Unable to find image 'discourse/base:2.0.20191013-2320' locally`), mas o comando parece resolver:

```plaintext
root@forum:/var/discourse# ./launcher start app

WARNING: We are about to start downloading the Discourse base image
This process may take anywhere between a few minutes to an hour, depending on your network speed

Please be patient

Unable to find image 'discourse/base:2.0.20191013-2320' locally
2.0.20191013-2320: Pulling from discourse/base
Digest: sha256:77e010342aa5111c8c3b81d80de7d4bdb229793d595bbe373992cdb8f86ef41f
Status: Downloaded newer image for discourse/base:2.0.20191013-2320

starting up existing container
+ /usr/bin/docker start app
app

```

Parece que também consigo executar `./launcher rebuild app` sem erros. Aqui está a última coisa que a saída do comando mostra (escondendo URLs e endereço MAC):

```plaintext
+ /usr/bin/docker run --shm-size=512m -d --restart=always -e LANG=en_US.UTF-8 -e RAILS_ENV=production -e UNICORN_WORKERS=4 -e UNICORN_SIDEKIQS=1 -e RUBY_GLOBAL_METHOD_CACHE_SIZE=131072 -e RUBY_GC_HEAP_GROWTH_MAX_SLOTS=40000 -e RUBY_GC_HEAP_INIT_SLOTS=400000 -e RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR=1.5 -e DISCOURSE_DB_SOCKET=/var/run/postgresql -e DISCOURSE_DB_HOST= -e DISCOURSE_DB_PORT= -e DISCOURSE_HOSTNAME=discourse.domain.com -e DISCOURSE_DEVELOPER_EMAILS=admin@domain.com,postmaster@domain.com -e DISCOURSE_SMTP_ADDRESS=smtp.sparkpostmail.com -e DISCOURSE_SMTP_PORT=587 -e DISCOURSE_SMTP_USER_NAME=SMTP_Injection -e DISCOURSE_SMTP_PASSWORD=0d431cd177ce3d35833aa823d498eb57c7c4e99c -e LETSENCRYPT_ACCOUNT_EMAIL=admin@domain.com -h forum-app -e DOCKER_HOST_IP=172.17.0.1 --name app -t -p 8080:80 -p 8443:443 -p 2222:22 -v /var/discourse/shared/standalone:/shared -v /var/discourse/shared/standalone/log/var-log:/var/log --mac-address 00:00:00:00:00:01 local_discourse/app /sbin/boot
abb788d4a6fd301d88f129189a07a19c4a6bfc8554d43c555d3e3cd126374736

```

# Más notícias

Ainda estou recebendo o erro `502 Bad Gateway - nginx/1.14.0 (Ubuntu)` ao tentar acessar a página.

O que mais poderia ser o problema? Alguma sugestão?

---

_[View the full topic](https://meta.discourse.org/t/502-bad-gateway-nginx-1-14-0-ubuntu-unable-to-find-image-locally-error-response-from-daemon/133392)._
