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 doesn't respond to DNS queries without container restart #66

Open
eiddor opened this issue Feb 20, 2021 · 113 comments
Open

pihole doesn't respond to DNS queries without container restart #66

eiddor opened this issue Feb 20, 2021 · 113 comments

Comments

@eiddor
Copy link
Collaborator

eiddor commented Feb 20, 2021

After a full restart of my RPi3 (shutdown and power off/on), pihole doesn't respond to DNS queries until I restart the pihole container again. Logs/testing output below:

Logs from power-on:

20.02.21 12:50:19 (-0600) Supervisor starting
20.02.21 12:49:55 (-0600)  pihole  [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
20.02.21 12:49:56 (-0600)  pihole  [s6-init] ensuring user provided files have correct perms...exited 0.
20.02.21 12:49:56 (-0600)  pihole  [fix-attrs.d] applying ownership & permissions fixes...
20.02.21 12:49:56 (-0600)  pihole  [fix-attrs.d] 01-resolver-resolv: applying... 
20.02.21 12:49:56 (-0600)  pihole  [fix-attrs.d] 01-resolver-resolv: exited 0.
20.02.21 12:49:56 (-0600)  pihole  [fix-attrs.d] done.
20.02.21 12:49:56 (-0600)  pihole  [cont-init.d] executing container initialization scripts...
20.02.21 12:49:56 (-0600)  pihole  [cont-init.d] 20-start.sh: executing... 
20.02.21 12:49:57 (-0600)  pihole   ::: Starting docker specific checks & setup for docker pihole/pihole
20.02.21 12:49:57 (-0600)  pihole  
20.02.21 12:49:57 (-0600)  pihole    [i] Installing configs from /etc/.pihole...
20.02.21 12:49:58 (-0600)  pihole    [i] Existing dnsmasq.conf found... it is not a Pi-hole file, leaving alone!
20.02.21 12:49:58 (-0600)  pihole    [i] Copying 01-pi  [â] Copying 01-pihole.conf to /etc/dnsmasq.d/01-pihole.conf
20.02.21 12:49:59 (-0600)  pihole  Converting DNS1 to PIHOLE_DNS_
20.02.21 12:49:59 (-0600)  pihole  Converting DNS2 to PIHOLE_DNS_
20.02.21 12:49:59 (-0600)  pihole  Setting DNS servers based on PIHOLE_DNS_ variable
20.02.21 12:49:59 (-0600)  pihole  ::: Pre existing WEBPASSWORD found
20.02.21 12:49:59 (-0600)  pihole  DNSMasq binding to default interface: eth0
20.02.21 12:50:00 (-0600)  pihole  Added ENV to php:
20.02.21 12:50:00 (-0600)  pihole                    "PHP_ERROR_LOG" => "/var/log/lighttpd/error.log",
20.02.21 12:50:00 (-0600)  pihole                    "ServerIP" => "0.0.0.0",
20.02.21 12:50:00 (-0600)  pihole                    "VIRTUAL_HOST" => "0.0.0.0",
20.02.21 12:50:00 (-0600)  pihole  Using IPv4 and IPv6
20.02.21 12:50:00 (-0600)  pihole  ::: Preexisting ad list /etc/pihole/adlists.list detected ((exiting setup_blocklists early))
20.02.21 12:50:00 (-0600)  pihole  https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
20.02.21 12:50:00 (-0600)  pihole  ::: Testing pihole-FTL DNS: sudo: unable to resolve host 7ed1bcc: Temporary failure in name resolution
20.02.21 12:50:06 (-0600)  pihole  FTL started!
20.02.21 12:50:07 (-0600)  pihole  ::: Testing lighttpd config: Syntax OK
20.02.21 12:50:07 (-0600)  pihole  ::: All config checks passed, cleared for startup ...
20.02.21 12:50:07 (-0600)  pihole  ::: Enabling Query Logging
20.02.21 12:50:07 (-0600)  pihole    [i] Enabling logging...
20.02.21 12:50:07 (-0600)  pihole    [i] Restarting DN  [â] Restarting DNS server
  [â] Logging has been enabled!
20.02.21 12:50:07 (-0600)  pihole   ::: Docker start setup complete
20.02.21 12:50:08 (-0600)  pihole    [i] Neutrino emissions detected...
  [â] Pulling blocklist source list into range
20.02.21 12:50:08 (-0600)  pihole  
20.02.21 12:50:08 (-0600)  pihole    [i] Preparing new  [â] Preparing new gravity database
20.02.21 12:50:08 (-0600)  pihole    [i] Using libz compression
20.02.21 12:50:08 (-0600)  pihole  
20.02.21 12:50:08 (-0600)  pihole    [i] Target: https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
20.02.21 12:50:08 (-0600)  pihole    [i] Status: Pendi  [â] Status: Connection Refused
20.02.21 12:50:08 (-0600)  pihole    [â] List download failed: using previously cached list
20.02.21 12:50:10 (-0600)  pihole    [i] Received 62904 domains
20.02.21 12:50:10 (-0600)  pihole  
20.02.21 12:50:10 (-0600)  pihole    [i] Target: https://mirror1.malwaredomains.com/files/justdomains
20.02.21 12:50:10 (-0600)  pihole    [i] Status: Pendi  [â] Status: Connection Refused
20.02.21 12:50:10 (-0600)  pihole    [â] List download failed: no cached list available
20.02.21 12:50:10 (-0600)  pihole  
20.02.21 12:50:10 (-0600)  pihole    [i] Target: http://sysctl.org/cameleon/hosts
20.02.21 12:50:10 (-0600)  pihole    [i] Status: Pendi  [â] Status: Connection Refused
20.02.21 12:50:10 (-0600)  pihole    [â] List download failed: using previously cached list
20.02.21 12:50:11 (-0600)  pihole    [i] Received 20566 domains
20.02.21 12:50:11 (-0600)  pihole  
20.02.21 12:50:11 (-0600)  pihole    [i] Target: https://zeustracker.abuse.ch/blocklist.php?download=domainblocklist
20.02.21 12:50:11 (-0600)  pihole    [i] Status: Pendi  [â] Status: Connection Refused
20.02.21 12:50:11 (-0600)  pihole    [â] List download failed: using previously cached list
20.02.21 12:50:11 (-0600)  pihole    [i] Received 0 domains
20.02.21 12:50:11 (-0600)  pihole  
20.02.21 12:50:11 (-0600)  pihole    [i] Target: https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt
20.02.21 12:50:12 (-0600)  pihole    [i] Status: Pendi  [â] Status: Connection Refused
20.02.21 12:50:12 (-0600)  pihole    [â] List download failed: using previously cached list
20.02.21 12:50:12 (-0600)  pihole    [i] Received 34 domains
20.02.21 12:50:12 (-0600)  pihole  
20.02.21 12:50:12 (-0600)  pihole    [i] Target: https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt
20.02.21 12:50:12 (-0600)  pihole    [i] Status: Pendi  [â] Status: Connection Refused
20.02.21 12:50:12 (-0600)  pihole    [â] List download failed: using previously cached list
20.02.21 12:50:12 (-0600)  pihole    [i] Received 2701 domains
20.02.21 12:50:12 (-0600)  pihole  
20.02.21 12:50:12 (-0600)  pihole    [i] Target: https://hosts-file.net/ad_servers.txt
20.02.21 12:50:13 (-0600)  pihole    [i] Status: Pendi  [â] Status: Connection Refused
20.02.21 12:50:13 (-0600)  pihole    [â] List download failed: no cached list available
20.02.21 12:50:13 (-0600)  pihole  
20.02.21 12:50:14 (-0600)  pihole    [i] Storing downl  [â] Storing downloaded domains in new gravity database
20.02.21 12:50:15 (-0600)  pihole    [i] Building tree  [â] Building tree
20.02.21 12:50:15 (-0600)  pihole    [i] Swapping data  [â] Swapping databases
20.02.21 12:50:17 (-0600)  pihole    [i] Number of gravity domains: 86205 (74489 unique domains)
20.02.21 12:50:17 (-0600)  pihole    [i] Number of exact blacklisted domains: 1
20.02.21 12:50:17 (-0600)  pihole    [i] Number of regex blacklist filters: 0
20.02.21 12:50:17 (-0600)  pihole    [i] Number of exact whitelisted domains: 108
20.02.21 12:50:17 (-0600)  pihole    [i] Number of regex whitelist filters: 0
20.02.21 12:50:17 (-0600)  pihole    [i] Flushing DNS   [â] Flushing DNS cache
20.02.21 12:50:17 (-0600)  pihole    [i] Cleaning up s  [â] Cleaning up stray matter
20.02.21 12:50:17 (-0600)  pihole  
20.02.21 12:50:18 (-0600)  pihole    [â] DNS service is listening
20.02.21 12:50:18 (-0600)  pihole       [â] UDP (IPv4)
20.02.21 12:50:18 (-0600)  pihole       [â] TCP (IPv4)
20.02.21 12:50:18 (-0600)  pihole       [â] UDP (IPv6)
20.02.21 12:50:18 (-0600)  pihole       [â] TCP (IPv6)
20.02.21 12:50:18 (-0600)  pihole  
20.02.21 12:50:18 (-0600)  pihole    [â] Pi-hole blocking is enabled
20.02.21 12:50:18 (-0600)  pihole    Pi-hole version is v5.2.4 (Latest: v5.2.4)
20.02.21 12:50:18 (-0600)  pihole    AdminLTE version is v5.4 (Latest: v5.4)
20.02.21 12:50:18 (-0600)  pihole    FTL version is v5.7 (Latest: v5.7)
20.02.21 12:50:18 (-0600)  pihole  [cont-init.d] 20-start.sh: exited 0.
20.02.21 12:50:18 (-0600)  pihole  [cont-init.d] done.
20.02.21 12:50:18 (-0600)  pihole  [services.d] starting services
20.02.21 12:50:18 (-0600)  pihole  Starting crond
20.02.21 12:50:18 (-0600)  pihole  Starting lighttpd
20.02.21 12:50:18 (-0600)  pihole  Starting PADD
20.02.21 12:50:18 (-0600)  pihole  Starting pihole-FTL (no-daemon) as root
20.02.21 12:50:18 (-0600)  pihole  [services.d] done.
20.02.21 12:49:59 (-0600)  unbound  [1613846999] unbound[1:0] notice: init module 0: validator
20.02.21 12:49:59 (-0600)  unbound  [1613846999] unbound[1:0] notice: init module 1: iterator
20.02.21 12:49:59 (-0600)  unbound  [1613846999] unbound[1:0] info: start of service (unbound 1.13.0).
20.02.21 12:50:21 (-0600) Starting service 'dbus sha256:ca6de21b82870c1b7278e017977d90be0fcf1c1bdb61ac7e059a6b194881cea5'
20.02.21 12:58:54 (-0600) Started service 'dbus sha256:ca6de21b82870c1b7278e017977d90be0fcf1c1bdb61ac7e059a6b194881cea5'
20.02.21 12:58:54 (-0600)  dbus  method return time=1613847534.437242 sender=:1.0 -> destination=:1.89 serial=585 reply_serial=2
20.02.21 12:58:54 (-0600)  dbus     object path "/org/freedesktop/systemd1/job/707"
20.02.21 12:58:54 (-0600)  dbus  method return time=1613847534.437242 sender=:1.0 -> destination=:1.89 serial=585 reply_serial=2
20.02.21 12:58:54 (-0600)  dbus     object path "/org/freedesktop/systemd1/job/707"
20.02.21 12:58:56 (-0600) Service exited 'dbus sha256:ca6de21b82870c1b7278e017977d90be0fcf1c1bdb61ac7e059a6b194881cea5'

DNS query:

bash-3.2$ nslookup
> server 10.10.10.10
Default server: 10.10.10.10
Address: 10.10.10.10#53
> google.com
;; connection timed out; no servers could be reached
>

Logs following pihole container restart:

20.02.21 13:02:07 (-0600) Killing service 'pihole sha256:4f00e2485051978fffdfb56d069f40da2b1e83ad1ef399926cc5ac157cc48264'
20.02.21 13:02:07 (-0600)  pihole  Stopping PADD
20.02.21 13:02:07 (-0600)  pihole  Stopping lighttpd
20.02.21 13:02:07 (-0600)  pihole  Stopping pihole-FTL
20.02.21 13:02:07 (-0600)  pihole  padd.sh: no process found
20.02.21 13:02:07 (-0600)  pihole  Stopping cron
20.02.21 13:02:07 (-0600)  pihole  [cont-finish.d] executing container finish scripts...
20.02.21 13:02:07 (-0600)  pihole  [cont-finish.d] done.
20.02.21 13:02:07 (-0600)  pihole  [s6-finish] waiting for services.
20.02.21 13:02:08 (-0600)  pihole  [s6-finish] sending all processes the TERM signal.
20.02.21 13:02:11 (-0600)  pihole  [s6-finish] sending all processes the KILL signal and exiting.
20.02.21 13:02:12 (-0600) Service exited 'pihole sha256:4f00e2485051978fffdfb56d069f40da2b1e83ad1ef399926cc5ac157cc48264'
20.02.21 13:02:12 (-0600) Killed service 'pihole sha256:4f00e2485051978fffdfb56d069f40da2b1e83ad1ef399926cc5ac157cc48264'
20.02.21 13:02:13 (-0600) Installing service 'pihole sha256:4f00e2485051978fffdfb56d069f40da2b1e83ad1ef399926cc5ac157cc48264'
20.02.21 13:02:13 (-0600) Installed service 'pihole sha256:4f00e2485051978fffdfb56d069f40da2b1e83ad1ef399926cc5ac157cc48264'
20.02.21 13:02:13 (-0600) Starting service 'pihole sha256:4f00e2485051978fffdfb56d069f40da2b1e83ad1ef399926cc5ac157cc48264'
20.02.21 13:02:15 (-0600) Started service 'pihole sha256:4f00e2485051978fffdfb56d069f40da2b1e83ad1ef399926cc5ac157cc48264'
20.02.21 13:02:15 (-0600)  pihole  [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
20.02.21 13:02:15 (-0600)  pihole  [s6-init] ensuring user provided files have correct perms...exited 0.
20.02.21 13:02:15 (-0600)  pihole  [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
20.02.21 13:02:15 (-0600)  pihole  [s6-init] ensuring user provided files have correct perms...exited 0.
20.02.21 13:02:15 (-0600)  pihole  [fix-attrs.d] applying ownership & permissions fixes...
20.02.21 13:02:15 (-0600)  pihole  [fix-attrs.d] 01-resolver-resolv: applying... 
20.02.21 13:02:15 (-0600)  pihole  [fix-attrs.d] 01-resolver-resolv: exited 0.
20.02.21 13:02:15 (-0600)  pihole  [fix-attrs.d] done.
20.02.21 13:02:15 (-0600)  pihole  [cont-init.d] executing container initialization scripts...
20.02.21 13:02:15 (-0600)  pihole  [cont-init.d] 20-start.sh: executing... 
20.02.21 13:02:15 (-0600)  pihole  [fix-attrs.d] applying ownership & permissions fixes...
20.02.21 13:02:15 (-0600)  pihole  [fix-attrs.d] 01-resolver-resolv: applying... 
20.02.21 13:02:15 (-0600)  pihole  [fix-attrs.d] 01-resolver-resolv: exited 0.
20.02.21 13:02:15 (-0600)  pihole  [fix-attrs.d] done.
20.02.21 13:02:15 (-0600)  pihole  [cont-init.d] executing container initialization scripts...
20.02.21 13:02:15 (-0600)  pihole  [cont-init.d] 20-start.sh: executing... 
20.02.21 13:02:15 (-0600)  pihole   ::: Starting docker specific checks & setup for docker pihole/pihole
20.02.21 13:02:16 (-0600)  pihole  
20.02.21 13:02:16 (-0600)  pihole    [i] Installing configs from /etc/.pihole...
20.02.21 13:02:16 (-0600)  pihole    [i] Existing dnsmasq.conf found... it is not a Pi-hole file, leaving alone!
20.02.21 13:02:16 (-0600)  pihole    [i] Copying 01-pihole.  [â] Copying 01-pihole.conf to /etc/dnsmasq.d/01-pihole.conf
20.02.21 13:02:17 (-0600)  pihole  Converting DNS1 to PIHOLE_DNS_
20.02.21 13:02:17 (-0600)  pihole  Converting DNS2 to PIHOLE_DNS_
20.02.21 13:02:17 (-0600)  pihole  Setting DNS servers based on PIHOLE_DNS_ variable
20.02.21 13:02:17 (-0600)  pihole  ::: Pre existing WEBPASSWORD found
20.02.21 13:02:17 (-0600)  pihole  DNSMasq binding to default interface: eth0
20.02.21 13:02:17 (-0600)  pihole  Added ENV to php:
20.02.21 13:02:17 (-0600)  pihole                       "PHP_ERROR_LOG" => "/var/log/lighttpd/error.log",
20.02.21 13:02:17 (-0600)  pihole                       "ServerIP" => "0.0.0.0",
20.02.21 13:02:17 (-0600)  pihole                       "VIRTUAL_HOST" => "0.0.0.0",
20.02.21 13:02:18 (-0600)  pihole  Using IPv4 and IPv6
20.02.21 13:02:18 (-0600)  pihole  ::: Preexisting ad list /etc/pihole/adlists.list detected ((exiting setup_blocklists early))
20.02.21 13:02:18 (-0600)  pihole  https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
20.02.21 13:02:18 (-0600)  pihole  ::: Testing pihole-FTL DNS: sudo: unable to resolve host 7ed1bcc: Name or service not known
20.02.21 13:02:19 (-0600)  pihole  FTL started!
20.02.21 13:02:19 (-0600)  pihole  ::: Testing lighttpd config: Syntax OK
20.02.21 13:02:19 (-0600)  pihole  ::: All config checks passed, cleared for startup ...
20.02.21 13:02:19 (-0600)  pihole  ::: Enabling Query Logging
20.02.21 13:02:19 (-0600)  pihole    [i] Enabling logging...
20.02.21 13:02:19 (-0600)  pihole    [i] Restarting DNS se  [â] Restarting DNS server
  [â] Logging has been enabled!
20.02.21 13:02:19 (-0600)  pihole   ::: Docker start setup complete
20.02.21 13:02:20 (-0600)  pihole    [i] Neutrino emissions detected...
  [â] Pulling blocklist source list into range
20.02.21 13:02:20 (-0600)  pihole  
20.02.21 13:02:20 (-0600)  pihole    [i] Preparing new gra  [â] Preparing new gravity database
20.02.21 13:02:20 (-0600)  pihole    [i] Using libz compression
20.02.21 13:02:20 (-0600)  pihole  
20.02.21 13:02:20 (-0600)  pihole    [i] Target: https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
20.02.21 13:02:20 (-0600)  pihole    [i] Status: Pending..  [â] Status: Retrieval successful
20.02.21 13:02:21 (-0600)  pihole    [i] Received 62904 domains
20.02.21 13:02:21 (-0600)  pihole  
20.02.21 13:02:21 (-0600)  pihole    [i] Target: https://mirror1.malwaredomains.com/files/justdomains
20.02.21 13:02:21 (-0600)  pihole    [i] Status: Pending..  [â] Status: Not found
20.02.21 13:02:21 (-0600)  pihole    [â] List download failed: no cached list available
20.02.21 13:02:21 (-0600)  pihole  
20.02.21 13:02:21 (-0600)  pihole    [i] Target: http://sysctl.org/cameleon/hosts
20.02.21 13:02:22 (-0600)  pihole    [i] Status: Pending..  [â] Status: No changes detected
20.02.21 13:02:22 (-0600)  pihole    [i] Received 20566 domains
20.02.21 13:02:22 (-0600)  pihole  
20.02.21 13:02:22 (-0600)  pihole    [i] Target: https://zeustracker.abuse.ch/blocklist.php?download=domainblocklist
20.02.21 13:02:23 (-0600)  pihole    [i] Status: Pending..  [â] Status: Retrieval successful
20.02.21 13:02:23 (-0600)  pihole    [i] Received 0 domains
20.02.21 13:02:23 (-0600)  pihole  
20.02.21 13:02:23 (-0600)  pihole    [i] Target: https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt
20.02.21 13:02:23 (-0600)  pihole    [i] Status: Pending..  [â] Status: No changes detected
20.02.21 13:02:23 (-0600)  pihole    [i] Received 34 domains
20.02.21 13:02:23 (-0600)  pihole  
20.02.21 13:02:23 (-0600)  pihole    [i] Target: https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt
20.02.21 13:02:24 (-0600)  pihole    [i] Status: Pending..  [â] Status: No changes detected
20.02.21 13:02:24 (-0600)  pihole    [i] Received 2701 domains
20.02.21 13:02:24 (-0600)  pihole  
20.02.21 13:02:24 (-0600)  pihole    [i] Target: https://hosts-file.net/ad_servers.txt
20.02.21 13:02:24 (-0600)  pihole    [i] Status: Pending..  [â] Status: Not found
20.02.21 13:02:24 (-0600)  pihole    [â] List download failed: no cached list available
20.02.21 13:02:24 (-0600)  pihole  
20.02.21 13:02:25 (-0600)  pihole    [i] Storing downloade  [â] Storing downloaded domains in new gravity database
  [â] Building tree
20.02.21 13:02:26 (-0600)  pihole    [i] Swapping database  [â] Swapping databases
20.02.21 13:02:27 (-0600)  pihole    [i] Number of gravity domains: 86205 (74489 unique domains)
20.02.21 13:02:27 (-0600)  pihole    [i] Number of exact blacklisted domains: 1
20.02.21 13:02:27 (-0600)  pihole    [i] Number of regex blacklist filters: 0
20.02.21 13:02:27 (-0600)  pihole    [i] Number of exact whitelisted domains: 108
20.02.21 13:02:27 (-0600)  pihole    [i] Number of regex whitelist filters: 0
20.02.21 13:02:27 (-0600)  pihole    [i] Flushing DNS cach  [â] Flushing DNS cache
20.02.21 13:02:27 (-0600)  pihole    [i] Cleaning up stray  [â] Cleaning up stray matter
20.02.21 13:02:27 (-0600)  pihole  
20.02.21 13:02:28 (-0600)  pihole    [â] DNS service is listening
20.02.21 13:02:28 (-0600)  pihole       [â] UDP (IPv4)
20.02.21 13:02:28 (-0600)  pihole       [â] TCP (IPv4)
20.02.21 13:02:28 (-0600)  pihole       [â] UDP (IPv6)
20.02.21 13:02:28 (-0600)  pihole       [â] TCP (IPv6)
20.02.21 13:02:28 (-0600)  pihole  
20.02.21 13:02:28 (-0600)  pihole    [â] Pi-hole blocking is enabled
20.02.21 13:02:28 (-0600)  pihole    Pi-hole version is v5.2.4 (Latest: v5.2.4)
20.02.21 13:02:28 (-0600)  pihole    AdminLTE version is v5.4 (Latest: v5.4)
20.02.21 13:02:29 (-0600)  pihole    FTL version is v5.7 (Latest: v5.7)
20.02.21 13:02:29 (-0600)  pihole  [cont-init.d] 20-start.sh: exited 0.
20.02.21 13:02:29 (-0600)  pihole  [cont-init.d] done.
20.02.21 13:02:29 (-0600)  pihole  [services.d] starting services
20.02.21 13:02:29 (-0600)  pihole  Starting lighttpd
20.02.21 13:02:29 (-0600)  pihole  Starting pihole-FTL (no-daemon) as root
20.02.21 13:02:29 (-0600)  pihole  Starting PADD
20.02.21 13:02:29 (-0600)  pihole  Starting crond
20.02.21 13:02:29 (-0600)  pihole  [services.d] done.

DNS query following pihole container restart:

bash-3.2$ nslookup
> server 10.10.10.10
Default server: 10.10.10.10
Address: 10.10.10.10#53
> google.com
Server:		10.10.10.10
Address:	10.10.10.10#53

Non-authoritative answer:
Name:	google.com
Address: 172.217.9.142
>
@klutchell
Copy link
Owner

Thanks for the logs, that's super helpful! I see that on first boot it is unable to update any of the blocklists (Status: Connection Refused) but on restart the updates work (Status: No changes detected).

On it's own this wouldn't be a problem but it indicates that on first start the pihole container is having connection issues. Have you modified the docker-compose file at all? Can you share some of your env vars?

  • DNSMASQ_LISTENING
  • INTERFACE
  • DNS1
  • DNS2
  • others? (not webpassword)

Also could you try setting the ServerIP variable to the LAN IP of your device and see if the behavior changes?

@eiddor
Copy link
Collaborator Author

eiddor commented Feb 20, 2021

Wow, good catch - I'm not sure how I missed that difference. I saw some "Connection Refused" messages but didn't notice that it was for every blocklist and kind of got used to seeing them.

No modification to docker-compose, especially while testing these branches for you. Once I get a stable version, I do change some stuff in pihole/Dockerfile to pull in a hosts file and change the font size, but again I've been careful not to do that while testing.

Environment variables:

DNS1 208.67.222.222
DNS2 208.67.220.220
DNSMASQ_LISTENING eth0
INTERFACE eth0
TZ America/Chicago

Just added ServerIP and I'm testing now. Is that a recent addition?

@eiddor
Copy link
Collaborator Author

eiddor commented Feb 20, 2021

No luck after adding ServerIP - I was really hoping for it to be that simple :-)

@eiddor
Copy link
Collaborator Author

eiddor commented Feb 21, 2021

Just to add - there's nothing special about my network:

The RPi3b is wired directly into a Cisco 9200 switch with no auth configured, so the port comes up instantly.

@klutchell
Copy link
Owner

ServerIP has been required since v4.2.2. I'll remove the optional label from the README. I also see a bunch of other env vars that are being deprecated so I'll have to clean that up soon.

https://github.com/pi-hole/docker-pi-hole#deprecated-environment-variables

Starting with the v4.1.1 release your Pi-hole container may encounter issues starting the DNS service unless ran with the following setting: --dns=127.0.0.1 --dns=1.1.1.1
The second server can be any DNS IP of your choosing, but the first dns must be 127.0.0.1

https://github.com/pi-hole/docker-pi-hole#docker-pi-hole-v411

You're not blocking 1.1.1.1 on your network in any way?

@eiddor
Copy link
Collaborator Author

eiddor commented Feb 21, 2021

Oh, man - Their Docker hub docs are a bit out of sync with the GutHub docs - https://hub.docker.com/r/pihole/pihole.
I need to revisit my "new" pihole device now (even though it's working fine).

Also, I'm reading this as ServerIP not being required unless we're running host mode. Does Balena run host mode by default? (Should it?)

Docker Pi-Hole v4.2.2
ServerIP no longer a required environment variable unless you run network 'host' mode! Feel free to remove it unless you need it to customize lighttpd

As for the DNS requirement - This is where my knowledge (or lack of) of Balena breaks down. Looking at docker-compose.yml it seems that we're covered:

dns:
      - "127.0.0.1"
      - "1.1.1.1"
    environment:
      DNSMASQ_LISTENING: eth0
      INTERFACE: eth0
      DNS1: 127.0.0.1#5053
      DNS2: 127.0.0.1#5053

Now, I'm guessing that the environment variables in the GUI override these settings (where does that magic happen?).

The thing is, I want to run OpenDNS as my upstream DNS (I work for Cisco). How do we reconcile that with the 127.0.0.1 requirement?

With the new method, I guess it would be like this:

PIHOLE_DNS_: 127.0.0.1#5053;208.67.222.222;208.67.220.220

Now, do I have to wait until Balena Pihole gets an update before I can use that?

(1.1.1.1 is fully accessible in my network, I use it all the time to test web redirect portals)

@eiddor
Copy link
Collaborator Author

eiddor commented Feb 21, 2021

I decided to try to set DNS1 to 127.0.0.1 and am still having the problem, so it wasn't that.


FYI - on my dedicated RPi running pihole, this syntax worked for me and pihole was even "smart" enough to recognize OpenDNS as the upstream

PIHOLE_DNS_ = 127.0.0.1;208.67.222.222;208.67.220.220

image

@klutchell
Copy link
Owner

Also, I'm reading this as ServerIP not being required unless we're running host mode. Does Balena run host mode by default? (Should it?)

Balena does not run in host mode by default, but this Pi-Hole stack does in order to avoid port conflicts.

network_mode: host

^^ So as you can see from the line above, ServerIP should be provided for this stack.

dns:
- "127.0.0.1"
- "1.1.1.1"

^^ These lines specify the container DNS, and aren't directly related to Pi-Hole, but according to their docs we want values similar to this to make sure Pi-Hole can start correctly (needs to resolve before it can resolve!).

In fact, since these are only used at container startup and not to perform actual runtime queries, you could replace the 1.1.1.1 with 208.67.222.222 to use OpenDNS there as well. As long as 127.0.0.1 is first.

DNS1: 127.0.0.1#5053
DNS2: 127.0.0.1#5053

^^ These DNS lines are overwritten if you provide alternate values in the dashboard. So by providing 208.67.222.222 and 1208.67.220.220 you are effectively using OpenDNS for your upstream (not related to dns: above).

Now, I'm guessing that the environment variables in the GUI override these settings (where does that magic happen?).

The balena supervisor will apply dashboard environment variables to the services and override existing ones.

You can go ahead and start using PIHOLE_DNS_=208.67.222.222;208.67.220.220 and remove the two DNS lines from your compose file and dashboard now if you want. I already have for my setup.

@eiddor
Copy link
Collaborator Author

eiddor commented Feb 21, 2021

Thanks for the thorough explanation, @klutchell !

You can go ahead and start using PIHOLE_DNS_=208.67.222.222;208.67.220.220 and remove the two DNS lines from your compose file and dashboard now if you want. I already have for my setup.

Done.

So it looks like after all of this we've:

a) taught Roddie a lot about how Balena works

b) figured out that we need to update some environment variables and docs in the project

Not a waste for me at all, but it seems like I'm still at square one and you ended up working this weekend anyway.

@klutchell
Copy link
Owner

Nah dude, I still got lots of gaming and dog walks in this weekend. We're all good.

dns:
- "127.0.0.1"
- "1.1.1.1"

What if you changed the second entry here to be something else, like google or opendns? Any difference?

Once I get a stable version, I do change some stuff in pihole/Dockerfile to pull in a hosts file and change the font size

Can you clarify these steps a bit? Anything that would impact the host OS that you would know of? I wonder if this would happen with a fresh image, or another device, to isolate the issue to the environment/network or the device.

Pro Tip: if you want to learn a ton more about how balena works, these masterclasses are killer and actually pretty fun.
https://www.balena.io/docs/learn/more/masterclasses/overview/

@eiddor
Copy link
Collaborator Author

eiddor commented Feb 21, 2021

Nah dude, I still got lots of gaming and dog walks in this weekend. We're all good.

Ha! As long as the wife isn't blaming me for gaming, we're ok.

What if you changed the second entry here to be something else, like google or opendns? Any difference?

No difference.

Can you clarify these steps a bit? Anything that would impact the host OS that you would know of? I wonder if this would happen with a fresh image, or another device, to isolate the issue to the environment/network or the device.

Harmless, I believe:

RUN echo "addn-hosts=/etc/pihole/lan.list" | sudo tee /etc/dnsmasq.d/02-lan.conf
RUN curl -sSL https://x.x.x.x/roddie/hosts -o /etc/pihole/lan.list

ENV FONTFACE Terminus
ENV FONTSIZE 10x20

Before I even opened the initial display issue I started a new application with a new device to make sure it wasn't something left-over from the last year or three. Happy to try again and only start with the dtoverlay branch. It'll take me a half hour or so.

Pro Tip: if you want to learn a ton more about how balena works, these masterclasses are killer and actually pretty fun.
https://www.balena.io/docs/learn/more/masterclasses/overview/

Excellent! Can't wait to go through them!

@eiddor
Copy link
Collaborator Author

eiddor commented Feb 22, 2021

@klutchell Fresh application and device, using the dtoverlay branch with no modifications. Same problem.

@klutchell
Copy link
Owner

Okay, thanks for testing. You're correct that your production modifications are harmless as well. Though if you wanted you could also set FONTFACE=Terminus and FONTSIZE=10x20 in the balena dashboard and skip changing the Dockerfile for those. The supervisor will use the dashboard values above all else.

For your lan hosts those can be added manually via the Pi-Hole dashboard under Local DNS -> DNS Records but your way is faster since you already have the list hosted somewhere.

Let me think about your container startup issue some more, nothing obvious is coming to me right now.

But remember that we aren't at square one cause we fixed your PADD display (and mine) and we noticed that some Pi-Hole env vars are being deprecated so we are tracking that. Also a learning experience isn't a waste in this line of work.

@eiddor
Copy link
Collaborator Author

eiddor commented Feb 22, 2021

Though if you wanted you could also set FONTFACE=Terminus and FONTSIZE=10x20 in the balena dashboard and skip changing the Dockerfile for those. The supervisor will use the dashboard values above all else.

Good to know! Is that documented somewhere? I only noticed those settings in pihole/Dockerfile a couple of months ago. It's nice to finally use all of my screen real estate :-)

For the LAN hosts there was a whole discussion about it in the comments section of the original balena-pihole blogpost from a few years ago and a few different options were thrown around. It's my entire network, which is about 90 hosts and this is just a hosts file that I have always maintained on my "main" server so that I can quickly find something if needed. It keeps things semi-automated, at least.

Related: I learned what Docker was due to that blog post and the related comment thread, and ended up writing a whole blog series about it.

Let me think about your container startup issue some more, nothing obvious is coming to me right now.

I appreciate it - Let me know if you want me to test anything. Two things are nagging at me:

  1. I don't like host mode - I'm sure it's not causing this problem, but I really don't like host mode.

  2. Something in the back of my mind keeps telling me that I see this connectivity issue whenever we have display-related changes. I'll play with some of them to see if I can get it to "unbreak."

But remember that we aren't at square one cause we fixed your PADD display (and mine) and we noticed that some Pi-Hole env vars are being deprecated so we are tracking that. Also a learning experience isn't a waste in this line of work.

True true - And I got my 3rd or 4th balena project PR submitted.

@klutchell
Copy link
Owner

If you'd like to try it without host mode you can replace the following line...

network_mode: host

... with the below lines using your device's LAN IP.

    ports:
      - "LAN_IP:53:53/tcp"
      - "LAN_IP:53:53/upd"

This is to prevent the balena engine from binding to 53 on ALL interfaces, because 53 is already in use on the balena VPN interface.

Then you should also remove the following lines from the pihole Dockerfile:

# https://serverfault.com/a/817791
# force dnsmasq to bind only the interfaces it is listening on
# otherwise dnsmasq will fail to start since balena is using 53 on some interfaces
RUN echo "bind-interfaces" >> /etc/dnsmasq.conf

After that you'll no longer be running in host mode and we can see if the behaviour changes.

You can also try resolving this error ...

::: Testing pihole-FTL DNS: sudo: unable to resolve host 7ed1bcc: Temporary failure in name resolution

... by adding 127.0.0.1 7ed1bcc to your hosts file or in the Pi-hole dashboard. Normally that error doesn't seem to have any impact but that's how I cleared it on my devices.

@eiddor
Copy link
Collaborator Author

eiddor commented Feb 22, 2021

After that you'll no longer be running in host mode and we can see if the behaviour changes.

So, I actually ended up trying this last night (I added 80/443 as well for the GUI), and I couldn't get it past this state:

image
image

Just redid it using only the 53s and got the same results. I actually had to do a "Purge data" to get it to take another push and reload again. I don't want to spend too much time on the host mode thing. If anything it should make the network connectivity from the container better, not worse. Just a sticking-point with me since networking is actually my happy place.

::: Testing pihole-FTL DNS: sudo: unable to resolve host 7ed1bcc: Temporary failure in name resolution

Got rid of that last night, too - No change. That one has always irritated me.

I just noticed that I didn't have dtoverlay defined (it's usually set to rpi-display), but the display has been working the whole time. Not really meaningful, just interesting.

