Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pihole cant resolve it self properly #1630

Closed
1 task
hornetmadness opened this issue Aug 27, 2024 · 2 comments
Closed
1 task

pihole cant resolve it self properly #1630

hornetmadness opened this issue Aug 27, 2024 · 2 comments
Labels

Comments

@hornetmadness
Copy link

hornetmadness commented Aug 27, 2024

This is a: Run Issue

Details

Related Issues

  • [X ] I have searched this repository/Pi-hole forums for existing issues and pull requests that look similar

How to reproduce the issue

  1. Environment data
  • Operating System: Debian
  • Hardware: Container
  • Kernel Architecture: 6.1.0-23-amd64 Readme #1 SMP PREEMPT_DYNAMIC Debian 6.1.99-1 (2024-07-15) x86_64 GNU/Linux
  • Docker Install Info and version:
    • Software source: docker-ce Docker version 27.1.2, build d01f264
  • Hardware architecture: x86
  1. docker-compose.yml contents, docker run shell command, or paste a screenshot of any UI based configuration of containers here
emathis@T430:~/Containers/pi-hole$ cat compose.yml
networks:
#  piholeipv6:
#    name: piholeipv6
#    enable_ipv6: true
#    ipam:
#      config:
#        - subnet: 2001:0DB8::/112
  piholeipv4:
    name: piholeipv4

# More info at https://github.com/pi-hole/docker-pi-hole/ and https://docs.pi-hole.net/
services:
  pihole:
    container_name: pihole
    image: pihole/pihole:2024.07.0
    # For DHCP it is recommended to remove these ports and instead add: network_mode: "host"
    ports:
      - "53:53/tcp"
      - "53:53/udp"
      - "8053:80/tcp"
    networks:
      #- piholeipv6
      - piholeipv4
    environment:
      #https://github.com/pi-hole/docker-pi-hole#environment-variables
      TZ: 'America/New_York'
      WEBPASSWORD: '...'
      WEBLOGS_STDOUT: 1
      PIHOLE_DNS_: 192.168.192.2
      TEMPERATUREUNIT: f
      PHP_ERROR_LOG: /dev/stderr
    # Volumes store your data between container upgrades
    volumes:
      - './etc-pihole:/etc/pihole'
      - './etc-dnsmasq.d:/etc/dnsmasq.d'
      - './resolv.conf:/etc/resolv.conf'
    restart: unless-stopped

emathis@T430:~/Containers/pi-hole$ cat compose.override.yml
services:
  pihole:
    hostname: dns1
  1. any additional info to help reproduce
    After I set the hostname in docker compose the pihole cant resolve it self correctly using that hostname. The hostname always resolves as 0.0.0.0. After confirming this by removing the FQDN and using the shortname you can see this problem.

Eriks-MacBook-Pro:~ erikmathis$ for i in $(seq 1 3); do echo -n "dns$i: "; dig @DNS${i} dns${i} +short; done
dns1: 0.0.0.0
dns2: 0.0.0.0
dns3: 0.0.0.0
Eriks-MacBook-Pro:~ erikmathis$ for i in $(seq 1 3); do echo -n "dns$i: "; dig @DNS${i} dns${i}.themathis.house +short; done
dns1: 192.168.192.32
dns2: 192.168.192.95
dns3: 192.168.192.96

Even after removing the hostname and falling back to the container name.
Eriks-MacBook-Pro:~ erikmathis$ dig @192.168.192.32 65118bb2f1f7 +short
0.0.0.0

These common fixes didn't work for my issue

  • [X ] I have tried removing/destroying my container, and re-creating a new container
  • [X ] I have tried fresh volume data by backing up and moving/removing the old volume data
  • [ X] I have tried running the stock docker run example(s) in the readme (removing any customizations I added)
  • I have tried a newer or older version of Docker Pi-hole (depending what version the issue started in for me)
  • [X ] I have tried running without my volume data mounts to eliminate volumes as the cause

If the above debugging / fixes revealed any new information note it here.
Add any other debugging steps you've taken or theories on root cause that may help.
I disabled ipv6 because I thought it was causing the issue.
Changed the hostnames several times.

@PromoFaux
Copy link
Member

I think you may be seeing the same thing as #1617

See my comment there: #1617 (comment)

But you're missing the FTLCONF_LOCAL_IPV4 environment variable (from the Readme 😉). This variable wont be required in the upcoming V6 version

Copy link

This issue is stale because it has been open 30 days with no activity. Please comment or update this issue or it will be closed in 5 days.

@github-actions github-actions bot added the stale label Sep 28, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants