Queries Unknown After Update to Pi-hole 4.2.2

I was a happy user of Pi-hole on Raspberry Pi 3 Model B Plus for more than a year. But several days ago I have updated my Pi-hole to 4.2.2 and FTL 4.2.3. Since that update, I have experienced several problems listed below.

After pihole -r did not restore ads blocking on my home network, I tried reinstalling the pihole and resetting my router to factory settings and trying to set it up fresh.

I have set up my router's DHCP to use Pi-hole as DNS server at 192.168.0.1.



Expected Behaviour:

  1. Update Blacklist by using the web interface
  2. Query log shows blocked or OK

Actual Behaviour:

  1. Gravity is unable to update the blocked domains with a message: " No IP addresses found! Please run 'pihole -r' to reconfigure".

Running pihole -r doesn't solve the problem. And I get these messages:

[βœ“] Creating directory for blocking page, and copying files
[βœ—] Backing up index.lighttpd.html
No default index.lighttpd.html file found... not backing up
[βœ“] Restarting pihole-FTL service...
No IP addresses found! Please run 'pihole -r' to reconfigure

I have manually changed File /etc/resolv.conf to nameserver 8.8.8.8.

  1. Most of my queries are "Unknown". Is this normal, or have I missed something simple? Is this because I'm not using Pi-hole as DHCP? Should use pi-hole instead of my router as DHCP?

My host file is:

127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

127.0.1.1 raspberrypi

Debug Token:

hkmd9188pj

Am I missing something here? Thank you for your help.

There are no IPv4 or IPv6 addresses on the Pi. What does the output from sudo ip -4 address and sudo ip -6 address show?

Hi DanSchaper, output from ip -4 shows this:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    inet 192.168.0.163/24 brd 192.168.0.255 scope global eth0
       valid_lft forever preferred_lft forever

And ip -6 address shows this:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 state UNKNOWN qlen 1000
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000
    inet6 fe80::2406:a47c:92ed:4e5f/64 scope link
       valid_lft forever preferred_lft forever

It looks like there are a few issues with the configuration, I'll detail those below, but check /etc/dhcpcd.conf to make sure there is only one section declaring static IP addressing.

There's an extra config line that needs to be either removed or fixed, it may be causing configuration problems. Remove that first line and run pihole -r.

*** [ DIAGNOSING ]: Setup variables
    _ENABLED=false
    PIHOLE_INTERFACE=eth0
    IPV4_ADDRESS=192.168.0.163/24

You have invalid data in your gravity blocking lists, you can only have domains listed:

*** [ DIAGNOSING ]: Gravity list
-rw-r--r-- 1 root root 64630192 Mar 17 03:45 /etc/pihole/gravity.list
   -----head of gravity.list------
   !akamai.smartadserver.com
   !cdn1.smartadserver.com
   !diff.smartadserver.com
   !diff1.smartadserver.com

   -----tail of gravity.list------
   |javascript:*settimeout*location.href$popup
   |javascript^$popup,domain=1337x.to|biology-online.org|bitvid.sx|cloudtime.to|eztv.ag|eztv.tf|eztv.yt|flashx.tv|gorillavid.in|letwatch.us|movpod.in|nowvideo.sx|nowvideo.to|wholecloud.net
   Ζ’luwdu.cn
   Ι’oogle.com

There's some configuration issue with /etc/dnsmasq.d/<config> that is also causing issues:

*** [ DIAGNOSING ]: Pi-hole log
-rw-r--r-- 1 pihole pihole 4890434 Mar 30 20:10 /var/log/pihole.log
   -----head of pihole.log------
   Mar 30 00:00:02 dnsmasq[19601]: query[A] wpad.lan from 192.168.0.198
   Mar 30 00:00:02 dnsmasq[19601]: config error is REFUSED
   Mar 30 00:00:04 dnsmasq[19601]: query[A] www.facebook.com from 192.168.0.198
   Mar 30 00:00:04 dnsmasq[19601]: config error is REFUSED
   Mar 30 00:00:30 dnsmasq[19601]: query[A] farm5.staticflickr.com from 192.168.0.198
   Mar 30 00:00:30 dnsmasq[19601]: config error is REFUSED
   Mar 30 00:00:36 dnsmasq[19601]: query[A] wpad.lan from 192.168.0.198
   Mar 30 00:00:36 dnsmasq[19601]: config error is REFUSED

