Pi-hole dont start

  • Hi, trying to run pi-hole on docker.

    Hardware: Lenovo thinkcenter M93

    OMV5


    Using:


    version: "3"


    services:

    pihole:

    container_name: pihole

    image: pihole/pihole:v5.7-amd64-buster

    ports:

    - "53:53/tcp"

    - "53:53/udp"

    - "67:67/udp"

    - "80:80/tcp"

    environment:

    TZ: 'Europe/London'

    WEBPASSWORD: 'secret'

    volumes:

    - './etc-pihole/:/etc/pihole/'

    - './etc-dnsmasq.d/:/etc/dnsmasq.d/'

    cap_add:

    - NET_ADMIN

    restart: unless-stopped


    Tried different images but always the same error.


    Existing DNS servers detected in setupVars.conf. Leaving them alone

    ::: Pre existing WEBPASSWORD found

    DNSMasq binding to default interface: eth0

    Added ENV to php:

    "PHP_ERROR_LOG" => "/var/log/lighttpd/error.log",

    "ServerIP" => "0.0.0.0",

    "VIRTUAL_HOST" => "0.0.0.0",

    Using IPv4 and IPv6

    ::: Preexisting ad list /etc/pihole/adlists.list detected ((exiting setup_blocklists early))

    https://raw.githubusercontent.…nBlack/hosts/master/hosts

    sudo: unable to open /etc/sudoers: Permission denied

    sudo: no valid sudoers sources found, quitting

    sudo: unable to initialize policy plugin

    ::: Testing pihole-FTL DNS: [cont-init.d] 20-start.sh: exited 1.

    [cont-finish.d] executing container finish scripts...

    [cont-finish.d] done.

    [s6-finish] waiting for services.

    [s6-finish] sending all processes the TERM signal.

    [s6-finish] sending all processes the KILL signal and exiting.


    Please advise to correct this error.

    Thanks

  • macom

    Hat das Thema freigeschaltet.
  • I've been experiencing the same issue for months now even though I've been using a macvlan network. It was working on my previous network setup using a 192.168.0.x address and it was working after setting up a new router with a 10.x.x.x network.

    I think it stopped working when I update the macvlan that was setup with docker to reflect the new 10.x.x.x network I was using, but I'm not sure.

    Here he commands that I've been using. The only thing that changed (that I know of) since it was working was replacing any 192.168.0 with 10.0.0


    Code
    docker network create -d macvlan --gateway 10.0.0.1 --subnet 10.0.0.0/8 -o parent=enp3s0 homenet
  • It is strange no one responds to these

    I suspect it has something to do with the permissions for sudoers and how omv has implemented this. How. To fix is a mystery

  • macom : It is very unlikely that it is my compose config. It was working before updating OMV and Docker. Using the totally default config from the pihole docker install guide yields exactly the same error and result. Also using my docker-compose file as is on another machine and OS it works perfectly fine and starts up.

    Thus I suspect something between the pihole docker image, docker and OMV not using the correct permissions or standards, but I am unsure as to what.


    Docker-compose:



    Error:


    Code
    pihole                 | sudo: unable to open /etc/sudoers: Permission denied
    pihole                 | sudo: no valid sudoers sources found, quitting
    pihole                 | sudo: unable to initialize policy plugin
    pihole                 | ::: Testing pihole-FTL DNS: [cont-init.d] 20-start.sh: exited 1.
    pihole                 | [cont-finish.d] executing container finish scripts...
    pihole                 | [cont-finish.d] done.
    pihole                 | [s6-finish] waiting for services.
    pihole                 | [s6-finish] sending all processes the TERM signal.
    • Offizieller Beitrag

    volumes:
    - /srv/dev-disk-by-label-Data/docker/containers/pihole:/etc/pihole/
    - /srv/dev-disk-by-label-Data/docker/containers/pihole/dnsmasq.d:/etc/dnsmasq.d/

    Try to change this to


    Code
    volumes: 
    - /srv/dev-disk-by-label-Data/pihole/pihole:/etc/pihole/
    - /srv/dev-disk-by-label-Data/pihole/dnsmasq:/etc/dnsmasq.d/

    Without creating these directories (they will be created when you deploy the stack).

    In that case, OMV has nothing to do with it. If it does not work, please try to get help in the pihole forum.

  • Try to change this to


    Code
    volumes: 
    - /srv/dev-disk-by-label-Data/pihole/pihole:/etc/pihole/
    - /srv/dev-disk-by-label-Data/pihole/dnsmasq:/etc/dnsmasq.d/

    Without creating these directories (they will be created when you deploy the stack).

    In that case, OMV has nothing to do with it. If it does not work, please try to get help in the pihole forum.

    The new directories are created just fine, in the root of the volume (as your suggestion) and to my original location, even placing this on the system drive or even not specifying any persistent volumes at all the exact same error is observed, that is not the issue.


    It is also unlikely that it is the pihole container (I have asked there with no response) as I have also tried dozens of older versions dating back to a year ago. I have been running pihole docker for at least 3 years on OMV without any issue.

    Also using the same latest pihole container it start up perfectly fine on a different pc running debian in the Windows Subsystem for Linux


    The only thing that changed was installing the latest OMV update and Docker updates a month back.

    Totally removing docker and reinstalling from the interface or manually as per docker guides does not rectify the issue either.


    So I am at a loss as to where the issue could be.

  • So the pihole creators are of the opinion that something has changed in how OMV implement's docker and this is why the container is not starting.

    This does make sense as this was working before and only after updating OMV to a newer version did this container stop working.


    I can do tests or what ever is needed but I am not sure where to begin.

  • There are at least three people in this thread with the same issue, for me it happened after updating OMV, I think it was to version 5.6.6


    I downgraded docker-ce to older versions and downgraded the pihole container to older versions that were previously working, which does not fix the issue.


    I don't know maybe something else has gone wrong, but I am trying to figure out what.

  • I have managed to find a solution:


    I changed the docker storage path on Open Media Vault front end to another location, copied the persistent volumes data to a backup location, deleted said docker storage directory completely. I changed the path back to the original location on the front end and let it recreate the files and directories. I copied the persistent volume data back and ran the docker-compose file and everything is now working as it should.

  • Just note if you had the same problem as me the compose wont solve your issue.


    I noticed you have

    cap_add:

    - NET_ADMIN


    add that in if you need to use DHCP



  • Thanks I will try later :)

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!