4.1 DNS service won't successfully restart on Synology docker

Have taken a few attempts at this and run out of ideas.

Previous versions installed and worked fine, but while 4.1 installs well and operates perfectly on docker, any attempt to restart the container results in a "DNS service not running" error and causes the container to enter a continual restart loop.

I downloaded the new image (pihole/pihole/dev) and destroyed/recreated a new container from scratch to do the 4.1.2 upgrade.

Here's the debug token taken after a restart, while in a restart loop:

Debug Token:

4ktz43k9n4

Debug Token:

As a bonus, here's a debug token from after a successful install and restart:
0mz4tlwt7z

Can you share your docker run command? do you have --dns 127.0.0.1 and --dns 1.1.1.1 in the arguments - these are new recommended arguments - if you're missing them you might get into a reboot loop.

1 Like

Unfortunately the Synology GUI doesn't make the run command options easy to find out.. it appears to be non-trivial. (How to show the run command of a docker container - Stack Overflow).

I assume the GUI just takes whatever default docker run command comes with the image (also not easy to find in the image tarball), but I'm looking into seeing if I can force the docker run options using a docker compose yml instead (https://forum.synology.com/enu/viewtopic.php?t=143362)

Sorry if any of this is idiotic, I'm pretty new to this space.

Found some more help.. this is apparently what we do on synology to get around specifying the dns for the container: http://tonylawrence.com/posts/unix/synology/running-pihole-inside-docker/

Note that I used this set-up for 4.1.

So, as per the Synology installation recommendations, I have a volume mapping of /etc/resolv.conf to a text file (outside of the container) containing nameservers 1.1.1.1 and 127.0.0.1.

However I'm not convinced that that file is being used, as the logs show:

[i] Status: Pending...dig: parse of /etc/resolv.conf failed

And

Using default DNS servers: 8.8.8.8 & 8.8.4.4

I'm looking into file permissions and privileges but haven't seen anything suspect yet. Is this on the right track?

Is there anything I need to know about getting resolv.conf parsed successfully?

Just want to confirm that 4.0 installs and works just fine.. something changed in 4.1 that seems to forbid the Synology docker container from accessing the resolv.conf link that we use to set the DNS options in the run command.

I took my best (yet very weak) attempt at trying to figure out what is happening, but I couldn't find it, so just gonna run 4.0 until someone more knowledgeable decides to take a shot at it.

Linking the related discussion on github : Container cannot survive restart · Issue #382 · pi-hole/docker-pi-hole · GitHub

Nice discovery by BigSnicker on how to add docker capability NET_ADMIN through the GUI of synology:

*) export json settings of a standard (won't restart) pihole 4.1 container
*) edit json file to include "cap_add" : [ "NET_ADMIN" ],
*) import edited json file to create new container with high privileges

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