@klutchell
Copy link
Owner

When you tried it did you specify the LAN IP in your ports? This part is very important to not conflict with balena services running on port 53 and may be why you ended up in a bad state?

    ports:
      - "80:80/tcp"
      - "LAN_IP:53:53/tcp"
      - "LAN_IP:53:53/upd"

@eiddor
Copy link
Collaborator Author

eiddor commented Feb 22, 2021

I tried both ways with every combination - Maybe there's another port that balena is expecting? I may come back to the host mode thing later once we figure out the problem, but in my mind host mode should make things a bit more open here and I don't want to get too distracted with it.


I'm currently in a non-working state and here's what I'm seeing:

  • the GUI works from the outside (?!)
  • local DNS queries from the pihole container work
  • DNS queries from outside the pihole container do not work (as in the OP)
  • from the host I can do a DNS query to localhost but not to the ServerIP
root@57e7e72:~# nslookup google.com
Server:    127.0.0.2
Address 1: 127.0.0.2 57e7e72

Name:      google.com
Address 1: 172.217.1.238 lax17s02-in-f14.1e100.net
Address 2: 2607:f8b0:4000:814::200e dfw25s27-in-x0e.1e100.net

root@57e7e72:~# nslookup google.com 10.10.10.10
Server:    10.10.10.10
Address 1: 10.10.10.10 57e7e72