Dhcpcd.conf looks like this:

interface eth0
  static ip_address=192.168.0.163/24
  static routers=192.168.0.1
  static domain_name_servers=127.0.0.1

I have deleted _ENABLED=false from /etc/pihole/setupVars.conf. Which now looks like this:

DHCP_START=192.168.0.201
DHCP_END=192.168.0.251
DHCP_ROUTER=192.168.0.1
DHCP_LEASETIME=24
PIHOLE_DOMAIN=lan
DHCP_IPv6=true
DHCP_rapid_commit=false
DHCP_ACTIVE=false
BLOCKING_ENABLED=true
DNSMASQ_LISTENING=single
DNS_FQDN_REQUIRED=true
DNS_BOGUS_PRIV=true
DNSSEC=false
CONDITIONAL_FORWARDING=false
PIHOLE_INTERFACE=
IPV4_ADDRESS=
IPV6_ADDRESS=
PIHOLE_DNS_1=192.168.0.163#53

Ruining pihole -r showed the same two errors:

[βœ—] Backing up index.lighttpd.html
      No default index.lighttpd.html file found... not backing up
[βœ“] Restarting pihole-FTL service...
  No IP addresses found! Please run 'pihole -r' to reconfigure

I will delete the blocking lists for now until I solve the rest of the problems.
How should I tackle the dnsmasq configuration issue?

PIHOLE_INTERFACE= 
IPV4_ADDRESS= 
IPV6_ADDRESS= 

That all needs to be populated. Run pihole -r and select reconfigure.

