pi-hole / docker-pi-hole

Pi-hole in a docker container
https://pi-hole.net
Other
8.39k stars 1.12k forks source link

Unable start container with tag 2024.06.01 #1603

Closed corasaniti closed 3 months ago

corasaniti commented 3 months ago

With the arm v7 and v8 architecture everything seems to work with the 2024.06.01 tag but with the x64 architecture the container remains in starting for a long time and then in the "unhealth" state. I am unable to start the container and end up getting an Internal Server error. Something broke with last update 2024.06.01

I haven't tried the x86 architecture but there is probably the same problem. I downgraded to version 2024.05.0 and everything works fine again

Thank you

Thanks

PromoFaux commented 3 months ago

Can you please try the dev tag?

corasaniti commented 3 months ago

@PromoFaux I just tried the devtag and a get same error Same problem, the container remains in "unhealth" state and I get a server error, here is my log _pihole_logs.txt

PromoFaux commented 3 months ago

Ok, thanks - was half expecting that, but hoping it was just a glitch between builds as there are no differences between the two tags.

Interesting, though. Will look into it ASAP - I cannot quite see why the latest change would cause this. In theory, nothing has changed for x86_64 since the previous tag

PromoFaux commented 3 months ago

Testing with a very basic docker run --rm -it pihole/pihole:latest the container appears to be working OK on my Synology Nas:

adam@syno:/$ sudo docker ps -a
CONTAINER ID   IMAGE                           COMMAND                  CREATED         STATUS                        PORTS                                            NAMES
8a7f10c56e78   pihole/pihole:latest            "/s6-init"               2 minutes ago   Up About a minute (healthy)   53/udp, 53/tcp, 80/tcp, 67/udp                   relaxed_morse

And it's showing the correct x86_64 arch.

adam@syno:/$ sudo docker exec -it relaxed_morse bash
root@8a7f10c56e78:/# arch
x86_64
root@8a7f10c56e78:/# dpkg --print-architecture
amd64

Your log shows the following:

/opt/pihole/gravity.sh: line 316:   271 Bus error               timeout 4 dig +short "${lookupDomain}" &> /dev/null
  [✗] DNS resolution is currently unavailable
  [i] Time until retry: 120
  [✓] DNS resolution is now available

What does your compose/docker run command look like?

corasaniti commented 3 months ago

@PromoFaux Hi this is my docker-compose.

version: "2"
services:
  pihole:
    container_name: pihole
    hostname: debian11
    image: pihole/pihole
    ports:
      - "53:53/tcp"
      - "53:53/udp"
      - "67:67/udp"
      - "80:80/tcp"
      - "443:443/tcp"
    environment:
      TZ: 'Europe/Rome'
    volumes:
      - '/home/corasaniti/docker/pihole/etc-pihole/:/etc/pihole/'
      - '/home/corasaniti/docker/pihole/etc-dnsmasq.d/:/etc/dnsmasq.d/'
    dns:
      - 127.0.0.1
      - 8.8.8.8
    cap_add:
      - NET_ADMIN
    restart: unless-stopped
PromoFaux commented 3 months ago

Yeah, works OK on my machine with that same compose file... And the previous image works for you??

This is very strange indeed, there are no functional changes between previous and latest.

Can you remove the dns: - 127.0.0.1 line and see if that makes a difference? I'm also wondering if you have some kind of misconfiguration on the host. Are you able to ping/dns lookup from 8.8.8.8 on the host?

What are the contents of your /etc/pihole/setupVars.conf file?

corasaniti commented 3 months ago

@PromoFaux amazing I removed the DNS 127.0.0.1 and it worked fine. Why I didn't have this problem on arch arm v7 and v8, but only in x64/amd64?? Thanks

PromoFaux commented 3 months ago

Strange. I've definitely seen the 127.0.0.1 causing issues before. I think we used to recommend it in the readme, but that recommendation was removed at some point.

Glad it's sorted for you, and doubly glad it's not a widespread issue!