nslookup: can't resolve 'google.com'

root@57e7e72:~# nslookup google.com 127.0.0.1 
Server:    127.0.0.1
Address 1: 127.0.0.1 57e7e72

Name:      google.com
Address 1: 172.217.9.174 dfw25s27-in-f14.1e100.net
Address 2: 2607:f8b0:4000:814::200e dfw25s27-in-x0e.1e100.net

Docker doesn't seem to think 53 is bound anywhere else:

root@57e7e72:~# balena ps -a --format="table {{.ID}}\t{{.Names}}\t{{.Ports}}\t{{.Status}}"
CONTAINER ID        NAMES                     PORTS                                            STATUS
71fa5916cc18        pihole_3310990_1706164                                                     Up 35 minutes (healthy)
6221682a7f82        dbus_3310993_1706164                                                       Exited (0) 34 minutes ago
da3f01c7f402        fbcp_3310992_1706164                                                       Up 35 minutes
d6762440786d        unbound_3310991_1706164   0.0.0.0:5053->5053/tcp, 0.0.0.0:5053->5053/udp   Up 35 minutes
f108ef13311c        resin_supervisor                                                           Up 34 minutes (healthy)

Simply restarting the pihole container makes everything work.

@klutchell
Copy link
Owner

Very odd, sorry if it feels like we are spinning our wheels here but I really want to find out what changes in the container between restarts. Can you check the content of /etc/dnsmasq.conf before and after the restart?

