Issues Rebuilding After Upgrade to Ubuntu 22.04

After banging my head for many hours, it’s time to ask for help.

Debug Log:

https://privatebin.net/?b56249efe41b5599#8nt7yMQU2Hft4HysXSoZkxXQTYdR9MFv91qC9sbBgen

1 Like

Your Droplet (or docker container) is having connectivity issues to github

fatal: unable to access ‘GitHub - discourse/discourse: A platform for community discussion. Free, open, simple.’: Could not resolve host: github.com

Could you verify if github is accessible?

2 Likes

Ah, meaning maybe I tried to rebuild too many times in a short period and got my server IP put into a time out?

None of the other errors are of any importance?

I just tried again and I’m still blocked, so is there anything else to try or should I just wait 24 hours and then try again?

You could try to ping/curl github.com and see if you get any response. It could be a firewall or connectivity issue rather than a rate limit.

1 Like

“Could not resolve host” suggests a DNS issue, i.e. your server is unable to find the IP address for github.com.

==================== REBUILD LOG ====================
x86_64 arch detected.
Ensuring launcher is up to date
Fetching origin
Launcher is up-to-date

This suggests to me that your host is able to resolve and connect to github.com unless you have cloned the discourse_docker repository from somewhere else. You can confirm this with the following commands to list the remote for the repository:

cd /var/discourse
git remote -v

which should output:

origin	https://github.com/discourse/discourse_docker.git (fetch)
origin	https://github.com/discourse/discourse_docker.git (push)

If that is the case then the subsequent error failing to resolve github.com would imply that the docker container is unable to resolve it despite the host being able to, suggesting a problem with docker connectivity.

2 Likes

git remote -v did indeed have the intended output. How should I troubleshoot Docker, or should I simply reinstall it? Happy to do so as long as I don’t lose any data. Where exactly does Discourse store its database and uploaded files (whatever happens next, I’d like to manually back those up)?

/var/discourse/shared/standalone is mapped to a volume in the container, all persistent data is stored under there.

docker network ls will list the docker networks, what I see is the default bridge network and two other networks. Containers use the default bridge network unless explicitly told to use something else.

I’ve found some information about the default bridge network no longer providing connectivity to the outside world. I’m speculating but Ubuntu 22.04 may have moved to a version of Docker where this applies, meaning the Discourse container will need to be set up to use a user-defined bridge instead.

I think you can just edit /var/discourse/containers/app.yml and add this to the bottom, then rebuild: (I haven’t tested this, however)

networks:
  default:
    driver: bridge

/var/discourse/shared/standalone/backups/default appears to have compressed backups of all the important bits, the database and uploads.

Thank you for the ideas, but it was a no-go.

Should I simply try reinstalling Docker, or if I do that, I might as well nuke the whole thing and do a complete fresh install of Discourse entirely (I installed via Discourse Hosting | DigitalOcean Marketplace 1-Click App)?

I assume importing the backup file is simple to do in the Discourse admin?

The standard install is the only officially supported way of installing but you can find information on restoring a backup below. It should be the same process for a DO 1-Click install.

It looks like the 1-Click app is explicitly using Ubuntu 20.04 so until that changes, it’s probably worth staying on 20.04. It’ll continue getting bug fix / security updates for another three years so there’s no rush to move to 22.04.

You may as well try reinstalling Docker first though. Perhaps the problem emerged from the upgrade and conceivably the Docker networking being removed, then re-added by the install could fix it.

I ended up just rebuilding the droplet with a clean copy of Ubuntu 22.04, reinstalling Discourse manually (the standard way), and then just importing the backup. It was quick and easy and I wish I’d just done that from the start.

Thanks for all the help!

2 Likes

That’s useful to know it’s not a general problem with installing on 22.04.