# Cannot rebuild app due to nameserver DNS issues "could not resolve host github.com"

**URL:** <https://meta.discourse.org/t/cannot-rebuild-app-due-to-nameserver-dns-issues-could-not-resolve-host-github-com/192272>\
**Category:** Product Support\
**Created:** [June 1, 2021, 11:44am UTC](https://meta.discourse.org/t/cannot-rebuild-app-due-to-nameserver-dns-issues-could-not-resolve-host-github-com/192272 "2021-06-01T11:44:27Z")\
**Posts on this page:** 14\
**Page:** 1

## AI-generated summary

User [annakein](/t/-/192272/1) is experiencing DNS issues, specifically unable to resolve `github.com`, when trying to rebuild their Discourse app. [pfaffman](/t/-/192272/2) suggests it's likely a DNS or networking problem rather than a Discourse issue.

[annakein](/t/-/192272/3) shares their `/etc/resolv.conf` file, which includes nameservers `127.0.0.53`, `8.8.8.8`, and `8.8.4.4`. [pfaffman](/t/-/192272/4) advises removing the other nameserver if using Google's, as Linux may overwrite the file.

After making changes to the `resolv.conf` file, [annakein](/t/-/192272/6) is unsure if they need to restart Docker. [pfaffman](/t/-/192272/8) recommends testing with the `curl` command and then trying to rebuild the app.

[annakein](/t/-/192272/9) suspects a recent change to their SSH configuration might be the cause, but [itsbhanusharma](/t/-/192272/10) and [pfaffman](/t/-/192272/12) disagree. [pfaffman](/t/-/192272/12) suggests replacing the local DNS server with `8.8.8.8` and checking for any pending upgrades or reboots.

[Lecter](/t/-/192272/13) recommends running `sudo apt-get update && sudo apt-get upgrade -y` and then attempting to rebuild. [pfaffman](/t/-/192272/14) agrees that an update and reboot might solve the issue, and [Lecter](/t/-/192272/15) confirms this worked for a similar issue they experienced.

<div class="post-metadata">

**Author:** ![annakein](https://avatars.discourse-cdn.com/v4/letter/a/dec6dc/32.png) [@annakein](https://meta.discourse.org/u/annakein)\
**Post date:** [June 1, 2021, 11:44am UTC](https://meta.discourse.org/t/cannot-rebuild-app-due-to-nameserver-dns-issues-could-not-resolve-host-github-com/192272/1 "2021-06-01T11:44:28Z")

</div>

```plaintext
Ensuring launcher is up to date
Fetching origin
fatal: unable to access 'https://github.com/discourse/discourse_docker.git/': Could not resolve host : github.com
error: Could not fetch origin
Launcher is up-to-date

```

And also  
`curl https://github.com/` doesn’t work

---

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [June 1, 2021, 12:21pm UTC](https://meta.discourse.org/t/cannot-rebuild-app-due-to-nameserver-dns-issues-could-not-resolve-host-github-com/192272/2 "2021-06-01T12:21:12Z")

</div>

Hey Anna! Sorry you’re having trouble. Either github is down, or, more likely, you have a dns or networking problem.

---

<div class="post-metadata">

**Author:** ![annakein](https://avatars.discourse-cdn.com/v4/letter/a/dec6dc/32.png) [@annakein](https://meta.discourse.org/u/annakein)\
**Post date:** [June 1, 2021, 12:23pm UTC](https://meta.discourse.org/t/cannot-rebuild-app-due-to-nameserver-dns-issues-could-not-resolve-host-github-com/192272/3 "2021-06-01T12:23:50Z")

</div>

I found some solutions in discourse community but none of them solve my problem.

Maybe I should change my nameserver in `resolv.conf` but I have no idea this is right or wrong nameserver address.

```plaintext
nameserver 127.0.0.53
options edns0 trust-ad
nameserver 8.8.8.8
nameserver 8.8.4.4

```

Thanks a lot

---

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [June 1, 2021, 1:16pm UTC](https://meta.discourse.org/t/cannot-rebuild-app-due-to-nameserver-dns-issues-could-not-resolve-host-github-com/192272/4 "2021-06-01T13:16:56Z")

</div>

It’s not a Discourse problem, so this isn’t the best place to look for a solution.

If you’re going to use the Google name servers then you should remove the other one. Also, in many configurations, Linux will overwrite resolve.conf, so if changing name servers fixes the problem you’ll still need to do a bit more to see that it’s actually resolved.

---

<div class="post-metadata">

**Author:** ![annakein](https://avatars.discourse-cdn.com/v4/letter/a/dec6dc/32.png) [@annakein](https://meta.discourse.org/u/annakein)\
**Post date:** [June 1, 2021, 1:29pm UTC](https://meta.discourse.org/t/cannot-rebuild-app-due-to-nameserver-dns-issues-could-not-resolve-host-github-com/192272/6 "2021-06-01T13:29:42Z")

</div>

![image](https://global.discourse-cdn.com/meta/original/3X/5/7/572c685c73bbb0619bd4317c80eef10c6dd0f03c.png)

So you mean I might remove `nameserver 127.0.0.53`?

---

<div class="post-metadata">

**Author:** ![annakein](https://avatars.discourse-cdn.com/v4/letter/a/dec6dc/32.png) [@annakein](https://meta.discourse.org/u/annakein)\
**Post date:** [June 1, 2021, 2:25pm UTC](https://meta.discourse.org/t/cannot-rebuild-app-due-to-nameserver-dns-issues-could-not-resolve-host-github-com/192272/7 "2021-06-01T14:25:19Z")

</div>

Should I do something after change nameserver in `resolv.conf` like rerun docker?

---

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [June 1, 2021, 2:28pm UTC](https://meta.discourse.org/t/cannot-rebuild-app-due-to-nameserver-dns-issues-could-not-resolve-host-github-com/192272/8 "2021-06-01T14:28:34Z")

</div>

You can try the `curl` command and see if it works, and if it does, you can try to `./launcher rebuild app`

---

<div class="post-metadata">

**Author:** ![annakein](https://avatars.discourse-cdn.com/v4/letter/a/dec6dc/32.png) [@annakein](https://meta.discourse.org/u/annakein)\
**Post date:** [June 1, 2021, 2:35pm UTC](https://meta.discourse.org/t/cannot-rebuild-app-due-to-nameserver-dns-issues-could-not-resolve-host-github-com/192272/9 "2021-06-01T14:35:18Z")

</div>

I looked at my test server and found it has like this

```plaintext
nameserver 127.0.0.53
options edns0 trust-ad

```

So I followed that but still not working.

My thought is I changed `/etc/ssh/sshd_config` file to use ssh remote from my local PC  
Changed like  
` PasswordAuthentication no -> PasswordAuthentication yes`

Do you think this change might affect the server?

---

<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:** [June 1, 2021, 3:14pm UTC](https://meta.discourse.org/t/cannot-rebuild-app-due-to-nameserver-dns-issues-could-not-resolve-host-github-com/192272/10 "2021-06-01T15:14:22Z")

</div>

> [@annakein](#):
>
> My thought is I changed `/etc/ssh/sshd_config` file to use ssh remote from my local PC  
> Changed like  
> ` PasswordAuthentication no -> PasswordAuthentication yes`

This shouldn’t affect DNS resolution on your server.

---

<div class="post-metadata">

**Author:** ![annakein](https://avatars.discourse-cdn.com/v4/letter/a/dec6dc/32.png) [@annakein](https://meta.discourse.org/u/annakein)\
**Post date:** [June 1, 2021, 3:30pm UTC](https://meta.discourse.org/t/cannot-rebuild-app-due-to-nameserver-dns-issues-could-not-resolve-host-github-com/192272/11 "2021-06-01T15:30:20Z")

</div>

Really have no idea why my server has this problem.

I didn’t really do anything.

My community was running fine, but all of a sudden this happened to me and I couldn’t connect to my website

---

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [June 1, 2021, 8:42pm UTC](https://meta.discourse.org/t/cannot-rebuild-app-due-to-nameserver-dns-issues-could-not-resolve-host-github-com/192272/12 "2021-06-01T20:42:57Z")

</div>

> [@annakein](#):
>
> So I followed that but still not working

Sometimes the local dns server gets broken. Replace that with 8.8.8.8 and see if that fixes it.

Have you rebooted lately? Maybe it’s in adding limbo upgrade state.

---

<div class="post-metadata">

**Author:** ![Lecter](https://avatars.discourse-cdn.com/v4/letter/l/ecccb3/32.png) [@Lecter](https://meta.discourse.org/u/Lecter)\
**Post date:** [June 1, 2021, 9:27pm UTC](https://meta.discourse.org/t/cannot-rebuild-app-due-to-nameserver-dns-issues-could-not-resolve-host-github-com/192272/13 "2021-06-01T21:27:25Z")

</div>

I had a similar issue recently, try running the following command, then attempt to rebuild.

`sudo apt-get update && sudo apt-get upgrade -y`

Another option, if the rebuild fails, would be `./discourse-doctor`

---

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [June 1, 2021, 11:04pm UTC](https://meta.discourse.org/t/cannot-rebuild-app-due-to-nameserver-dns-issues-could-not-resolve-host-github-com/192272/14 "2021-06-01T23:04:01Z")

</div>

I don’t think Discourse-doctor will be any help here. It’s an OS issue.

Doing an update and reboot is a good idea.

---

<div class="post-metadata">

**Author:** ![Lecter](https://avatars.discourse-cdn.com/v4/letter/l/ecccb3/32.png) [@Lecter](https://meta.discourse.org/u/Lecter)\
**Post date:** [June 1, 2021, 11:42pm UTC](https://meta.discourse.org/t/cannot-rebuild-app-due-to-nameserver-dns-issues-could-not-resolve-host-github-com/192272/15 "2021-06-01T23:42:37Z")

</div>

That’s a good point, update and reboot worked for a similar issue I had a few days back.
