# בעיות בבנייה מחדש לאחר שדרוג ל-Ubuntu 22.04

**URL:** https://meta.discourse.org/t/issues-rebuilding-after-upgrade-to-ubuntu-22-04/225955
**Category:** Support
**Tags:** unsupported-install
**Created:** [3 במאי,‏ 2022,‏ 6:27am UTC](https://meta.discourse.org/t/issues-rebuilding-after-upgrade-to-ubuntu-22-04/225955 "2022-05-03T06:27:45Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![oopsyscoops](https://avatars.discourse-cdn.com/v4/letter/o/f14d63/32.png) [@oopsyscoops](https://meta.discourse.org/u/oopsyscoops)
#### Post date: [3 במאי,‏ 2022,‏ 6:27am UTC](https://meta.discourse.org/t/issues-rebuilding-after-upgrade-to-ubuntu-22-04/225955/1 "2022-05-03T06:27:45Z")

</div>

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

Debug Log:

[https://privatebin.net/?b56249efe41b5599#8nt7yMQU2Hft4HysXSoZkxXQTYdR9MFv91qC9sbBgen](https://privatebin.net/?b56249efe41b5599#8nt7yMQU2Hft4HysXSoZkxXQTYdR9MFv91qC9sbBgen)

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [3 במאי,‏ 2022,‏ 6:41am UTC](https://meta.discourse.org/t/issues-rebuilding-after-upgrade-to-ubuntu-22-04/225955/2 "2022-05-03T06:41:31Z")

</div>

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. · GitHub](https://github.com/discourse/discourse.git/)’: Could not resolve host: [github.com](http://github.com)

Could you verify if github is accessible?

---

<div class="post-metadata">

### Author: ![oopsyscoops](https://avatars.discourse-cdn.com/v4/letter/o/f14d63/32.png) [@oopsyscoops](https://meta.discourse.org/u/oopsyscoops)
#### Post date: [3 במאי,‏ 2022,‏ 11:03am UTC](https://meta.discourse.org/t/issues-rebuilding-after-upgrade-to-ubuntu-22-04/225955/3 "2022-05-03T11:03:03Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [3 במאי,‏ 2022,‏ 4:29pm UTC](https://meta.discourse.org/t/issues-rebuilding-after-upgrade-to-ubuntu-22-04/225955/4 "2022-05-03T16:29:30Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Simon\_Manning](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon_manning/32/198596_2.png) [@Simon\_Manning](https://meta.discourse.org/u/Simon_Manning)
#### Post date: [3 במאי,‏ 2022,‏ 5:29pm UTC](https://meta.discourse.org/t/issues-rebuilding-after-upgrade-to-ubuntu-22-04/225955/5 "2022-05-03T17:29:57Z")

</div>

> [@itsbhanusharma](#):
>
> Could not resolve host: [github.com](http://github.com)

“Could not resolve host” suggests a DNS issue, i.e. your server is unable to find the IP address for [github.com](http://github.com).

```plaintext
==================== 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](http://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:

```plaintext
cd /var/discourse
git remote -v

```

which should output:

```plaintext
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](http://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.

---

<div class="post-metadata">

### Author: ![oopsyscoops](https://avatars.discourse-cdn.com/v4/letter/o/f14d63/32.png) [@oopsyscoops](https://meta.discourse.org/u/oopsyscoops)
#### Post date: [3 במאי,‏ 2022,‏ 5:45pm UTC](https://meta.discourse.org/t/issues-rebuilding-after-upgrade-to-ubuntu-22-04/225955/6 "2022-05-03T17:45:28Z")

</div>

`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)?

---

<div class="post-metadata">

### Author: ![Simon\_Manning](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon_manning/32/198596_2.png) [@Simon\_Manning](https://meta.discourse.org/u/Simon_Manning)
#### Post date: [3 במאי,‏ 2022,‏ 7:03pm UTC](https://meta.discourse.org/t/issues-rebuilding-after-upgrade-to-ubuntu-22-04/225955/7 "2022-05-03T19:03:57Z")

</div>

> [@oopsyscoops](#):
>
> 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.

> [@oopsyscoops](#):
>
> How should I troubleshoot Docker

`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](https://docs.docker.com/network/bridge/#differences-between-user-defined-bridges-and-the-default-bridge) 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)

```plaintext
networks:
  default:
    driver: bridge

```

---

<div class="post-metadata">

### Author: ![oopsyscoops](https://avatars.discourse-cdn.com/v4/letter/o/f14d63/32.png) [@oopsyscoops](https://meta.discourse.org/u/oopsyscoops)
#### Post date: [4 במאי,‏ 2022,‏ 8:58am UTC](https://meta.discourse.org/t/issues-rebuilding-after-upgrade-to-ubuntu-22-04/225955/8 "2022-05-04T08:58:59Z")

</div>

`/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 | DigitalOcean Marketplace 1-Click App](https://marketplace.digitalocean.com/apps/discourse))?

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

---

<div class="post-metadata">

### Author: ![Simon\_Manning](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon_manning/32/198596_2.png) [@Simon\_Manning](https://meta.discourse.org/u/Simon_Manning)
#### Post date: [4 במאי,‏ 2022,‏ 9:28am UTC](https://meta.discourse.org/t/issues-rebuilding-after-upgrade-to-ubuntu-22-04/225955/9 "2022-05-04T09:28:19Z")

</div>

The [standard install](https://github.com/discourse/discourse/blob/main/docs/INSTALL-cloud.md) 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.

> [@Restore a backup from the command line](https://meta.discourse.org/t/restore-a-backup-from-command-line/108034):
>
> bookmark This guide explains how to restore a Discourse backup from the command line without using the Discourse web UI. person_raising_hand Required user level: Administrator wrench Console access required Here’s how to restore a Discourse backup from the command line, without ever booting the Discourse web UI. This is handy when you’re moving servers. Prerequisites Before you start, make sure you complete the following steps: Download the latest backup file from the source Disco…

---

<div class="post-metadata">

### Author: ![oopsyscoops](https://avatars.discourse-cdn.com/v4/letter/o/f14d63/32.png) [@oopsyscoops](https://meta.discourse.org/u/oopsyscoops)
#### Post date: [5 במאי,‏ 2022,‏ 1:16pm UTC](https://meta.discourse.org/t/issues-rebuilding-after-upgrade-to-ubuntu-22-04/225955/10 "2022-05-05T13:16:58Z")

</div>

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!

---

<div class="post-metadata">

### Author: ![Simon\_Manning](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon_manning/32/198596_2.png) [@Simon\_Manning](https://meta.discourse.org/u/Simon_Manning)
#### Post date: [5 במאי,‏ 2022,‏ 2:38pm UTC](https://meta.discourse.org/t/issues-rebuilding-after-upgrade-to-ubuntu-22-04/225955/11 "2022-05-05T14:38:26Z")

</div>

> [@oopsyscoops](#):
>
> with a clean copy of Ubuntu 22.04

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

---

<div class="post-metadata">

### Author: ![pacharanero](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pacharanero/32/500583_2.png) [@pacharanero](https://meta.discourse.org/u/pacharanero)
#### Post date: [1 באוקטובר,‏ 2022,‏ 5:50pm UTC](https://meta.discourse.org/t/issues-rebuilding-after-upgrade-to-ubuntu-22-04/225955/12 "2022-10-01T17:50:49Z")

</div>

I’ve done a few `do-release-upgrades` from 20.04 to 22.04 this weekend and I can confirm they are now all working fine without having to reinstall Docker. Something must have been fixed in the Ubuntu repos in the last few weeks.

Should be fine to do upgrades like this without issues now