Also, I'm not sure what state you are in but if we are still using host networking what happens if you just remove the following line from your Dockerfile which will allow binding to all interfaces?

# https://serverfault.com/a/817791
# force dnsmasq to bind only the interfaces it is listening on
# otherwise dnsmasq will fail to start since balena is using 53 on some interfaces
RUN echo "bind-interfaces" >> /etc/dnsmasq.conf

@eiddor
Copy link
Collaborator Author

eiddor commented Feb 22, 2021

Oh no, I absolutely appreciate this and since it does seem to be network-adjacent, I am enjoying it. Plus I only use two balena apps, so the more I get to tinker with them the better. I think we're getting closer.


Check my logic here:

ServerIP:53 isn't open to the container. Docker doesn't seem to see a problem, but because we're using host networking, we don't see the explicit port as open.

ServerIP:80 works fine, so it's not an IP-binding issue.
127.0.0.1:53 works fine from the host, so it's not a DNS process issue.


Reproducing this is just a matter of doing a shutdown and power-on, so it's easy for me to test whatever can think of.

/etc/dnsmasq.conf content is the same regardless of state:

conf-dir=/etc/dnsmasq.d
bind-interfaces

user=root

Commenting out that line puts the pihole container into a very unhappy loop:

22.02.21 13:25:10 (-0600)  pihole  dnsmasq: failed to create listening socket for port 53: Address already in use
22.02.21 13:25:10 (-0600)  pihole  [cont-init.d] 20-start.sh: exited 1.
22.02.21 13:25:10 (-0600)  pihole  [cont-finish.d] executing container finish scripts...
22.02.21 13:25:10 (-0600)  pihole  [cont-finish.d] done.
22.02.21 13:25:10 (-0600)  pihole  [s6-finish] waiting for services.
22.02.21 13:25:10 (-0600)  pihole  [s6-finish] sending all processes the TERM signal.
22.02.21 13:25:13 (-0600)  pihole  [s6-finish] sending all processes the KILL signal and exiting.
22.02.21 13:25:15 (-0600) Service exited 'pihole sha256:761dcf61b473bc430c0f2c473ea4ed0303a8ee8da9f56b33a65c3b0b527f5b4d'

