Discourse-setup fails to connect to github - docker issue with bridge networking

I’ve noticed some users in the past have had difficulty with the discourse-setup script and the error:

fatal: unable to access ‘https://github.com/discourse/pups.git/’: Could not resolve host: github.com

However, my issue doesn’t seem to be DNS related. I’ve gone through a number of attempts to fix things:

Disabled UFW

Uninstalled ebtables as per Docker network problem. Only works with --net=host : docker

Thee odd thing is that docker run -it --net=host busybox ping -c 1 8.8.8.8 consistently works and I get a response, but I simply cannot get it to work over the default bridged connection.

The odd thing is that after restarting docker, the bridge connection works for the initial network request then fails after that:

systemctl restart docker
docker run -it busybox ping -c 1 8.8.8.8 << Works
docker run -it busybox ping -c 1 8.8.8.8 << Second attempt fails

System Details:

Distributor ID: Ubuntu
Description: Ubuntu 18.04.2 LTS
Release: 18.04
Codename: bionic
Docker version 18.09.5, build e8ff056

Any recommendations on how to further debug and hopefully resolve this would be greatly appreciated.

1 Like

My guess is that there is leftover networking mess, maybe try a full purge of docker and reinstall after looking at your iptables and ensuring they are default and clean

1 Like