Impossível Reconstruir Discourse: Erro de Conexão do GitHub e Problemas na Porta 443 no GCP

Hi Discourse Community,

I’m having trouble rebuilding my Discourse instance on a Google Cloud Platform (GCP) VM (Ubuntu 22.04, 16GB RAM, 8 CPU cores). The rebuild fails due to a GitHub connection error, and I’m also facing issues with port 443 accessibility. I’ve tried several steps, but I’m stuck and would appreciate your help.

GitHub Connection Error During Rebuild

When running ./launcher rebuild app or ./discourse-setup, the rebuild fails with the following error in the logs:

fatal: unable to access ’ GitHub - discourse/discourse: A platform for community discussion. Free, open, simple. ': Failed to connect to github.com port 443 after 3 ms: Couldn’t connect to server

Pups::ExecError: cd /var/www/discourse && sudo -H -E -u discourse bash -c ‘… git fetch …’ failed with return #<Process::Status: pid 145 exit 128>

However, testing GitHub connectivity from the host works fine:

curl -I https://github.com

HTTP/2 200

But running as the discourse user fails:

sudo -u discourse -H git ls-remote GitHub - discourse/discourse: A platform for community discussion. Free, open, simple.

fatal: unable to access ’ GitHub - discourse/discourse: A platform for community discussion. Free, open, simple. ': Failed to connect to github.com port 443 after 3 ms: Couldn’t connect to server

DNS resolution for github.com works:

sudo -u discourse -H nslookup github.com 8.8.8.8

Server: 8.8.8.8

Address: 8.8.8.8#53

Name: github.com

Address: 192.30.255.113

Do you have a firewall enabled? It’s probably to blame.

Is that inside the container? There can be differernt firewall rules applied to docker than the host.

I’ve set up self-hosting on Google Cloud a couple of times before. However, my last attempt, a week ago, didn’t work. It keeps giving me 443 and GitHub data path errors, and I can’t rebuild.