@klutchell
Copy link
Owner

Okay, that's the behaviour I was expecting and why that line exists. Can you confirm that the interface provided for INTERFACE and DNSMASQ_LISTENING matches the interface name on the host for your wired connection?

It seems almost like dnsmasq is binding to the wrong interface on first startup (like localhost only), but finding the correct one on a container restart. That would be very weird though, and somehow related to a race condition on startup or a delayed network event? I don't suppose you have a secondary network where you could connect one of these devices? Or even try wifi to see if the behaviour changes? I know I'm grasping at straws now.

@eiddor
Copy link
Collaborator Author

eiddor commented Feb 22, 2021

Confirmed they're both eth0

You read my mind on dnsmasq (I think we got there at the same time) - I'm collecting some lsof output at the moment. Give me a few minutes.

@eiddor
Copy link
Collaborator Author

eiddor commented Feb 22, 2021

lsof output in a "broken" state:

root@57e7e72:~# lsof -iTCP -sTCP:LISTEN
COMMAND    PID     USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
systemd      1     root   53u  IPv6  16019      0t0  TCP *:22222 (LISTEN)
dnsmasq   1531   nobody    5u  IPv4  20594      0t0  TCP 57e7e72:domain (LISTEN)
dnsmasq   1531   nobody    7u  IPv4  20596      0t0  TCP 57e7e72:domain (LISTEN)
balena-en 1849     root    6u  IPv6  23559      0t0  TCP *:5053 (LISTEN)
node      2798     root   24u  IPv6  27443      0t0  TCP *:48484 (LISTEN)
lighttpd  2938 www-data    4u  IPv4  27285      0t0  TCP *:http (LISTEN)
lighttpd  2938 www-data    5u  IPv6  27286      0t0  TCP *:http (LISTEN)
pihole-FT 2948     root    5u  IPv4  25471      0t0  TCP 57e7e72:domain (LISTEN)
pihole-FT 2948     root    7u  IPv6  25473      0t0  TCP 57e7e72:domain (LISTEN)
pihole-FT 2948     root    9u  IPv6  25475      0t0  TCP localhost:domain (LISTEN)
pihole-FT 2948     root   12u  IPv6  26154      0t0  TCP localhost:4711 (LISTEN)
pihole-FT 2948     root   17u  IPv4  25481      0t0  TCP 57e7e72:4711 (LISTEN)
root@57e7e72:~# lsof -iUDP -P -n | egrep -v '(127|::1)'
COMMAND    PID   USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
chronyd   1424   root    5u  IPv4  19470      0t0  UDP *:1234 
chronyd   1424   root    6u  IPv6  19471      0t0  UDP *:1234 
avahi-dae 1513  avahi   11u  IPv4  19104      0t0  UDP *:5353 
avahi-dae 1513  avahi   12u  IPv6  19105      0t0  UDP *:5353 
avahi-dae 1513  avahi   13u  IPv4  19106      0t0  UDP *:62747 
avahi-dae 1513  avahi   14u  IPv6  19107      0t0  UDP *:49811 
NetworkMa 1523   root   18u  IPv4  28875      0t0  UDP 10.10.10.10:68 
dnsmasq   1531 nobody    4u  IPv4  20593      0t0  UDP 10.114.102.1:53 
balena-en 1864   root    6u  IPv6  21263      0t0  UDP *:5053 
pihole-FT 2948   root    6u  IPv6  25472      0t0  UDP [fe80::84ae:1c5f:e361:59d2]:53

lsof output in a "working" state:

root@57e7e72:~# lsof -iTCP -sTCP:LISTEN
COMMAND    PID     USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
systemd      1     root   53u  IPv6  16019      0t0  TCP *:22222 (LISTEN)
dnsmasq   1531   nobody    5u  IPv4  20594      0t0  TCP 57e7e72:domain (LISTEN)
dnsmasq   1531   nobody    7u  IPv4  20596      0t0  TCP 57e7e72:domain (LISTEN)
balena-en 1849     root    6u  IPv6  23559      0t0  TCP *:5053 (LISTEN)
node      2798     root   24u  IPv6  27443      0t0  TCP *:48484 (LISTEN)
lighttpd  7246 www-data    4u  IPv4  41012      0t0  TCP *:http (LISTEN)
lighttpd  7246 www-data    5u  IPv6  41013      0t0  TCP *:http (LISTEN)
pihole-FT 7254     root    5u  IPv4  40101      0t0  TCP 57e7e72:domain (LISTEN)
pihole-FT 7254     root    7u  IPv4  40103      0t0  TCP 57e7e72:domain (LISTEN)
pihole-FT 7254     root    9u  IPv6  40105      0t0  TCP 57e7e72:domain (LISTEN)
pihole-FT 7254     root   11u  IPv6  40107      0t0  TCP localhost:domain (LISTEN)
pihole-FT 7254     root   14u  IPv4  39862      0t0  TCP 57e7e72:4711 (LISTEN)
pihole-FT 7254     root   17u  IPv6  39865      0t0  TCP localhost:4711 (LISTEN)
root@57e7e72:~# lsof -iUDP -P -n | egrep -v '(127|::1)'
COMMAND    PID   USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
chronyd   1424   root    5u  IPv4  19470      0t0  UDP *:1234 
chronyd   1424   root    6u  IPv6  19471      0t0  UDP *:1234 
avahi-dae 1513  avahi   11u  IPv4  19104      0t0  UDP *:5353 
avahi-dae 1513  avahi   12u  IPv6  19105      0t0  UDP *:5353 
avahi-dae 1513  avahi   13u  IPv4  19106      0t0  UDP *:62747 
avahi-dae 1513  avahi   14u  IPv6  19107      0t0  UDP *:49811 
NetworkMa 1523   root   18u  IPv4  28875      0t0  UDP 10.10.10.10:68 
dnsmasq   1531 nobody    4u  IPv4  20593      0t0  UDP 10.114.102.1:53 
balena-en 1864   root    6u  IPv6  21263      0t0  UDP *:5053 
pihole-FT 7254   root    4u  IPv4  40100      0t0  UDP 10.10.10.10:53 
pihole-FT 7254   root    8u  IPv6  40104      0t0  UDP [fe80::84ae:1c5f:e361:59d2]:53 

