Failed to Bootstrap Ping is working to github

root@daysrilanka:~# mkdir /var/discourse
root@daysrilanka:~# git clone /var/discourse
Cloning into '/var/discourse'...
remote: Counting objects: 1353, done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 1353 (delta 2), reused 0 (delta 0)
Receiving objects: 100% (1353/1353), 301.74 KiB | 115.00 KiB/s, done.
Resolving deltas: 100% (791/791), done.
Checking connectivity... done.
root@daysrilanka:~# cd /var/discourse
root@daysrilanka:/var/discourse# cp samples/standalone.yml containers/app.yml
root@daysrilanka:/var/discourse# nano containers/app.yml
root@daysrilanka:/var/discourse# ./launcher bootstrap app
WARNING: No swap limit support
Unable to find image 'samsaffron/discourse:1.0.7' locally
Pulling repository samsaffron/discourse
22d62951587e: Pulling image (1.0.7) from samsaffron/discourse
22d62951587e: Pulling image (1.0.7) from samsaffron/discourse, endpoint:
22d62951587e: Pulling dependent layers
511136ea3c5a: Pulling metadata
511136ea3c5a: Pulling fs layer
511136ea3c5a: Download complete
7e2a471a454a: Pulling metadata
7e2a471a454a: Pulling fs layer
7e2a471a454a: Download complete
cdb5237bc8a7: Pulling metadata
cdb5237bc8a7: Pulling fs layer
cdb5237bc8a7: Download complete
fa6d84c1e733: Pulling metadata
fa6d84c1e733: Pulling fs layer
fa6d84c1e733: Download complete
91cf3969bafa: Pulling metadata
91cf3969bafa: Pulling fs layer
91cf3969bafa: Download complete
22d62951587e: Pulling metadata
22d62951587e: Pulling fs layer
22d62951587e: Download complete
22d62951587e: Download complete
Status: Downloaded newer image for samsaffron/discourse:1.0.7
This user has no SSH key, but a SSH key is required to access the Discourse Docker container.
Generate a SSH key? (Y/n) Y
Generating SSH key
Generating public/private rsa key pair.
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/
The key fingerprint is:
The key's randomart image is:
+--[ RSA 2048]----+
|     o .o+ .     |
|    E +.o.+      |
|   . +.+oo       |
|     o*oB        |
|     ++oS=       |
|     .    .      |
|                 |
|                 |
|                 |

Calculated ENV: -e LANG=en_US.UTF-8 -e RAILS_ENV=production -e UNICORN_WORKERS=2 -e UNICORN_SIDEKIQS=1 -e RUBY_GC_MALLOC_LIMIT=40000000 -e RUBY_HEAP_MIN_SLOTS=800000 -e DISCOURSE_DB_SOCKET=/var/run/postgresql -e DISCOURSE_DB_HOST= -e DISCOURSE_DB_PORT= -e HOME=/root -e -e -e
cd /pups && git pull && /pups/bin/pups --stdin
fatal: unable to access '': Could not resolve host:

I have checked a ping to and it is working properly.

root@daysrilanka:/var/discourse# ping
PING ( 56(84) bytes of data.
64 bytes from ( icmp_seq=1 ttl=55 time=240 ms
64 bytes from ( icmp_seq=2 ttl=55 time=234 ms
64 bytes from ( icmp_seq=3 ttl=55 time=240 ms

Anyone can direct me to the error?

I can’t provide access to my DigitalOcean Droplet


1 Like

Could it be to do with the recent blocking of GitHub?

You could try testing your connectivity to GitHub by running the following command:

wget --output-document=/dev/null

This should give you output similar to this:

root@forum:~# wget --output-document=/dev/null
--2015-01-10 20:06:43--
Resolving (
Connecting to (||:443... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: [following]
--2015-01-10 20:06:44--
Reusing existing connection to
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘/dev/null’

    [  <=>                                                                                                                                         ] 52,784       205KB/s   in 0.3s

2015-01-10 20:06:44 (205 KB/s) - ‘/dev/null’ saved [52784]

EDIT: It does look like a connectivity / availability issue though - trying again after a period of time is a good step.

Thanks for the tips. I’ll check them asap. I’m not in or from India. I
use git daily for learning purposes. And the digital ocean droplet is
located in Singapore.

I CAN PROVIDE access to it. Made a mistake in the first post.

Edit /etc/default/docker and uncomment the following line:

DOCKER_OPTS="--dns --dns"

After this, restart docker and rebuild. I had the same issue today.

The solution is taken from


@Stefan thanks, this resolved it for me.

I have the same problem,

fatal: unable to access '': Could not resolve host:"_ during `./launcher rebuild app`.

My installation was all working fine for a week beforehand but today it told me Sidekiq wasn’t running so I went to rebuild, which has now failed.

I can ping github outside the container and the wget test above also works fine. I’ve tried with and without the DNS options in /etc/default/docker (and restarted the docker service after editing each time).

If it matters, I have added --iptables=false to the DOCKER_OPTS variable, as I wanted to restrict access to the Discourse install by IP with ufw. I am not blocking outgoing traffic at all (and as I said pinging github works anyway).

Any more ideas?

EDIT: there are no other error messages. Also “Fetching origin” seems to complete without errors (and the first time it actually pulled so commits) so I’m very confused as to why only on the pups repo it can’t resolve Github.

What happens if you try without that?

1 Like

It works! Thank you :smile:

So I need to disable that to rebuild and then reenable it afterwards. Or will it cause problems if I leave the option in while the container is running?

It no longer works at all with the --iptables=false option. Now the site returns a Bad Gateway when that option is present. That’s weird because it worked fine with it with for over a week before.

Any advice on how to restrict access to port 80 by IP? I was using ufw to set the policy but Docker seems to completely bypass that using iptables directly.

How to restart docker?

Fine, I find the best solution is simply to reboot the server and wait for a while.

sudo reboot

Today I experienced this same exact problem in a fresh discourse docker install.

Solved this problem by the same solution posted by @Stefan above (thanks!):



Uncomment the following line:

#DOCKER_OPTS="--dns --dns"

Will look like this:

DOCKER_OPTS="--dns --dns"


systemctl restart docker

Then, the launcher bootstrap and rebuild commands will not hang and fail on the DNS issue.

Strange that I have installed docker on a number of Ubuntu distros using apt, but this install was the only one to have this issue.

# lsb_release -a
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.1 LTS
Release:	18.04
Codename:	bionic

I uncommented that line, restarted docker, and re ran /discourse-setup but it continues to not be able to resolve for some reason :frowning:

Using Ubuntu 20.04, tired reinstalling Docker…

# lsb_release -a
Distributor ID: Ubuntu
Description:    Ubuntu 20.04 LTS
Release:        20.04
Codename:       focal