Reconfigure produced this:

  [βœ“] Root user check

        .;;,.
        .ccccc:,.
         :cccclll:.      ..,,
          :ccccclll.   ;ooodc
           'ccll:;ll .oooodc
             .;cll.;;looo:.
                 .. ','.
                .',,,,,,'.
              .',,,,,,,,,,.
            .',,,,,,,,,,,,....
          ....''',,,,,,,'.......
        .........  ....  .........
        ..........      ..........
        ..........      ..........
        .........  ....  .........
          ........,,,,,,,'......
            ....',,,,,,,,,,,,.
               .',,,,,,,,,'.
                .',,,,,,'.
                  ..'''.

  [i] Existing PHP installation detected : PHP version 7.0.33-0+deb9u3
  [i] Reconfigure option selected
  [βœ“] Disk space check
  [βœ“] Update local cache of available packages

  [βœ“] Checking apt-get for upgraded packages... 11 updates available
  [i] It is recommended to update your OS after installing the Pi-hole!

  [i] Installer Dependency checks...
  [βœ“] Checking for apt-utils
  [βœ“] Checking for dialog
  [βœ“] Checking for debconf
  [βœ“] Checking for dhcpcd5
  [βœ“] Checking for git
  [βœ“] Checking for iproute2
  [βœ“] Checking for whiptail

  [i] Using interface: eth0
  [i] Using DNS.WATCH servers
  [i] Static IP already configured
  [i] Unable to find IPv6 ULA/GUA address, IPv6 adblocking will not be enabled
  [i] IPv4 address: 192.168.0.163/24
  [i] IPv6 address:
  [i] Web Interface On
  [i] Web Server On
  [i] Logging On.
  [i] Privacy level 0  [i] Performing reconfiguration, skipping download of local repos
  [βœ“] Resetting repository within /etc/.pihole...
  [βœ“] Resetting repository within /var/www/html/admin...
  [i] Main Dependency checks...
  [βœ“] Checking for cron
  [βœ“] Checking for curl
  [βœ“] Checking for dnsutils
  [βœ“] Checking for iputils-ping
  [βœ“] Checking for lsof
  [βœ“] Checking for netcat
  [βœ“] Checking for psmisc
  [βœ“] Checking for sudo
  [βœ“] Checking for unzip
  [βœ“] Checking for wget
  [βœ“] Checking for idn2
  [βœ“] Checking for sqlite3
  [βœ“] Checking for libcap2-bin
  [βœ“] Checking for dns-root-data
  [βœ“] Checking for resolvconf
  [βœ“] Checking for libcap2
  [βœ“] Checking for lighttpd
  [βœ“] Checking for php7.0-common
  [βœ“] Checking for php7.0-cgi
  [βœ“] Checking for php7.0-sqlite3

  [βœ“] Enabling lighttpd service to start on reboot...

  [i] FTL Checks...

  [βœ“] Detected ARM-hf architecture (armv7+)
  [i] Checking for existing FTL binary...
  [i] Latest FTL Binary already installed (v4.2.3). Confirming Checksum...
  [i] Checksum correct. No need to download!
  [βœ“] Checking for user 'pihole'
  [βœ“] Installing scripts from /etc/.pihole

  [i] Installing configs from /etc/.pihole...
  [i] Existing dnsmasq.conf found... it is not a Pi-hole file, leaving alone!
  [βœ“] Copying 01-pihole.conf to /etc/dnsmasq.d/01-pihole.conf

  [i] Installing blocking page...
  [βœ“] Creating directory for blocking page, and copying files
  [βœ—] Backing up index.lighttpd.html
      No default index.lighttpd.html file found... not backing up

  [βœ“] Installing sudoer file

  [βœ“] Installing latest Cron script

  [βœ“] Installing latest logrotate script
  [i] Backing up /etc/dnsmasq.conf to /etc/dnsmasq.conf.old

  [i] Skipping firewall configuration
  [βœ“] man pages installed and database updated
  [i] Testing if systemd-resolved is enabled
  [i] Systemd-resolved is not enabled
  [βœ“] Restarting lighttpd service...
  [βœ“] Enabling lighttpd service to start on reboot...
  [i] Restarting services...
  [βœ“] Enabling pihole-FTL service to start on reboot...
  [βœ“] Restarting pihole-FTL service...
  [βœ“] Deleting existing list cache
  [i] Pi-hole blocking is enabled
  [i] Neutrino emissions detected...
  [βœ“] Pulling blocklist source list into range

  [i] Target: raw.githubusercontent.com (hosts)
  [βœ“] Status: Retrieval successful

  [i] Target: mirror1.malwaredomains.com (justdomains)
  [βœ“] Status: Retrieval successful

  [i] Target: sysctl.org (hosts)
  [βœ“] Status: Retrieval successful

  [i] Target: zeustracker.abuse.ch (blocklist.php?download=domainblocklist)
  [βœ“] Status: Retrieval successful

  [i] Target: s3.amazonaws.com (simple_tracking.txt)
  [βœ“] Status: Retrieval successful

  [i] Target: s3.amazonaws.com (simple_ad.txt)
  [βœ“] Status: Retrieval successful

  [i] Target: hosts-file.net (ad_servers.txt)
  [βœ“] Status: Retrieval successful

  [βœ“] Consolidating blocklists
  [βœ“] Extracting domains from blocklists
  [i] Number of domains being pulled in by gravity: 134660
  [βœ“] Removing duplicate domains
  [i] Number of unique domains trapped in the Event Horizon: 112361
  [i] Number of whitelisted domains: 355
  [i] Number of blacklisted domains: 2
  [i] Number of regex filters: 0
  [βœ“] Parsing domains into hosts format
  [βœ“] Cleaning up stray matter

  [βœ“] Force-reloading DNS service
  [βœ“] DNS service is running
  [βœ“] Pi-hole blocking is Enabled
  [i] View the web interface at http://pi.hole/admin or http://192.168.0.163/admin

  [i] You may now configure your devices to use the Pi-hole as their DNS server
  [i] Pi-hole DNS (IPv4): 192.168.0.163
  [i] If you set a new IP address, please restart the server running the Pi-hole

  [i] The install log is located at: /etc/pihole/install.log

Now queries have status "OK (forwarded) UNKNOWN". It seams that nothing is filtered out. Gravity is updating the list. After restarting my router and pi-hole everything seems to be working.

Please run another pihole -d if it is not functioning still.

Here is the new debug token spj5xi5oqb.
It looks like dnsmasq "config error is REFUSED" persists.

Those look to be stale errors in the log. If you run pihole -t in an SSH session and then browse on a client do you see any REFUSED lines in the displayed logs?

You are absolutely right. No new REFUSED lines. Thank you so much for resolving all this issues for me. I have tried to do it by myself for days now.

1 Like

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