After a few days of leaving Pi Hole running this occurs: http://imgur.com/xY0fG9G
Then after running gravity.sh things start working again: http://imgur.com/yyWhbOL
Sometimes the "blocked domains" goes to "0". But the blocked ads always remains at "0" until I rerun the gravity script.
I've had similar problems where it would show 1 or 0 domains blocked.
Hi there, can you try updating to the latest version (curl -L https://install.pi-hole.net | bash) to see if this problem is fixed.
Many thanks
I got the exact same problem :( I updated two days ago (4/8/16) and today it happened again. Please help, I love my pi hole :)
Hmmm. This is a strange one.
If you're all on the latest version, could you please run pihole -d and then paste the output (/var/log/pihole_debug.log) into a pastebin then link it here? thanks!
Just happened again: http://i.imgur.com/MpJ0gsB.png
_Edit by Promofaux - moved output to pastebin... http://pastebin.com/2nzVwJAQ_
Just happened to me with
http://i.imgur.com/tfpIKjj.png
_Edit by Promofaux - moved output to pastebin.. http://pastebin.com/g9BfJ8MK_
Fixed by reinstalled :/
@rj45jack and @0xc0ffea, can you please copy the log instead to http://pastebin.com and link it? It helps clean up the conversation.
I've just come across this issue also. I noticed I was being served ads. When I loaded the admin panel, I was shown that there were 3 domains being blacklisted.
I fixed by rerunning the gravity script (pihole -g).
I'm running my Pi-Hole on Debian hosted in a VM, so not exactly a normal setup. I updated from 2.5.3 to 2.6.2, and only encountered the issue a few days after the upgrade process.
I had fixed the problem prior to seeing this issue thread, so unfortunately I don't have a dump file for you. If it recurs I will get you one.
O.o It's happening here too, I think...

It appears that only the hostname of the pi, pi.hole (another way to reach the pi... pi.hole/admin), and the blacklist are present in the blocklist. So the actual lists and the whitelist do not get added...
After running gravity, it works... Weird.
OK, so it sounds like this may be down to permissions. I thought the cron job ran as root, though?
Same issue here: suddenly down to 3 domains being blocked. I re-ran the full installer before seeing this thread. I was (and am a still) on v2.6.1.2 -- all was OK on 2.5.3 before.
I just started getting this problem after upgrading from 2.5.3 and confirmed it on two other devices. Runs fine for couple days then down to 3 or 4 blocked domains until gravity is run.
Right, I think we can definitely put this down to the cron job, as it seems to have happened at the same(ish) time for everyone. (The cron job is set to run at 01:59 every Sunday)
Interestingly, this hasn't happened on my setup, but I'm not using a raspberry pi............
Had the same issue, quick fis ix running pihole -g (gravity list update)
Permissions after running pihole -g

Permissions after cron runs the same command:

Now to find the bit that is removing write permissions from gravity.list... I think that may be the issue here!
Out of curiosity, how did you run the cron script?
I haven't been able to replicate. After running the cron script I'm still seeing:

I cheated, I set it to run every minute and rebooted the machine!

Hax. Will follow you down the rabbit hole to see if I can replicate.
Well that's interesting. Note the file size of the gravity list and the permissions:

Then 30 seconds later (before the cron script re-executes)

It's like it's rebuilding the file in the background before cron fires again (which I know is because I just set it to run each minute). Also, permissions on the files are wrong now..
Just tail'ed the gravity list. It's being written out, then being cleaned for some reason. Every minute like clock work it's populating. SS attached in my next comment, because hardcore RDP/VM copy paste derp.
So the way gravity works is like so:
pihole.3.accretionDisc.txt) over the top of gravity.list _(I think this might be where it's going wrong. I might be wrong though)_pihole.n.* filesIt may be that we just need to preface this line with a Nope, not that.$SUDO, however as cron runs the script as root, that shouldn't matter
Trying that SS again:

I had not thought to tail gravity.list! Yeah, as per my previous post, It get's overwritten when gravity runs.
I'm getting realllly weird outputs from tails now.
I've just fixed everything on my end. If you need more testing or anything, please give me a shout. In the meantime, food :)
It's strange, according to mail, the cron job is getting different numbers of domains on each run of pihole -g
I have some stuff at my actual job to be getting on with, but I will give it some thought and let you know if I need anything! Thanks!
Update
Found it! Its the spinner function that is causing the issues, weirdly. It's kind of hacked in anyway, so I'll remove it.
@articuno1au Can I borrow you for testing purposes, please?
cd /etc/.pihole
sudo git fetch
sudo git checkout BugFix409
./automated\ install/basic-install.sh
Then make the changes to the cron job again as we did earlier and confirm that it's fixed!
Thanks
Testing now. Will edit with results.
EDIT::
The output from tail was much much better this time. Looks like more like 100k domains.
Showing the correct number of domains in the admin interface and permissions appear correct. Waiting for the cron job to cycle a few more times before I'll say it looks fixed.
Looking good.


I'd be calling it fixed.
Nice work sir :)
Super, that's good enough for me. Will merge and release! Hold your horses!
(by the way, just sudo git checkout master and re-run the install script again to go back to main branch.)
Cheers.
I had already done so to save me having to nano into my cron files again. Advanced laziness ;)
Although, truth be told, I probably should have waited for you to publish before I did it..
OK! Fixed in 2.6.2! Re-run install script to update (next up.. a working update script. #soon)
@PromoFaux - Apologies if this re-opens (I'm a bitbucket user).
If you need help testing anything in the future, just mention me and I'll come check it out. I'm in GMT+10, so I should be off work when you're pushing stuff.