No DNS record found / dns_get_record() On Fresh Install

Hello everyone,

I’ve run into a bit of an issue with my fresh install of NextCloud on my OpenMediaVault Host through Docker (Portainer)

Upon my fresh install, the System Overview States: “Error occurred while checking server setup,” and upon checking my logs, it is just filled with:

dns_get_record(): A temporary server error occurred. at /app/www/public/lib/private/Http/Client/DnsPinMiddleware.php#113

and

LocalServerException
No DNS record found for www.eff.org
Cannot connect to: www.eff.org

My Docker Container is setup on a separate network that is also shared by my MariaDB so they can be isolated from the general network, however they still do have access to the internet.

I noticed using the docker console, I am able to reach the internet and ping the website needed, However there is no DNS or Gateway listed in the NextCloud Web UI. Im not too sure why as it should be provided by docker to my knowledge.

How are you verifying / testing access to the Internet? Make sure you’re testing from the command line in those containers since that’s the only perspective that matters.

I noticed using the docker console, I am able to reach the internet and ping the website needed, However there is no DNS or Gateway listed in the NextCloud Web UI. Im not too sure why as it should be provided by docker to my knowledge.

That suggests to me that your Nextcloud container is on a truly isolated network w/o external connectivity. Looks like Portainer has a toggle called “Isolated network”. I’m not entirely sure how that maps to the underlying Docker setup specifically, but try turning that off.

If still stuck, post your Compose.

Hello, thank you for your reply,

Yes I connect directly in the docker1 containers command line to check for internet connectivity and it seems to work.

I also have isolated network disabled and and am able able to connect to the internetfrom that network.

So it’s odd, on one hand the container clearly has internet, on the other, nextcloud doesn’t. Is it a issue in my configuration?

Using the same method you’re using to test connectivity in the container (successfully apparently), what happens when you test connectivity to www.eff.org?

Should be, here’s the command line output:

NAS:~# docker exec -it Nextcloud bash
NextCloud:/ #hostname -i
172.20.10.130 (Correct IP For Separate Network)
NextCloud:/#ping www.eff.org
PING www.eff.org (151.101.0.201): 56 data bytes
64 bytes from 151.101.0.201: seq=0 ttl=53 time=20.823 ms
64 bytes from 151.101.0.201: seq=1 ttl=53 time=19.859 ms

So it works through the command line, I even tried specifying certain sites through config.php to no avail. Is my docker configuration wrong? I’ll post it below to confirm I didn’t mess up or likewise.

Just for background info, the system is an OpenMediaVault Host with Docker and Portainer installed.

Ports:
10081:80
1055:443


Hmm. Odd.

What happens if you try curl -I https://www.eff.org?

Any chance you have a SOCKS proxy or anything like that on your network?

What’s in your /etc/resolv.conf on your underlying host (as well in the Nextcloud container)?

Lastly, what version of Nextcloud, precisely, is this?

I tried Disabling Pi-Hole Blocking for an hour, and it did not change anything. I suppose it shouldn’t since we were able to ping eff even with Pi-Hole.

However, I noticed that Nxetcloud WebUI does not show any gateway or DNS even though the container it runs within does, as we were able to ping. So I doubt it’s anything to do with docker, portainer or the host since they were all able to reach eff.

I’ve attached pictures that show the DNS and Gateway section on NextCloud Web UI as blank, despite the portainer settings being 1.1.1.1 and 1.0.0.1, as seen in the picture.

Also, why is resolv.conf in container 127.0.0.11 despite the portainer set as 1.1.1.1 and 1.0.0.1, respectively? That doesn’t make sense to me.

Heres the output:

NextCloud:/app/www/public#curl -I https://www.redacted.org
HTTP/2 200
server: nginx
content-type: text/html; charset=utf-8
x-content-type-options: nosniff
x-drupal-cache: MISS
expires: Sun, 19 Nov 1978 05:00:00 GMT
cache-control: public, max-age=1800
content-security-policy-report-only: default-src https: ‘unsafe-inline’ 'unsafe-sentry_key=f1118ad37b5e4afbabe3487ca42fe73e
x-frame-options: SAMEORIGIN
content-language: en
x-ua-compatible: IE=edge,chrome=1
etag: “1715918166-0”
last-modified: Fri, 17 May 2024 03:56:06 GMT
strict-transport-security: max-age=63072000; includeSubdomains; preload
x-xss-protection: 1; mode=block
x-download-options: noopen
x-permitted-cross-domain-policies: none
via: 1.1 varnish, 1.1 varnish
accept-ranges: bytes
date: Fri, 17 May 2024 03:59:23 GMT
age: 197
x-served-by: cache-sjc10032-SJC, cache-yvr1528-YVR
x-cache: HIT, HIT
x-cache-hits: 27, 1
x-timer: S1715918364.772325,VS0,VE1
vary: Cookie,fastly-ssl,Accept-Encoding
content-length: 61065

(The redacted and missing links due to forums not letting me post links)
It seems to be working just fine. I do have a site to site VPN on my network, but this should be completely avoiding that as it is on a separate Vlan.

Looking at the resolv.conf for both the container and the host I get these respectively.

Nextcloud Container
nameserver 127.0.0.11
options ndots:0

OpenMediaVault Host
192.168.1.241
192.168.1.242
These are expected as they are my PiHole Servers
Now, I think about it, let me try and see if changing these to 1.1.1.1 help. That went over my head completely lol.

Lastly, the version of nextcloud I am running is [Nextcloud Hub 8] (29.0.0) which is the latest as pulled by linuxserver