Hi, it happens every now and then that the pihole-FTLis down and I wonder how to best add a automatic restart of the service?
Any advice ?
Hi, it happens every now and then that the pihole-FTLis down and I wonder how to best add a automatic restart of the service?
Any advice ?
A while ago I had a similar issue.
eventually I just settled on rebooting the whole pihole daily at 2AM.
sudo crontab -e
0 2 * * * /sbin/shutdown -r
Check /var/log/pihole-FTL.log
Is there any report as of what failed? If so, please report it to here (@DL6ER and @PromoFaux will check it) and I am 100% sure they'll fix it. Not having a failure in the first place is a lot better than fixing the symptoms by restarting the service/system.
Please check if this is still necessary. There was a pretty severe bug they inherited from dnsmasq
. This was fixed around Christmas (don't quote me on that) and restarting your system should not be needed any longer. Mind that every restart will also wipe out the cache up to this point. This is even more relevant when you also run unbound on the system.
@ sally thanks for this, but blindly restarting the service isn't an option for me, as the crash happens every now and then. Today at 5 am for example.
@ Coro thanks as well, it's not happening often, but so far I did not mind restarting the service.
@DL6ER @PromoFaux , maybe you can help here ?
The log, looks OK to me, apart from the shutdown of course, but this wasn't initiated by me
Any help is much appreciated here.
It may be worth setting the DEBUG_ALL option in /etc/pihole/pihole-FTL.conf
And then running it again until it crashes - it might provide some more useful output as to what is going on.
Could you maybe also provide a debug token in the first instance? pihole -d
and then choose to upload and it will give you a token to provide back to us
[✓] Your debug token is: https://tricorder.pi-hole.net/2zx0r1qhwz
I've also enabled the debug_all option for now. Thanks so far.
Thanks for that. I can't see anything obvious on an initial look - everything looks to be set up correctly. So I guess now we just await a further crash and go from there!
All good, thanks. Let's see when it happens again.
It seems to be over night in like 99.9% of the cases. Mostly around 5 AM sometimes a bit earlier 2 or 3 AM when my IPS disconnects me.
I'll post again then. Thanks so far !
If this happens again, please try to find out who this was. This message indicates that someone/something ran sudo service pihole-FTL stop
. No crash nothing unexpected. It did exactly that it was asked to do
Just had the next "crash" where I had to restart the FTL service. Logs are attached.
Any idea ?
Look at the last few lines:
[2021-02-28 05:00:14.839 7024M] Shutting down...
[...]
[2021-02-28 09:21:50.303 26821M] ########## FTL started! ##########
Something external from FTL (!) asked FTL to shut down at 05:00:14.839. You (re)started it later manually. So I concur with what has been said before:
Today is Sunday when it happened (Feb 28), in your earlier screenshot it was Monday (Feb 8) so it doesn't seem to be tied to a specific day. For starters, check your cron jobs if there is anything set up to run at 05:00 (whatever this may be!).
Doh, I guess it is because of my daily update Task. I was under the impression that it runs at 0:05 each day, but after checking again its 05:00 am each day.
So it's 100% that. Because of my earlier assumption, that it's running at 0:05 I never thought about it.
Thanks for your support and patience
What are you updating daily?
apt-get update and so on. At the end I restart FTL and I guess this kills it.
I've removed the restart for now as I guess it's save to say, even when this should not happen, this is the root cause
Following your logs FTL is correctly terminated but never started again. What is the exact command(s) you're running? If this is indeed a bug, we would like to fix it.
Can you be a bit more specific? Why are you restarting FTL after OS updates?
Sure, I was on the couch yesterday when I posted this with no access to the exact command line.
0 5 * * * sudo apt-get -y update && sudo apt-get -y upgrade && sudo apt-get -y autoremove && sudo apt-get -y autoclean && sudo pihole -up && sudo service pihole-FTL restart >/dev/null 2>&1
Yes I know, this is not the recommended way to do it, I know. But so far I never had much issues with this (Apart from this post here obviously LoL), and it was working fine for years I would say. Again I'm not blaming anyone here.
It might be the Update and restart colliding... not sure, just guessing.
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.