To save you some squinting, there are two differences here that I'm seeing (you may already be ahead of me with your thinking).

One of these IPv4 TCP:53 listeners is missing when things are broken (I don't know why there are two):

pihole-FT 7254     root    5u  IPv4  40101      0t0  TCP 57e7e72:domain (LISTEN)
pihole-FT 7254     root    7u  IPv4  40103      0t0  TCP 57e7e72:domain (LISTEN)

More importantly, this UDP:53 listener is missing when things are broken:

pihole-FT 7254   root    4u  IPv4  40100      0t0  UDP 10.10.10.10:53 

In both cases, dnsmasq is listening on the containerip:53but that doesn't change and shouldn't matter.

If dnsmasq is getting in the way at some point, it's gone by the time I have access to the console.

I also don't like that whatever is failing is doing so silently. Are there any other logs that I can collect that might help?

@klutchell
Copy link
Owner

Good findings, I think we are narrowing it down.

I've never tried this before now, but there seems to be a lot of info in the debug logs tool in the Pi-hole dashboard.

https://discourse.pi-hole.net/t/how-do-i-debug-my-pi-hole-installation/3104

Might be worth grabbing these before and after a restart and comparing them. The farther we get into FTL and dnsmasq territory the less help I'll be, but I'm happy to learn!

@eiddor
Copy link
Collaborator Author

eiddor commented Feb 22, 2021

Yeah, I think we're close. I've been trying various things while on calls, but I don't think I've learned anything.

That page looks to be more about secure transport of the logs /var/log than anything else - Unless I'm missing something. I'll have to dig some more and see exactly where I need to submit a debug token.

FWIW I have looked at /var/log/pihole.log and /var/log/pihole-FTL.log - nothing interesting.

Also nothing in dmesg of the pihole container - nothing.

Unsurprisingly, host networking is still nagging at me - I wonder if we can eliminate that, if we'd be able to see the binding in Docker (or an error)?

The fact that we can see a difference between lsof outputs is encouraging, I just can't help but think that somewhere somehow there's a Docker log that is waiting for us to look at it.

@klutchell
Copy link
Owner

No need to submit with a token, just click the button to generate them and a surprising amount of information is collected. Not just logs but simple diagnostic tests. Then you can copy them somewhere and compare.

@klutchell
Copy link
Owner

The balena engine logs can be viewed with journalctl -u balena -a.

@eiddor
Copy link
Collaborator Author

eiddor commented Feb 23, 2021

The balena engine logs can be viewed with journalctl -u balena -a.

I bet that's covered in the Masterclass which is tab number 28 in my browser :-)

Nothing interesting there - Everyone thinks everyone else is happy.

No need to submit with a token, just click the button to generate them and a surprising amount of information is collected. Not just logs but simple diagnostic tests. Then you can copy them somewhere and compare.

Duh - That makes a whole lot more sense than what I was thinking. Ok, I'll grab them and go through them tonight/tomorrow and let you know if anything jumps out.

Thanks again for all of your help here!

BTW - This is from within the container:

Not working:

root@57e7e72:/usr/src/app#  lsof -iUDP -P -n | egrep -v '(127|::1)'
COMMAND   PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
pihole-FT 526 root    6u  IPv6  26222      0t0  UDP [fe80::84ae:1c5f:e361:59d2]:53 

Working:

root@57e7e72:/usr/src/app#  lsof -iUDP -P -n | egrep -v '(127|::1)'
COMMAND   PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
pihole-FT 544 root    4u  IPv4  89624      0t0  UDP 10.10.10.10:53 
pihole-FT 544 root    8u  IPv6  89628      0t0  UDP [fe80::84ae:1c5f:e361:59d2]:53 

@eiddor
Copy link
Collaborator Author

eiddor commented Feb 23, 2021

So, a lot of good info in these logs - Nothing too in the weeds and everything is pretty self-explanatory.

The only difference is kind of disappointing, though. An extra port "in use" which we already know about.

Not working:

*** [ DIAGNOSING ]: Ports in use
[80] is in use by lighttpd
[80] is in use by lighttpd
[53] is in use by pihole-FTL
[53] is in use by pihole-FTL
[53] is in use by pihole-FTL
[4711] is in use by pihole-FTL
[4711] is in use by pihole-FTL

Working:

*** [ DIAGNOSING ]: Ports in use
[80] is in use by lighttpd
[80] is in use by lighttpd
[53] is in use by pihole-FTL
[53] is in use by pihole-FTL
[53] is in use by pihole-FTL
[53] is in use by pihole-FTL
[4711] is in use by pihole-FTL
[4711] is in use by pihole-FTL

The rest of the debug output is virtually identical. I'll try again tomorrow to make sure I'm not just really tired and missing something, but it seems like whatever is happening is being ignored by everything.


A few ideas --

  1. Is there a way to delay the pihole container's start and manually start it to see if it gives an error? If it works, we'll know that it's more of a timing/sequence issue.

  2. I figure out how to disable host mode and troubleshoot directly with the ports via docker.

  3. I strip all of the display-related stuff from my config and eliminate that as a variable.

@klutchell
Copy link
Owner

klutchell commented Feb 23, 2021

Is there a way to delay the pihole container's start and manually start it to see if it gives an error? If it works, we'll know that it's more of a timing/sequence issue.

Adding the following line to the bottom of your pihole service definition in the docker-compose file will not delay the container start, but it will delay any services running in the container.

    entrypoint: /bin/bash
    command:
      - -c
      - "sleep 60 && /s6-init"

Delaying the container start is a bit more tricky but we will see if that is even required.

I figure out how to disable host mode and troubleshoot directly with the ports via docker.

The following changes worked for my device:

  1. Set the ports to only bind to the lan IP (160 in my case)
    # network_mode: host
    ports:
      - 192.168.1.160:53:53/tcp
      - 192.168.1.160:53:53/udp
      - 192.168.1.160:80:80/tcp
  1. Set DNSMASQ_LISTENING and INTERFACE to all in the dashboard

I strip all of the display-related stuff from my config and eliminate that as a variable.

Just remove the fbcp and dbus services from docker-compose and delete pihole/services/padd/run. You can also remove the unbound service definition since you aren't using it.

@klutchell
Copy link
Owner

Amazing data collection above, dude. Thanks for doing all that!

I guess for now we should just set it to single and completely remove the option from the docs since it's of no use unless people disable host networking.

Yup, that's my bad. I don't think they ever changed that behaviour, I've just been using that field incorrectly from the start.

I assume 10.114.102.1 is the VPN address.

Yup.

Are we overthinking this? Is it simply a matter of pihole-FTL not being able to bind to an address that doesn't exist yet?

That was my initial thought, but the eth0 interface exists on container start as we tested with cat /proc/net/dev.
I guess we could check if it has a valid IP but I believe it does, even if it hasn't heard back from the switch yet? Though that would be a useful difference because in bridge networking mode the engine would give it a valid bridge IP immediately and never change it.

Container lsof output non-host networking (non-working)

Do you mean host networking (non-working) for this last one?

Feel free to use host vs bridge network modes going forward to avoid confusion. Bridge is the default network mode and requires we expose the ports. If you edit the post above I'll review it again but it sure looks like you are in host mode and UDP 53 is only binding to IPv6.

@eiddor
Copy link
Collaborator Author

eiddor commented Feb 27, 2021

Amazing data collection above, dude. Thanks for doing all that!

Well, I felt bad for yesterday's silliness, plus it is my problem, and obviously I'm not the type to let things go or take a break from it. It's in my brain until we get it fixed.

Yup, that's my bad. I don't think they ever changed that behaviour, I've just been using that field incorrectly from the start.

Haha - I shouldn't be laughing, but that's kind of funny. I'll get it cleaned up.

That was my initial thought, but the eth0 interface exists on container start as we tested with cat /proc/net/dev.

Ok, but note the difference in bindings above - pihole-FTL is the only process binding to 10.10.10.10:53. Everything else is binding to * or to 127.0.0.1.

We run pihole-FTL with $FTL_CMD argument but so far I haven't been able to find where that's set. Maybe we could try messing with that and bending pihole-FTL to our will (if we can find it - I've looked everywhere).

I guess we could check if it has a valid IP but I believe it does, even if it hasn't heard back from the switch yet?

At best, it would have an APIPA address, but I don't know for sure if Linux does that - I could modify 10-custom.sh to grab an ip addr show dev eth0 if you're really curious.

Though that would be a useful difference because in bridge networking mode the engine would give it a valid bridge IP immediately and never change it.

Yep!

Do you mean host networking (non-working) for this last one?

I did - will fix in a sec.

Feel free to use host vs bridge network modes going forward to avoid confusion. Bridge is the default network mode and requires we expose the ports.

Yeah... I mean, it's not like I wrote an entire blog post about this topic or anything hahahaha - Getting old sucks, man.

@eiddor
Copy link
Collaborator Author

eiddor commented Feb 27, 2021

Yeah, no v4 address to bind to, which might explain why there's no error - nothing is actually failing.

Feb 27 03:32:30 57e7e72 c2b944d7c437[1532]: 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group defau
lt qlen 1000
Feb 27 03:32:30 57e7e72 c2b944d7c437[1532]:     link/ether b8:27:eb:1c:7e:1e brd ff:ff:ff:ff:ff:ff
Feb 27 03:32:30 57e7e72 c2b944d7c437[1532]:     inet6 fe80::84ae:1c5f:e361:59d2/64 scope link noprefixroute 
Feb 27 03:32:30 57e7e72 c2b944d7c437[1532]:        valid_lft forever preferred_lft forever

pihole-FTL binds to all active IPs on the container, my IP isn't active by the time it runs, and that's that.


What would happen if you booted your pi up with the ethernet cable disconnected, connecting it after a couple of minutes?

pihole-FTL may fail because the interface is down and then just restart when it comes up, so it might not work.

But if you, say, disconnected your DHCP server for a couple of minutes and tested, I bet you'd get the same result.

@klutchell
Copy link
Owner

Getting old sucks, man.

You're telling me. I have a wicked hangover today from 3 drinks last night. 3 drinks?! I'm only 35.

pihole-FTL binds to all active IPs on the container, my IP isn't active by the time it runs, and that's that.

I was able to reproduce it by disconnecting my unmanaged switch from the LAN, so eth0 was still present but no LAN access or DHCP server. I even used the active wifi connection to verify that eth0 was present but had no IP, and FTL was not binding to anything on that interface. Upon reconnecting the switch to the LAN, eth0 got an address but FTL did not restart or retry bind or anything, cause how would it know to do that?

So, you solved it! We now know what is happening behind the scenes to explain this behaviour and we have several workarounds for cases where it may take more than a few seconds for an IP to be assigned to the selected interface.

I'm happy to put a permanent fix in to 10-custom.sh going forward, in case anyone else has network behavior similar to this. As a network guy yourself, what kind of command would be the most reliable, and fast, way to determine if a valid address has been assigned to INTERFACE?

while ! [ condition ]
do
   echo "waiting for IPv4 address on ${INTERFACE}..."
   sleep 2
done

Once we have this script in place and I've tested it, I can open a PR and you can retest it from there. I'll also roll in the DNSMASQ_LISTENING=single fix as well.

I expected a bit more fanfare at this point, but maybe I'm still in disbelief. Oh well 🍻

@eiddor
Copy link
Collaborator Author

eiddor commented Feb 27, 2021

You're telling me. I have a wicked hangover today from 3 drinks last night. 3 drinks?! I'm only 35.

I'm 50 this year, I wish I could tell you that it gets better. Haha - You're hungover and I've been thinking about this issue all night.

I was able to reproduce it by disconnecting my unmanaged switch from the LAN, so eth0 was still present but no LAN access or DHCP server. I even used the active wifi connection to verify that eth0 was present but had no IP, and FTL was not binding to anything on that interface. Upon reconnecting the switch to the LAN, eth0 got an address but FTL did not restart or retry bind or anything, cause how would it know to do that?

I just took this a bit further and tried to reproduce it on my non-Balena Rpi running the pi-hole/docker-pi-hole but couldn't do it. I changed it to use DHCP, on the switch I put the interface on a different VLAN without a DHCP server and left it there for a couple of minutes after bootup. After moving it back to the regular VLAN, it got an IP address ~40ish seconds later (STP will run on a VLAN change) and it started responding to DNS queries.

Not worth worrying about right now, but I would expect it to behave the same way. I'll throw a monitor on it later and figure it out.

I'm happy to put a permanent fix in to 10-custom.sh going forward, in case anyone else has network behavior similar to this. As a network guy yourself, what kind of command would be the most reliable, and fast, way to determine if a valid address has been assigned to INTERFACE?

So, there are probably a few ways to workaround this one, but first I want to say that this seems (to me) to be a pihole-FTL limitation. Why is it binding to active IPs instead of an interface? Is it because of dnsmasq? lighttpd is in the same container and isn't having a problem.

Per the docs, in host mode we're feeding it INTERFACE so it should bind to that. In fact, we're even feeding it ServerIP in host mode, so it should fail (and retry) if it can't bind to it.

image
image

This is partly why I want to reproduce this on my non-Balena Rpi. I looked at the pihole-FTL CLI options and there's really nothing helpful there.

Ok... now to workarounds - We have a lot of options (I'm also going to cover the ones that aren't realistic for you or me to fix, just because it's been on my mind all night):

  1. A DNS server should always have a static IP address and in theory we should recommend this in the docs. The problem is that setting a static in Balena is non-trivial. It would be really cool to be able do this during the "Add new device" workflow similar to how we configure Wifi parameters. Above our pay grades maybe, but to me this really is a best practice.

  2. Fix pihole-FTL to either bind to INTERFACE or to fail if it can't bind to ServerIP - If I can reproduce this on my other RPi, I may open an issue on that project.

Off my soapbox now, sorry. More realistic workarounds:

  1. Test for the presence of an inet4 address on INTERFACE (preferably one that matches ServerIP) by either evaluating ip -o -4 addr show dev eth0 assuming it gives a result (hopefully I'm using the right words here), or using a grep on that command for inet (using regest, or making sure we specify -4 so that v6 doesn't get in the way).

  2. Testing the result of a ping -c 1 <ServerIP> would be the most reliable.

  3. Testing for the existence of ServerIP on INTERFACE would also be a good way.

There are probably a few others, but those were the first ones I could think of.

I expected a bit more fanfare at this point, but maybe I'm still in disbelief. Oh well 🍻

Hahaha - Same! I think we're both tired of this, and honestly the problem was in front of our faces the whole time. Nothing really obscure or complex or tricky. But we did it, and I'm kind of relieved that it wasn't really because of anything in the project or that either of us did.

@klutchell
Copy link
Owner

I just took this a bit further and tried to reproduce it on my non-Balena Rpi running the pi-hole/docker-pi-hole but couldn't do it

Possibly because your docker version is different than the one the current balena engine is based on. Perhaps the hand-off of interfaces in host mode has changed in ways I can't begin to understand.

lighttpd is in the same container and isn't having a problem.

I don't know why lighttpd works. It's binding to all interfaces so maybe *:80 works differently than eth0:53.

Why is it binding to active IPs instead of an interface? Is it because of dnsmasq?

As far as I understand, pihole-FTL is a fork of dnsmasq so that's why we see config files for dnsmasq but pihole-FTL is the actual process. Also I think the binding behaviour is as follows:

  1. provide an interface name
  2. bind to 53 for each address on that interface
  3. no addresses? keep running as if everything is fine

we're even feeding it ServerIP in host mode, so it should fail (and retry) if it can't bind to it

Not a terrible idea, you could run in past the pi-hole/pi-hole-docker project and see what they think.

Testing the result of a ping -c 1 would be the most reliable

Up until now, I've been treating ServerIP as optional, so a lot of existing users may not have that env var set. In fact, the only behaviour difference I see without it is no longer being able to resolve http://pi.hole/admin on my LAN. So I agree it would be the most reliable I don't think I'm ready to force that env var on existing setups yet.

Interestingly, if we were running in host mode with proper docker and provided ServerIP, lighttpd would only bind to ServerIP. There's a snippet of code on startup that tries to identify if we are in host mode by listing interface names.

https://github.com/pi-hole/docker-pi-hole/blob/75328c63f86f3232b83e97cca0ede0613e7c5abd/bash_functions.sh#L160-L168

This has never impacted us because our bridge interface name is balena0 not docker0. Fortunate as well because we want to bind lighttpd to all interfaces for the Public Device URL functionality that uses our VPN.

@eiddor
Copy link
Collaborator Author

eiddor commented Feb 27, 2021

Perhaps the hand-off of interfaces in host mode has changed in ways I can't begin to understand.

That may be a possible reason, but I'll try to confirm in a little bit. I've never run in host mode so I don't know what "normal" looks like. Now it's just a curiosity thing.

I don't know why lighttpd works. It's binding to all interfaces so maybe *:80 works differently than eth0:53.

This is more of an OS thing than a network thing, so I'm only going by what I've seen over the years, but there seems to be four "levels" of bindings:

  • all interfaces (lighttpd is here)
  • specific interfaces
  • all IP addresses (pihole-FTL is here)
  • specific IP addresses

Just speculation above.

provide an interface name
bind to 53 for each address on that interface
no addresses? keep running as if everything is fine

This is where I think they can optimize and bind to a specific interface. I'm the furthest thing from a developer, so I don't know what the exact possibilities are here when it comes to the code/OS.

I guess from a Balena perspective there's always the possibility of conflicting with this:

dnsmasq 1531 nobody 4u IPv4 20593 0t0 UDP 10.114.102.1:53

So... I don't know if there is a "right" answer here that would work universally.

Not a terrible idea, you could run in past the pi-hole/pi-hole-docker project and see what they think.

Yeah, I want to do that once I can get my other RPi to fail. I'd rather open an issue/feature request based on an actual use-case vs. a theoretical issue, and I'm trying to avoid any finger-pointing.

I don't think I'm ready to force that env var on existing setups yet.

Ok, that makes perfect sense - I think what you've got in the PR so far looks great and should scale well since we're forcing INTERFACE.

Are we worried about wlan0 users forgetting to change INTERFACE? Does it fail today if they forget to do that?

Interestingly, if we were running in host mode with proper docker and provided ServerIP, lighttpd would only bind to ServerIP. There's a snippet of code on startup that tries to identify if we are in host mode by listing interface names.

Oh that is interesting - Just tested it here. That's clever. It's really not that different than our new test :-)

Thanks again for all of your help this (and last) week! Let me know when you want me to test the changes when you're happy with them. Feel free to roll them into dtoverlay :-)

@klutchell
Copy link
Owner

Are we worried about wlan0 users forgetting to change INTERFACE? Does it fail today if they forget to do that?

Yeah, it fails in the main branch, but it's obvious in the logs why it fails. I do it all the time when I test on wifi and forget to change the interface name. Something along the lines of unknown interface eth0 and then I remember I need to set wlan0. But honestly, no one should be running a DNS server on wifi or with a dynamic IP address).

Let me know when you want me to test the changes when you're happy with them.

I think that PR is ready to go, just leave a comment on the PR once you've tested it and I'll merge. Your screen won't work while testing this PR of course.

Feel free to roll them into dtoverlay

Once we merge wait-for-ipv4 to main I'll rebase the dtoverlay branch so you can have the best of both worlds. The dtoverlay branch is still in alpha since my colleagues have to test the new fbcp image with a bunch of screens so we can avoid regression. Can't wait to get both of these PRs into main though!

Thanks again for all of your help this (and last) week!

No thank YOU good sir. It's been a pleasure and don't be a stranger in my repos.

@klutchell
Copy link
Owner

The dtoverlay branch has been rebased on main so feel free to use that until we confirm the fbcp changes.

@eiddor
Copy link
Collaborator Author

eiddor commented Apr 13, 2021

Postscript for you, @klutchell.

While discussing another project's issue here: wouterdebie/locast2tuner#32

I started having flashbacks to this issue and decided to check how balena does things.

Sure enough, balena will start without the network being online where Docker will wait.

balena's systemd file looks like this:

[Unit]
Description=Balena Application Container Engine
Documentation=https://www.balena.io/docs/getting-started
Wants=dnsmasq.service
Requires=balena-engine.socket var-lib-docker.mount bind-etc-docker.service bind-home-root-.docker.service
After=network.target balena-engine.socket var-lib-docker.mount bind-etc-docker.service bind-home-root-.docker.service dnsmasq.service rollback-altboot.service

I'm wondering if we had these two options along with everything else if we would have ever run into this problem:

After=network-online.target
Wants=network-online.target

This is what Docker's systemd file looks like for a comparison:

[Unit]
Description=Docker Application Container Engine
Documentation=https://docs.docker.com
After=network-online.target firewalld.service containerd.service
Wants=network-online.target
Requires=docker.socket containerd.service

@klutchell
Copy link
Owner

You are likely correct, but we don't want to use network-online in the IoT space as there are many use cases where the network may not be available but we expect the engine and services to start. Especially if user applications are expected to configure the network in some way.

network-online.target is a target that actively waits until the nework is "up", where the definition of "up" is defined by the network management software. Usually it indicates a configured, routable IP address of some kind. Its primary purpose is to actively delay activation of services until the network is set up. It is an active target, meaning that is may be pulled in by the services requiring the network to be up, but is not pulled in by the network management service itself. By default all remote mounts defined in /etc/fstab pull this service in, in order to make sure the network is up before it is attempted to connect to a network share. Note that normally, if no service requires it, and if no remote mount point is configured this target is not pulled into the boot, thus avoiding any delays during boot should the network not be available. It is strongly recommended not to pull in this target too liberally: for example network server software should generally not pull this in (since server software generally is happy to accept local connections even before any routable network interface is up), its primary purpose is network client software that cannot operate without network.

@eiddor
Copy link
Collaborator Author

eiddor commented Apr 13, 2021

Hmmm interesting - So, this may reflect my lack of understanding of some of the other stuff that balena does. There are user containers that would set/modify the host network settings? How typical is this? (All of these questions are just my curiosity.)

Not that my scenario appears to be overly common, either, but would it make sense to have base images for "Internet" apps and base images for IoT/Other?

@klutchell
Copy link
Owner

We can optionally expose the host dbus, plus a number of other things like the host engine socket, to perform host OS tasks. I see it in support all the time, so it's not that rare.

I don't see the need for multiple images, if a user application requires certain features to be available at startup, that's usually trivial to add a condition to the container, vs maintaining and entire separate image for a minor change in a service file.

@klutchell
Copy link
Owner

You should do those masterclasses and ask questions like this on the forums so others can see your answers and we can improve our docs!

@eiddor
Copy link
Collaborator Author

eiddor commented Apr 13, 2021

I don't see the need for multiple images, if a user application requires certain features to be available at startup, that's usually trivial to add a condition to the container, vs maintaining and entire separate image for a minor change in a service file.

Yeah, that makes perfect sense - Thanks for the explanation!

I love this:

"Warning: Making changes to the networking of a device is extremely dangerous and can lead to a device being unrecoverable, so exercise caution with any of the following."

You should do those masterclasses and ask questions like this on the forums so others can see your answers and we can improve our docs!

I really should. Look man, I've had the tab open in my browser since you told me about it :-)

image

@eiddor
Copy link
Collaborator Author

eiddor commented Oct 26, 2023

Re-opening this for discussion and to possibly re-introduce the fix.

This issue occurs when the pi-hole device is connected to a switch that is running a proper implementation of the spanning-tree protocol (STP.) With STP there is a delay (Forwarding Delay) when the interface comes up of ~15 seconds while STP factors in the new "path" and makes sure that it will not cause any bridging loops before putting the interface into forwarding mode. This delay impacts how quickly DHCP gets an IP address for the interface. Because we run in Docker "host" mode for scalability reasons, this results in pihole-FTL not being able to bind to the interface when it is launched because there is not yet an IP address on it.

A workaround on these switches is to enable "STP Portfast" (if supported), which bypasses the STP forwarding delay on the interface and puts the port into a forwarding state immediately. While enabling portfast is a best practice when you know an interface is connected to a host (vs. another switch/potential loop), it is not enabled by default on most commercial switches, and a lot of people leave it alone unless the forwarding delay is causing problems.

Consumer switches generally do run STP, but automatically set their ports to "portfast" mode. The assumption with these switches is that they will not be connected to other switches and therefore there should not be any bridging loops in the topology.

In my case, I moved my pi-hole to a consumer switch a couple of years ago, so when this fix was removed, I wasn't impacted. I brought my pi-hole home yesterday and connected it to my Cisco switch and the issue has resurfaced.

@eiddor eiddor reopened this Oct 26, 2023
@klutchell
Copy link
Owner

Any improvements over this shell to wait for IP assignments?

while [ -z "$(ip -o -4 addr show dev "${INTERFACE}")" ]
do
   echo "Waiting for IPv4 address on ${INTERFACE}..."
   sleep 5
done

Maybe something that also supports IPv6, or does some other network magic to determine when it's okay to bind?

@eiddor
Copy link
Collaborator Author

eiddor commented Oct 27, 2023

I don't run v6 at home myself, but it would make sense to have this work for both v4 and v6 if we can do it without too much complexity. I'm not sure how many people out there are running only v6, but I'm sure they exist.

The only thing we can really test for is a proper IP address (v4/v6) being assigned to the interface, but maybe we can ping a hostname (www.google.com) and make assumptions based on the results.

One of the other alternatives we tried above was to just force a 30 second wait before starting FTL which seemed to work and also wouldn't rely on anything or have any kinds of unpredictable failures.

I just checked Adguard to see if I have the same problem there, but I think the fact that we bind with - "0.0.0.0:80" is why it works fine. Not 100% here. Adguard might also not be as sensitive as pihole-FTL.

I can't believe it's been 2 1/2 years since this discussion. A lot of this is coming back to me now.

@klutchell
Copy link
Owner

I thought about the ping of a public URL but I think Pi-hole itself is designed to start even with no internet access.

Maybe we can ping the default gateway? That should always exist and maybe fails when STP is pending? Do you want to try it?

@eiddor
Copy link
Collaborator Author

eiddor commented Oct 27, 2023

Maybe we can ping the default gateway? That should always exist and maybe fails when STP is pending? Do you want to try it?

We don't have a default gateway if we don't have an IP address, so we don't know what to ping.

@klutchell
Copy link
Owner

Maybe that's the test then? Check routes for a default gateway until one exists?

@eiddor
Copy link
Collaborator Author

eiddor commented Oct 27, 2023

That should work.

Is it much different processing wise than what we're doing with ip -o -4 addr show dev "${INTERFACE}" or is this more or less the same?

Stepping-back: I'm the only one to ever report this as an issue, since I'm sure most people don't use $30k switches in their homes. Do you think this is a problem we need to solve?

@klutchell
Copy link
Owner

Do you think this is a problem we need to solve?

Honestly no, but I wasn't going to stand in your way if you wanted to persue it.

We can leave this issue open indefinitely, or close it with the STP workaround highlighted as the solution.

@eiddor
Copy link
Collaborator Author

eiddor commented Oct 28, 2023

Sounds fair - I might update the docs to put a caveat in as well instructing people to enable portfast (and pointing them to this novel) if they encounter issues. I figure if people have a switch capable of portfast then they'll know what it means.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants