# Cannot upgrade / send emails / fetch themes... Docker problem?

**URL:** https://meta.discourse.org/t/cannot-upgrade-send-emails-fetch-themes-docker-problem/355006
**Category:** Support
**Created:** [February 28, 2025, 10:18am UTC](https://meta.discourse.org/t/cannot-upgrade-send-emails-fetch-themes-docker-problem/355006 "2025-02-28T10:18:13Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![Paracelsus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/paracelsus/32/164912_2.png) [@Paracelsus](https://meta.discourse.org/u/Paracelsus)
#### Post date: [February 28, 2025, 10:18am UTC](https://meta.discourse.org/t/cannot-upgrade-send-emails-fetch-themes-docker-problem/355006/1 "2025-02-28T10:18:13Z")

</div>

Hi,

In the last days we started suddenly having an issue with sending emails… then we’ve tried to upgrade/update without success (the update page hangs and every component - docker, discourse, plugins - get stuck at “Checking for new version…”) and then we tried to update everything via root but the rebuild fails giving the following message (among other things):

```plaintext
fatal: unable to access 'https://github.com/discourse/discourse.git/': Could not resolve host: github.com`

```

Our host has confirmed that there are no problems with the server connectivity, SSL, firewall or any other thing.

I suspect is something with docker. Even checked this topic: [Docker sometimes fails to connect to github.com - Installation - Discourse Meta](https://meta.discourse.org/t/docker-sometimes-fails-to-connect-to-github-com/250643/2) and tried:

```plaintext
# cd /var/discourse/
# ./launcher enter app
# wget -O - -v https://github.com/discourse/logster.git/ |wc

```

and got the following:

```plaintext
--2025-02-28 09:45:51-- https://github.com/discourse/logster.git
Resolving github.com (github.com)... failed: Temporary failure in name resolution.
wget: unable to resolve host address ‘github.com’
      0 0 0

```

Any ideas on how to address this issue?

---

<div class="post-metadata">

### Author: ![Ed\_S](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ed_s/32/134015_2.png) [@Ed\_S](https://meta.discourse.org/u/Ed_S)
#### Post date: [February 28, 2025, 11:12am UTC](https://meta.discourse.org/t/cannot-upgrade-send-emails-fetch-themes-docker-problem/355006/2 "2025-02-28T11:12:08Z")

</div>

Are you operating in a special territory such as mainland China?

I would check DNS on your host and then check DNS in your docker.

check DNS on your host:

```plaintext
resolvectl status|egrep Servers
nslookup github.com

```

check DNS in your docker

```plaintext
docker exec -it app bash -c "cat /etc/resolv.conf"
docker exec -it app bash -c "wget -O - -v https://github.com/discourse/logster.git/ |wc"

```

---

<div class="post-metadata">

### Author: ![Paracelsus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/paracelsus/32/164912_2.png) [@Paracelsus](https://meta.discourse.org/u/Paracelsus)
#### Post date: [February 28, 2025, 12:34pm UTC](https://meta.discourse.org/t/cannot-upgrade-send-emails-fetch-themes-docker-problem/355006/3 "2025-02-28T12:34:18Z")

</div>

Ok, so:

on host DNS:

```plaintext
#resolvectl status|egrep Servers
DNS Servers: 8.8.8.8
Fallback DNS Servers: 8.8.8.8
DNS Servers: 8.8.8.8 8.8.4.4

```

```plaintext
#nslookup github.com
Server: 8.8.8.8
Address: 8.8.8.8#53

Non-authoritative answer:
Name: github.com
Address: 140.82.112.3

```

On Docker DNS:

```plaintext
#docker exec -it app bash -c "cat /etc/resolv.conf"
# Generated by Docker Engine.
# This file can be edited; Docker Engine will not make further changes once it
# has been modified.

nameserver 8.8.8.8
nameserver 8.8.4.4

# Based on host file: '/etc/resolv.conf' (legacy)
# Overrides: [nameservers]

```

```plaintext
#docker exec -it app bash -c "wget -O - -v https://github.com/discourse/logster.git/ |wc"
--2025-02-28 12:20:17-- https://github.com/discourse/logster.git/
Resolving github.com (github.com)... failed: Temporary failure in name resolution.
wget: unable to resolve host address ‘github.com’
      0 0 0

```

P.S: Our host operates in Canada.

---

<div class="post-metadata">

### Author: ![Ed\_S](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ed_s/32/134015_2.png) [@Ed\_S](https://meta.discourse.org/u/Ed_S)
#### Post date: [February 28, 2025, 12:44pm UTC](https://meta.discourse.org/t/cannot-upgrade-send-emails-fetch-themes-docker-problem/355006/4 "2025-02-28T12:44:29Z")

</div>

Thanks… I have no idea how this might happen, but I’m not a docker expert.

What’s your host OS, and how did you install Discourse? Did you use a package supplied by the hosting company, or is it a [standard install](https://meta.discourse.org/t/142537?silent=true)? (Or a dev install??) How did you install Docker?

But this all used to work, and then stopped working, so possibly it is docker related. Perhaps you can update your docker installation??

---

<div class="post-metadata">

### Author: ![Paracelsus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/paracelsus/32/164912_2.png) [@Paracelsus](https://meta.discourse.org/u/Paracelsus)
#### Post date: [February 28, 2025, 1:08pm UTC](https://meta.discourse.org/t/cannot-upgrade-send-emails-fetch-themes-docker-problem/355006/5 "2025-02-28T13:08:24Z")

</div>

It’s a [standard install](https://meta.discourse.org/t/142537?silent=true) that have been working very well so far in AlmaLinux in the past few months (and before that well too in CentOS).

How can I update the docker installation (without the usual rebuild instruction with launcher or the through the website as none of these methods seem to be working)?

---

<div class="post-metadata">

### Author: ![Ed\_S](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ed_s/32/134015_2.png) [@Ed\_S](https://meta.discourse.org/u/Ed_S)
#### Post date: [February 28, 2025, 1:26pm UTC](https://meta.discourse.org/t/cannot-upgrade-send-emails-fetch-themes-docker-problem/355006/6 "2025-02-28T13:26:11Z")

</div>

Before you go any further, please take a backup (if you can) and download a local copy. (Perhaps try [Move a Discourse site to another VPS with rsync](https://meta.discourse.org/t/move-a-discourse-site-to-another-vps-with-rsync/43812))

Please try these, they might give a hint:

```plaintext
docker --version
docker run hello-world

```

---

<div class="post-metadata">

### Author: ![Paracelsus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/paracelsus/32/164912_2.png) [@Paracelsus](https://meta.discourse.org/u/Paracelsus)
#### Post date: [February 28, 2025, 8:58pm UTC](https://meta.discourse.org/t/cannot-upgrade-send-emails-fetch-themes-docker-problem/355006/7 "2025-02-28T20:58:19Z")

</div>

With a bit of help from ChatGPT I found that it is the Docker’s Bridge network configuration or whatever that means that is the problem.

I’ve tried several fixes but so far without success. Haven’t tried this one yet:

 ![The image provides steps to manually reset Docker networking by stopping Docker, deleting the network directory, and restarting Docker. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/e/5/e/e5e27e6aa7ae47d284b9f557a935d5b31eb377c8.png)

Is this safe for a production environment? (even if it creates a short downtime)

---

<div class="post-metadata">

### Author: ![Ed\_S](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ed_s/32/134015_2.png) [@Ed\_S](https://meta.discourse.org/u/Ed_S)
#### Post date: [February 28, 2025, 9:06pm UTC](https://meta.discourse.org/t/cannot-upgrade-send-emails-fetch-themes-docker-problem/355006/8 "2025-02-28T21:06:18Z")

</div>

I’m afraid I don’t know. I trust you have a safe recent backup. The least disruptive thing to do might be a reboot.

---

<div class="post-metadata">

### Author: ![Paracelsus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/paracelsus/32/164912_2.png) [@Paracelsus](https://meta.discourse.org/u/Paracelsus)
#### Post date: [March 2, 2025, 9:51pm UTC](https://meta.discourse.org/t/cannot-upgrade-send-emails-fetch-themes-docker-problem/355006/9 "2025-03-02T21:51:53Z")

</div>

I’m just posting to update on the situation. It got solved with help from ChatGPT.

After trying different solutions, this part showed that something was wrong with the permissions or security policies:

> 1. Try Running a Container with the --privileged Flag
> 
> This bypasses some restrictions that might be affecting networking.
> 
> `docker run --rm --privileged alpine ping -c 4 github.com`
> 
> If this works, it suggests a permissions or security policy issue.

After that, applied the next suggestion:

> 1. Check iptables Rules Again
> 
> Since Docker relies on iptables, let’s confirm it has the correct forwarding rules.
> 
> Run:
> 
> `sudo iptables -t nat -L -v -n | grep -i docker`
> 
> If no Docker-related rules appear, manually add them:
> 
> ```plaintext
> sudo iptables -P FORWARD ACCEPT
> 
> sudo iptables -A FORWARD -i docker0 -o eth0 -j ACCEPT
> 
> sudo iptables -t nat -A POSTROUTING -s 172.17.0.0/16 ! -o docker0 -j MASQUERADE
> 
> ```
> 
> Then restart Docker:
> 
> `sudo systemctl restart docker`
> 
> And test again.

… which totally did it. 😁

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [April 1, 2025, 9:52pm UTC](https://meta.discourse.org/t/cannot-upgrade-send-emails-fetch-themes-docker-problem/355006/10 "2025-04-01T21:52:40Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
