Pi-hole disabling itself/won't enable blocking

Expected Behaviour:

I expect Pi-hole to work and stay enabled.

Actual Behaviour:

Pi-hole seems to be disabling itself (blocking). ‘pihole status’ shows blocking is enabled but it still reports it is enabled when I try to run ‘pihole enable’.

E.g.

root@raspberrypi:~# pihole status
  [✓] DNS service is running
  [✗] Pi-hole blocking is Disabled
root@raspberrypi:~# pihole enable
  [i] Blocking already enabled, nothing to do

When I log into the web interface, it shows as disabled/Offline and I click the Enable button and then it shows as enabled/Active. But then I click anywhere else or refresh the page and it shows as disabled/Offline again.

It also shows 0 domains in the blocklist but that simply isn’t true. I’ve tried running ‘pihole -g’ and it shows lots of domains:

root@raspberrypi:~# pihole -g 
  [i] Pi-hole blocking is disabled
  [i] Neutrino emissions detected...
  [✓] Pulling blocklist source list into range

  [i] Target: zerodot1.gitlab.io (hosts)
  [✓] Status: No changes detected

  [i] Target: dbl.oisd.nl ()
  [✓] Status: No changes detected

  [i] Target: jasonhill.co.uk (ytadblock.txt)
  [✓] Status: No changes detected

  [✓] Consolidating blocklists
  [✓] Extracting domains from blocklists
  [i] Number of domains being pulled in by gravity: 1252118
  [✓] Removing duplicate domains
  [i] Number of unique domains trapped in the Event Horizon: 1247184
  [i] Number of whitelisted domains: 0
  [i] Number of blacklisted domains: 69
  [i] Number of regex filters: 4
  [✓] Parsing domains into hosts format
  [✓] Cleaning up stray matter

  [✓] Force-reloading DNS service
  [✓] DNS service is running
  [✗] Pi-hole blocking is Disabled

I’ve been running Pi-hole successfully for many months now and this just started happening yesterday.

Any ideas?

Let me know if there’s any other info I can provide!

Debug Token:

[✓] Your debug token is: https://tricorder.pi-hole.net/89s624ar0a

You have multiple conflicting entries for BLOCKING_ENABLED:

BLOCKING_ENABLED=true
BLOCKING_ENABLED=false

Manually edit /etc/pihole/setupVars.conf, remove the first entry, save and exit and restart FTL.

sudo nano /etc/pihole/setupVars.conf

sudo service pihole-FTL restart

pihole -g

1 Like

Thanks for your response!

I’m not sure how that would have possibly been set. I never edit that file directly. But I do do a lot of disables (most of them with time limits) through the web interface and the command line.

Anyways, that seemed to fix the issue for me! I followed what you said and then had to run pihole enable to enable blocking again. But it stayed enabled this time and changed the BLOCKING_ENABLED variable correctly in /etc/pihole/setupVars.conf too.

Thank you for your speedy help and all the great work you guys do on Pi-hole!!!