# Pi-hole not receiving queries

**URL:** <https://discourse.pi-hole.net/t/pi-hole-not-receiving-queries/39240>\
**Category:** Help\
**Created:** [October 10, 2020, 4:31am UTC](https://discourse.pi-hole.net/t/pi-hole-not-receiving-queries/39240 "2020-10-10T04:31:33Z")\
**Posts on this page:** 11\
**Page:** 2

<div class="post-metadata">

**Author:** ![josiahxwang](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/josiahxwang/32/19048_2.png) [@josiahxwang](https://discourse.pi-hole.net/u/josiahxwang)\
**Post date:** [October 14, 2020, 3:56pm UTC](https://discourse.pi-hole.net/t/pi-hole-not-receiving-queries/39240/21 "2020-10-14T15:56:00Z")

</div>

Thanks, I ran the following:

```auto
pi@raspberrypi:~ $ sudo dpkg -P --force-depends php7.3-json
dpkg: php7.3-json: dependency problems, but removing anyway as you requested:
 php7.3-cli depends on php7.3-json.
 php7.3-cgi depends on php7.3-json.

(Reading database ... 154545 files and directories currently installed.)
Removing php7.3-json (7.3.19-1~deb10u1) ...
Purging configuration files for php7.3-json (7.3.19-1~deb10u1) ...
pi@raspberrypi:~ $ sudo apt install --reinstall php7.3-json
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 dnsmasq-base : Depends: libhogweed2 (>= 2.7) but it is not installable
                Depends: libnettle4 (>= 2.2) but it is not installable
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or speci fy a solution).
pi@raspberrypi:~ $ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  dnsmasq-base php7.3-json
The following NEW packages will be installed:
  php7.3-json
The following packages will be upgraded:
  dnsmasq-base
1 upgraded, 1 newly installed, 0 to remove and 159 not upgraded.
2 not fully installed or removed.
Need to get 400 kB/416 kB of archives.
After this operation, 42.0 kB disk space will be freed.
Do you want to continue? [Y/n] y
Get:1 http://archive.raspberrypi.org/debian buster/main armhf dnsmasq-base armhf 2.80-1+rpt1 [400 kB]
Fetched 400 kB in 1s (496 kB/s)
Reading changelogs... Done
(Reading database ... 154536 files and directories currently installed.)
Preparing to unpack .../dnsmasq-base_2.80-1+rpt1_armhf.deb ...
Unpacking dnsmasq-base (2.80-1+rpt1) over (2.76-5+rpi1) ...
Selecting previously unselected package php7.3-json.
Preparing to unpack .../php7.3-json_7.3.19-1~deb10u1_armhf.deb ...
Unpacking php7.3-json (7.3.19-1~deb10u1) ...
Setting up php7.3-json (7.3.19-1~deb10u1) ...

Creating config file /etc/php/7.3/mods-available/json.ini with new version
Setting up dnsmasq-base (2.80-1+rpt1) ...
Setting up dnsmasq (2.76-5+rpi1) ...

Configuration file '/etc/dnsmasq.conf'
 ==> File on system created by you or by a script.
 ==> File also in package provided by package maintainer.
   What would you like to do about it ? Your options are:
    Y or I : install the package maintainer's version
    N or O : keep your currently-installed version
      D : show the differences between the versions
      Z : start a shell to examine the situation
 The default action is to keep your current version.
*** dnsmasq.conf (Y/I/N/O/D/Z) [default=N] ? Y
Installing new version of config file /etc/dnsmasq.conf ...
Created symlink /etc/systemd/system/multi-user.target.wants/dnsmasq.service → /l ib/systemd/system/dnsmasq.service.
Job for dnsmasq.service failed because the control process exited with error cod e.
See "systemctl status dnsmasq.service" and "journalctl -xe" for details.
invoke-rc.d: initscript dnsmasq, action "start" failed.
● dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server
   Loaded: loaded (/lib/systemd/system/dnsmasq.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Wed 2020-10-14 10:54:43 CDT; 59ms ag o
  Process: 8418 ExecStartPre=/usr/sbin/dnsmasq --test (code=exited, status=0/SUC CESS)
  Process: 8419 ExecStart=/etc/init.d/dnsmasq systemd-exec (code=exited, status= 2)

Oct 14 10:54:43 raspberrypi systemd[1]: Starting dnsmasq - A lightweight DHCP an d caching DNS server...
Oct 14 10:54:43 raspberrypi dnsmasq[8418]: dnsmasq: syntax check OK.
Oct 14 10:54:43 raspberrypi dnsmasq[8419]: dnsmasq: failed to create listening s ocket for port 53: Address already in use
Oct 14 10:54:43 raspberrypi dnsmasq[8419]: failed to create listening socket for port 53: Address already in use
Oct 14 10:54:43 raspberrypi dnsmasq[8419]: FAILED to start up
Oct 14 10:54:43 raspberrypi systemd[1]: dnsmasq.service: Control process exited, code=exited, status=2/INVALIDARGUMENT
Oct 14 10:54:43 raspberrypi systemd[1]: dnsmasq.service: Failed with result 'exi t-code'.
Oct 14 10:54:43 raspberrypi systemd[1]: Failed to start dnsmasq - A lightweight DHCP and caching DNS server.
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for dbus (1.12.16-1) ...
Processing triggers for systemd (241-7~deb10u4+rpi1) ...
pi@raspberrypi:~ $

```

The dashboard is still not working. Not sure what the dnsmasq failures are about.

---

<div class="post-metadata">

**Author:** ![yubiuser](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/yubiuser/32/12100_2.png) [@yubiuser](https://discourse.pi-hole.net/u/yubiuser)\
**Post date:** [October 14, 2020, 6:07pm UTC](https://discourse.pi-hole.net/t/pi-hole-not-receiving-queries/39240/22 "2020-10-14T18:07:47Z")

</div>

Run `php -m` again and see if `json` appears.

Somehow `dnsmasq` was installed/updated during the process. This will conflict with pihole, which has `dnsmasq` build in. So please uninstall `dnsmasq`

`sudo apt-get remove dnsmasq-base`

---

<div class="post-metadata">

**Author:** ![josiahxwang](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/josiahxwang/32/19048_2.png) [@josiahxwang](https://discourse.pi-hole.net/u/josiahxwang)\
**Post date:** [October 14, 2020, 6:15pm UTC](https://discourse.pi-hole.net/t/pi-hole-not-receiving-queries/39240/23 "2020-10-14T18:15:03Z")

</div>

Yes, json appears now.

```auto
pi@raspberrypi:~ $ php -m
[PHP Modules]
calendar
Core
ctype
date
dom
exif
fileinfo
filter
ftp
gettext
hash
iconv
intl
json
libxml
openssl
pcntl
pcre
PDO
Phar
posix
Reflection
session
shmop
SimpleXML
sockets
sodium
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zlib

[Zend Modules]
Zend OPcache

pi@raspberrypi:~ $ sudo apt-get remove dnsmasq-base
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  dnsmasq dnsmasq-base
0 upgraded, 0 newly installed, 2 to remove and 158 not upgraded.
After this operation, 967 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 154545 files and directories currently installed.)
Removing dnsmasq (2.76-5+rpi1) ...
Removing dnsmasq-base (2.80-1+rpt1) ...
Processing triggers for man-db (2.8.5-2) ...

```

I rebooted the pi-hole, but the dashboard is still broken:

 ![image](https://discourse.pi-hole.net/uploads/default/original/3X/b/f/bfe56857b5a6edc5eb87a93460632e17664bad19.png)

---

<div class="post-metadata">

**Author:** ![yubiuser](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/yubiuser/32/12100_2.png) [@yubiuser](https://discourse.pi-hole.net/u/yubiuser)\
**Post date:** [October 14, 2020, 6:19pm UTC](https://discourse.pi-hole.net/t/pi-hole-not-receiving-queries/39240/24 "2020-10-14T18:19:19Z")

</div>

Please generate a new debug token

---

<div class="post-metadata">

**Author:** ![josiahxwang](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/josiahxwang/32/19048_2.png) [@josiahxwang](https://discourse.pi-hole.net/u/josiahxwang)\
**Post date:** [October 14, 2020, 6:23pm UTC](https://discourse.pi-hole.net/t/pi-hole-not-receiving-queries/39240/25 "2020-10-14T18:23:54Z")

</div>

[https://tricorder.pi-hole.net/j9unjvexht](https://tricorder.pi-hole.net/j9unjvexht)

[I removed the debug log - it might contain sensible data]

---

<div class="post-metadata">

**Author:** ![yubiuser](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/yubiuser/32/12100_2.png) [@yubiuser](https://discourse.pi-hole.net/u/yubiuser)\
**Post date:** [October 14, 2020, 6:28pm UTC](https://discourse.pi-hole.net/t/pi-hole-not-receiving-queries/39240/26 "2020-10-14T18:28:07Z")

</div>

Your debug log looks fine.

You can try two things

1. Clear your browser's cache
2. Run `pihole -r` again (choose repair)

---

<div class="post-metadata">

**Author:** ![josiahxwang](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/josiahxwang/32/19048_2.png) [@josiahxwang](https://discourse.pi-hole.net/u/josiahxwang)\
**Post date:** [October 14, 2020, 6:33pm UTC](https://discourse.pi-hole.net/t/pi-hole-not-receiving-queries/39240/27 "2020-10-14T18:33:47Z")

</div>

After doing both things, the query log is now fixed instead of throwing an error.

However, local DNS records throws this error: DataTables warning: table id=customDNSTable - Invalid JSON response. For more information about this error, please see [http://datatables.net/tn/1](http://datatables.net/tn/1)

Groups under Group Management also throws basically the same error: DataTables warning: table id=groupsTable - Invalid JSON response. For more information about this error, please see [http://datatables.net/tn/1](http://datatables.net/tn/1)

Pi-hole diagnosis under Tools is the same: DataTables warning: table id=messagesTable - Invalid JSON response. For more information about this error, please see [http://datatables.net/tn/1](http://datatables.net/tn/1)

The overall dashboard is also not working yet. It seems like all these errors are related?

Edit: Tried this on two different browsers with the same results.

Edit 2: If it's any help, here's the output from the repair:

```auto
pi@raspberrypi:~ $ pihole -r

  [✓] Root user check

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

  [✓] Update local cache of available packages
  [i] Existing PHP installation detected : PHP version 7.3.19-1~deb10u1
  [i] Repair option selected
  [✓] Disk space check

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

  [i] Installer Dependency checks...
  [✓] Checking for dhcpcd5
  [✓] Checking for git
  [✓] Checking for iproute2
  [✓] Checking for whiptail
  [✓] Checking for dnsutils

  [✓] Supported OS detected
  [i] SELinux not detected
  [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 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 libcap2
  [✓] Checking for lighttpd
  [✓] Checking for php7.3-common
  [✓] Checking for php7.3-cgi
  [✓] Checking for php7.3-sqlite3
  [✓] Checking for php7.3-xml
  [✓] Checking for php7.3-intl

  [✓] Enabling lighttpd service to start on reboot...
  [✓] Checking for user 'pihole'

  [i] FTL Checks...

  [✓] Detected ARM-hf architecture (armv7+)
  [i] Checking for existing FTL binary...
  [i] Latest FTL Binary already installed (v5.2). Confirming Checksum...
  [i] Checksum correct. No need to download!
  [✓] 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
  [i] 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
  [✓] 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] Neutrino emissions detected...
  [✓] Pulling blocklist source list into range

  [✓] Preparing new gravity database
  [i] Target: https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
  [✓] Status: Retrieval successful
  [i] Received 56288 domains

  [i] Target: https://mirror1.malwaredomains.com/files/justdomains
  [✓] Status: Retrieval successful
  [i] Received 26854 domains

  [✓] Storing downloaded domains in new gravity database
  [✓] Building tree
  [✓] Swapping databases
  [i] Number of gravity domains: 83142 (83100 unique domains)
  [i] Number of exact blacklisted domains: 0
  [i] Number of regex blacklist filters: 0
  [i] Number of exact whitelisted domains: 0
  [i] Number of regex whitelist filters: 0
  [✓] Flushing DNS cache
  [✓] Cleaning up stray matter

  [✓] DNS service is running
  [✓] Pi-hole blocking is Enabled

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

  Current Pi-hole version is v5.1.2.
  Current AdminLTE version is v5.1.1.
  Current FTL version is v5.2.

```

---

<div class="post-metadata">

**Author:** ![yubiuser](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/yubiuser/32/12100_2.png) [@yubiuser](https://discourse.pi-hole.net/u/yubiuser)\
**Post date:** [October 14, 2020, 6:35pm UTC](https://discourse.pi-hole.net/t/pi-hole-not-receiving-queries/39240/28 "2020-10-14T18:35:47Z")

</div>

> [@yubiuser](#):
>
> Clear your browser's cache

This has worked in at least two other cases

> [@Bug when updating to 5.1 - Local DNS Records - DataTables warning: table id=customDNSTable - Invalid JSON response (Solved)](https://discourse.pi-hole.net/t/bug-when-updating-to-5-1-local-dns-records-datatables-warning-table-id-customdnstable-invalid-json-response-solved/35722):
>
> Expected Behaviour: Trying to access http://MY\_IP/admin/dns\_records.php And trying to Add a new domain/IP combination Actual Behaviour: Bad JSON response when trying to display the current list and failure when trying to add new records. Debug Token: [https://tricorder.pi-hole.net/3va8iewr51](https://tricorder.pi-hole.net/3va8iewr51)

> [@Please help pi hole database failed](https://discourse.pi-hole.net/t/please-help-pi-hole-database-failed/37942):
>
> I have just updated my pi to pi hole 5 and something has failed as i cannot see any info so for example if i go to the blocking page and insert a test site it blocks it but does not show me the ability to remove it. I've modded the pi hole and added a few pages of my own to control lights wink debug token is: [https://tricorder.pi-hole.net/ph1yct7clg](https://tricorder.pi-hole.net/ph1yct7clg)

* * *

If it's not working yet, I'm out of ideas.

---

<div class="post-metadata">

**Author:** ![josiahxwang](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/josiahxwang/32/19048_2.png) [@josiahxwang](https://discourse.pi-hole.net/u/josiahxwang)\
**Post date:** [October 14, 2020, 6:40pm UTC](https://discourse.pi-hole.net/t/pi-hole-not-receiving-queries/39240/29 "2020-10-14T18:40:11Z")

</div>

It is still not working. However the query log is now functional so that's a big step forward. Thank you for your help to get this far.

---

<div class="post-metadata">

**Author:** ![josiahxwang](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/josiahxwang/32/19048_2.png) [@josiahxwang](https://discourse.pi-hole.net/u/josiahxwang)\
**Post date:** [November 1, 2020, 1:40am UTC](https://discourse.pi-hole.net/t/pi-hole-not-receiving-queries/39240/30 "2020-11-01T01:40:56Z")

</div>

@jfb Do you have any further suggestions for fixing the dashboard?

---

<div class="post-metadata">

**Author:** ![system](https://discourse.pi-hole.net/uploads/default/original/3X/7/c/7c8792f649eeb921c5d2b4c41564ffa873d9a2b8.png) [@system](https://discourse.pi-hole.net/u/system)\
**Post date:** [November 22, 2020, 3:40am UTC](https://discourse.pi-hole.net/t/pi-hole-not-receiving-queries/39240/32 "2020-11-22T03:40:51Z")

</div>

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

[Previous page](https://discourse.pi-hole.net/t/pi-hole-not-receiving-queries/39240.md?page=1)
