Possible "DNS resolution is currently unavailable" solution?

I like many are struggling with "DNS resolution is currently unavailable". Most of the discussions have either been closed or are now long and contain many different issues. Here is my take on the problem.

I am running Pi-Hole in a Docker container on an Ubuntu host. If you run uname from the Pi-Hole container sh, you get Ubuntu so this appears to be an "Ubuntu" issues.

The Ubuntu host has it's own built in name server, systemd-resolved, running on port 53 so that needed to be stopped and disabled. The other issue with systemd-resolved is that it keeps overwriting /etc/resolv.conf and adding 127.0.0.53 as the nameserver. Once I stopped that I was able to edit /etc/resolv.conf specifying 127.0.0.1 for Pi-Hole as the nameserver and have it survive a reboot.

The Pi-Hole container running Ubuntu has a very similar issue but uses 127.0.0.11. The issue here is the fact that a Docker container has an ephemeral file system. You change the file system on a running container, you don't affect the underlying image and your changes will be quickly lost. Try baking the changed /etc/resolv.conf into an image layer.

The reason I say a "possible" is that I am running multiple versions of Pi-Hole and not all of them are affected.

Affected version:

  • Docker Tag 2021.12.1
  • Pi-hole [v5.7]
  • FTL [v5.12.1]
  • Web Interface [v5.9]

Apperently unaffected version:

  • Pi-hole [v5.3.1]
  • Web Interface [v5.5]
  • FTL [v5.8.1]

I had a similar issue previously with ansible+docker+grafana setup on Diet-Pi. It was resolved by using the vendor supplied (dietpi-software) docker-compose and portainer.

From there I just ran my shit as normal and no more docker trying to access the wrong (I think it’s called loopback?) address.

TL;DR: I do not believe this is a Pi-hole issue

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