Admin console reads negative queries blocked

Please follow the below template, it will help us to help you!

Please ensure that you are running the latest version of the beta code.
Run pihole -up to update to the latest, then verify that the problem still exists before reporting it.

Problem with Beta 5.0:
As the title says I have a negative value in the queries blocked.
Debug Token:

Can you post a screen capture of what you are seeing? In this forum, you can paste the image directly into a reply.

sorry… posted it without comment.
Thanks for the help

What is the output of this command from the Pi terminal:

echo ">stats" | nc localhost 4711

Also, try from the Pi terminal sudo service pihole-FTL restart and then reload the page.

pi@piholetest:~ $ echo ">stats" | nc localhost 4711
domains_being_blocked 1698336
dns_queries_today 4622
ads_blocked_today -117
ads_percentage_today -2.531372
unique_domains 1196
queries_forwarded 2464
queries_cached 2235
clients_ever_seen 9
unique_clients 6
dns_queries_all_types 4622
reply_NODATA 914
reply_NXDOMAIN 115
reply_CNAME 2178
reply_IP 2421
privacy_level 0
status enabled

I restarted the service and my numbers look a little more realistic

Thanks again for the help. Any ideas what might have happened?

No. A user yesterday reported something similar in another thread. The developers may have some additional insight.

I’ll keep a close eye on it and report any issues

1 Like

@jfb Do you know if any progress has been made in remedying this issue? I ask because it has reappeared again

Sorry, this thread entirely slipped my attention somehow.

Not sure what is going on here. There is clearly a bug somewhere. I guess it is related to deep CNAME inspections which was the only major change to the internal machinery that could break things at such a fundamental level. I put it on my ToDo list, so I’ll be back at some point!

@hammerhead8599 I tried to locate what might be causing this but wasn’t able to find any suspicious code that could cause it. Do you also see negative numbers in the Top Blocked Domains table on the dashboard?

If the table is too small, you can get the same data from http://pi.hole/admin/api.php?summaryRaw&topItems=1000 (you need to be logged into the dashboard in the same browser).

No no negative values except the top tier…see screengrabs

I restarted the pihole-FTL service as you suggested earlier. I will watch to see if anything changes.

Well it’s back again. I will restart the pihole-FTL again. Please post if you find the issue. Thanks

Sorry for this having taken so long but I was knee-deep in the deep CNAME inspection algorithm and only came back to this now.

Proposed fix:

pihole checkout ftl fix/negative_blocked_queries

I’m also having this issue so if any testing is required i am willing to try it out

Yes, that’d be appreciated. This more eyes we have on this issue, the better. This fix should work, but the negative numbers only appeared over a longer period of time and I usually cannot afford running FTL very long on the same branch as I’m hopping from branch to branch while coding new stuff, tweaks and potentially other fixes.