While trying to upgrade Discourse via ./launcher rebuild app I get an issue with
fatal: unable to access 'https://github.com/discourse/REPO.git/': Failed to connect to github.com port 443: Connection timed out
However, the problem is: sometimes this fails even for discourse. But if you try to do it again, immediately after, with no changes, it may go through, but fail on one of the plugins. If I remove all the plugins, the discourse connection may fail or it may go through and actually build the whole thing.
I’ve seen this
but I don’t know how to debug the container networking.
You don’t have exactly the problem stated in the thread you linked, and indeed you seem to have an intermittent problem, which is always the hardest to diagnose. But maybe you could try a manual fetch. I tried this, which is harmless:
# cd /var/discourse/
# ./launcher enter app
x86_64 arch detected.
# wget -O - -v https://github.com/discourse/logster.git/ |wc
--2023-01-04 15:30:25-- https://github.com/discourse/logster.git/
Resolving github.com (github.com)... 184.108.40.206
Connecting to github.com (github.com)|220.127.116.11|:443... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://github.com/discourse/logster/ [following]
--2023-01-04 15:30:25-- https://github.com/discourse/logster/
Reusing existing connection to github.com:443.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘STDOUT’
- [ <=> ] 231.22K --.-KB/s in 0.06s
2023-01-04 15:30:26 (3.99 MB/s) - written to stdout 
2751 15860 236767
We see that “github.com” was translated to a reasonable IP address, was contacted, and returned some data. In fact the command run inside the container behaved very much like it does outside the container, and that’s as expected.
Are you using a supported installation recipe, on a well-known hosting company?
## Uncomment these two lines if you wish to add Lets Encrypt (https)
- "80:80" # http
- "443:443" # https
# DISCOURSE_DEFAULT_LOCALE: en
#DISCOURSE_SMTP_ENABLE_START_TLS: true # (optional, default true)
## If you added the Lets Encrypt template, uncomment below to get a free SSL certificate
## The Docker container is stateless; all data is stored in /shared
## Plugins go here
## see https://meta.discourse.org/t/19157 for details
- git clone https://github.com/discourse/discourse-math.git
- git clone https://github.com/discourse/discourse-reactions.git
- git clone https://github.com/discourse/discourse-solved.git
- git clone https://github.com/discourse/discourse-spoiler-alert.git
- git clone https://github.com/discourse/discourse-whos-online.git
- git clone https://github.com/discourse/discourse-assign.git
- git clone https://github.com/discourse/discourse-cakeday.git
- git clone https://github.com/discourse/discourse-akismet.git
- git clone https://github.com/discourse/discourse-data-explorer.git
- git clone https://github.com/discourse/discourse-gamification
- git clone https://github.com/discourse/discourse-checklist
- git clone https://github.com/discourse/discourse-footnote
- git clone https://github.com/discourse/discourse-yearly-review
- git clone https://github.com/discourse/discourse-encrypt.git
## Any custom commands to run after building
- exec: echo "Beginning of custom commands"
- exec: echo "End of custom commands"
Note: I’ve tried building app w/o any plugins. It either fails to fetch discourse itself or fails to clone 3rd or 4th plugin in the list (which means that with only 2-3 plugins I can build an app from 3rd-4th attempt).
It was 2.9.0.beta14 just before I tried to upgrade to 3.0.0.beta15, don’t recall specific ID but the last time it was upgraded was sometime Dec25-26.
It’s not that I was trying to limit the information available, it’s more about whether the name will tell you anything since it’s not a western company. The instance was hosted by reg.ru, the largest hoster in Russia. Anyway, their support this time wasn’t helpful either, so I moved my site to digital ocean. With the same settings, same procedure used for docker installation, everything worked (and seems to work) fine.