FTL did stop after that command. But, I am guessing that now the ads will not be blocked
Ads will be blocked still. The web interface just won't show stats.
I see....that should be fine for now. I will keep an eye out for any possible resolution you may have for me to access the web interface. It is kind-a-cool to keep looking at those beautiful charts
I am looking into why it might be acting like this, but I don't think I'll be able to come up with the solution until @DL6ER is available.
Thanks for looking into it...appreciate your assistance.
What is the output of this command?
stat /var/log/pihole.log
pi@raspberrypi:~ $ stat /var/log/pihole.log
File: ‘/var/log/pihole.log’
Size: 37842 Blocks: 88 IO Block: 4096 regular file
Device: b302h/45826d Inode: 1249 Links: 1
Access: (0640/-rw-r-----) Uid: ( 109/ dnsmasq) Gid: ( 0/ root)
Access: 2017-08-08 12:20:53.849998886 -0400
Modify: 2017-08-08 18:09:54.520139022 -0400
Change: 2017-08-08 18:09:54.520139022 -0400
Birth: -
Just and FYI...I deleted that file sometime this afternoon and rebooted Pi
Try running these commands (will start up FTL):
sudo chmod 0644 /var/log/pihole.log
sudo service pihole-FTL start
tail -F /var/log/pihole-FTL.log
That last command will start streaming the FTL log. Try sending the output. If it's working correctly, it should stop outputting text shortly after it starts up (it shouldn't repeat itself over and over again).
pi@raspberrypi:~ $ tail -F /var/log/pihole-FTL.log
Will try again in 15 seconds.
[2017-08-08 12:28:18.054] FATAL: Opening of /var/log/pihole.log failed permanently!
[2017-08-08 12:29:52.837] WARN: Opening of /var/log/pihole.log failed!
[2017-08-08 12:29:52.842] Make sure it exists and is readable by user pihole
Will try again in 15 seconds.
[2017-08-08 12:30:07.846] FATAL: Opening of /var/log/pihole.log failed permanently!
[2017-08-08 17:34:55.928] WARN: Opening of /var/log/pihole.log failed!
[2017-08-08 17:34:55.928] Make sure it exists and is readable by user pihole
Will try again in 15 seconds.
[2017-08-08 17:35:10.943] FATAL: Opening of /var/log/pihole.log failed permanently!
What's the output of ls -al /var/log/pihole.log
pi@raspberrypi:~ $ ls -al /var/log/pihole.log
-rw-r--r-- 1 dnsmasq root 37842 Aug 8 18:09 /var/log/pihole.log
FTL is still complaining that it can't open the file? That's very odd, since the file is world readable...
I can run pihole -r
to see if it fixes things
Ok, try that just in case.
FTL is working now
pi@raspberrypi:~ $ tail -F /var/log/pihole-FTL.log
[2017-08-08 18:28:31.176] Gravity list entries: 114269
[2017-08-08 18:28:31.177] No blacklist present
[2017-08-08 18:28:31.178] No wildcard blocking list present
[2017-08-08 18:28:31.198] Database initialized
[2017-08-08 18:28:31.199] Starting initial log file parsing
[2017-08-08 18:28:31.199] Reading from /var/log/pihole.log.1 (rw-r--r--)
[2017-08-08 18:28:31.201] Notice: Increasing forwarded struct size from 0 to 4 (160.00 B)
[2017-08-08 18:28:31.203] New forward server: 8.8.8.8 (0/4)
[2017-08-08 18:28:31.203] Notice: Increasing overTime struct size from 0 to 100 (3.37 KB)
[2017-08-08 18:28:31.203] New forward server: 8.8.4.4 (1/4)
But, pihole-FTL is close to 100% CPU
top - 18:30:25 up 1 min, 1 user, load average: 1.11, 0.46, 0.17
Tasks: 139 total, 2 running, 137 sleeping, 0 stopped, 0 zombie
%Cpu(s): 17.3 us, 8.2 sy, 0.0 ni, 74.4 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem: 945512 total, 891948 used, 53564 free, 12968 buffers
KiB Swap: 102396 total, 0 used, 102396 free. 808692 cached Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
612 pihole 20 0 3448 2216 1916 R 99.8 0.2 1:35.95 pihole-FTL
697 homebri+ 20 0 147800 38792 21644 S 1.7 4.1 0:04.61 homebridge
92 root 20 0 0 0 0 S 0.3 0.0 0:00.59 mmcqd/0
841 pi 20 0 11548 3192 2572 S 0.3 0.3 0:00.01 sshd
898 pi 20 0 5108 2392 2024 R 0.3 0.3 0:00.14 top
1 root 20 0 23844 3912 2784 S 0.0 0.4 0:02.27 systemd
2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd
3 root 20 0 0 0 0 S 0.0 0.0 0:00.01 ksoftirqd/0
4 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/0:0
5 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/0:+
6 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/u8+
7 root 20 0 0 0 0 S 0.0 0.0 0:00.05 rcu_sched
8 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcu_bh
9 root rt 0 0 0 0 S 0.0 0.0 0:00.05 migration/0
10 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 lru-add-dr+
11 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/0
12 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/1
It should stop once it finishes parsing the log. If it starts back up again (Gravity list entries:
) then it still isn't working.
All right....now it is less than 1% CPU (not sure if it is temporary).
pi@raspberrypi:~ $ tail -F /var/log/pihole-FTL.log
[2017-08-08 18:30:40.337] New client: 127.0.0.1 localhost (0/10)
[2017-08-08 18:30:40.350] Finished initial log file parsing
[2017-08-08 18:30:40.350] -> Total DNS queries: 138
[2017-08-08 18:30:40.350] -> Cached DNS queries: 41
[2017-08-08 18:30:40.350] -> Blocked DNS queries: 0
[2017-08-08 18:30:40.350] -> Unknown DNS queries: 0
[2017-08-08 18:30:40.350] -> Unique domains: 16
[2017-08-08 18:30:40.350] -> Unique clients: 1
[2017-08-08 18:30:40.350] Successfully accessed setupVars.conf
[2017-08-08 18:30:40.351] Listening on port 4711 for incoming connections
I will continue to monitor this and update you....anything that you want me to look at?
Yes, that is the expected output (it opened the port so now PHP errors should stop as well).
It must have been some weird file permissions thing, but if it happens again, share the output of these commands before you try changing anything:
stat /var/log/pihole.log
sudo -u pihole stat /var/log/pihole.log