Long term data empty on v4.0

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

Expected Behaviour:

Pihole functions properly, and I see queries logged on the Dashboard page. I wanted to see long-term data

Actual Behaviour:

Nothing shows up in Long term data. Even changing date range to last 7/30 days and apply, still nothing showed up.
Checked query count in /etc/pihole/pihole-FTL.db and got 0!

Debug Token:

[hxfhtvjs2g]

What is the output of these commands from the Pi terminal:

cat /etc/pihole/pihole-FTL.conf

stat /etc/pihole/pihole-FTL.db

An observance from your debug log. This may not be related to the problem you are experiencing, but several of the block lists to which you subscribe are in incorrect format or don't lead to a text file.

https://github.com/anudeepND/youtubeadsblacklist/blob/master/domainlist.txt
https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/annoyances.txt
https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/badware.txt
https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/experimental.txt
https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/resource-abuse.txt
https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/filters.txt
https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/resources.txt
https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/unbreak.txt

https://discourse.pi-hole.net/t/how-do-i-add-additional-block-lists-to-pi-hole/259

Heh, it's empty :confused:
What should go in it?

      Size: 5423104         Blocks: 10600      IO Block: 4096   regular file
    Device: b302h/45826d    Inode: 260659      Links: 1
    Access: (0644/-rw-r--r--)  Uid: (  999/  pihole)   Gid: (  996/  pihole)
    Access: 2018-07-26 04:37:52.907290453 +0000
    Modify: 2018-10-13 04:31:00.197758417 +0000
    Change: 2018-10-13 04:31:00.197758417 +0000
     Birth: -

That's fine if it's empty. That means you are running the default configuration and haven't changed any options. You can stop logging to the database with one of the options.

Hi, I have the same behavior.

cat /etc/pihole/pihole-FTL.conf
Show me nothing.

 `stat /etc/pihole/pihole-FTL.db`
> Datei: /etc/pihole/pihole-FTL.db
> Größe: 24576          Blöcke: 48         EA Block: 4096   reguläre Datei
> Gerät: b302h/45826d     Inode: 22398       Verknüpfungen: 1
> Zugriff: (0644/-rw-r--r--)  Uid: (  999/  pihole)   Gid: (  996/  pihole)
> Zugriff    : 2018-09-27 23:01:44.418948437 +0200
> Modifiziert: 2018-09-27 23:01:44.838948437 +0200
> Geändert   : 2018-09-27 23:01:44.838948437 +0200
> Geburt    : -
> 

Debug Token: 5nqyhkc95v

Thank you in advance.

Run sudo service pihole-FTL restart and share the contents of /var/log/pihole-FTL.log.

Also check to make sure you have php-sqlite3 installed.

> [2018-10-17 14:19:59.691] ########## FTL started! ##########
> [2018-10-17 14:19:59.691] FTL branch: 
> [2018-10-17 14:19:59.691] FTL version: v4.0
> [2018-10-17 14:19:59.691] FTL commit: 8493df4
> [2018-10-17 14:19:59.691] FTL date: 2018-08-05 13:40:30 -0700
> [2018-10-17 14:19:59.691] FTL user: root
> [2018-10-17 14:19:59.691] WARNING: Starting pihole-FTL as user root is not recommended
> [2018-10-17 14:19:59.691] Starting config file parsing (/etc/pihole/pihole-FTL.conf)
> [2018-10-17 14:19:59.692]    SOCKET_LISTENING: only local
> [2018-10-17 14:19:59.692]    AAAA_QUERY_ANALYSIS: Show AAAA queries
> [2018-10-17 14:19:59.692]    MAXDBDAYS: max age for stored queries is 365 days
> [2018-10-17 14:19:59.692]    RESOLVE_IPV6: Resolve IPv6 addresses
> [2018-10-17 14:19:59.692]    RESOLVE_IPV4: Resolve IPv4 addresses
> [2018-10-17 14:19:59.692]    DBINTERVAL: saving to DB file every minute
> [2018-10-17 14:19:59.692]    DBFILE: Using /etc/pihole/pihole-FTL.db
> [2018-10-17 14:19:59.693]    MAXLOGAGE: Importing up to 24.0 hours of log data
> [2018-10-17 14:19:59.693]    PRIVACYLEVEL: Set to 0
> [2018-10-17 14:19:59.693]    IGNORE_LOCALHOST: Show queries from localhost
> [2018-10-17 14:19:59.693]    BLOCKINGMODE: Null IPs for blocked domains
> [2018-10-17 14:19:59.693]    REGEX_DEBUGMODE: Inactive
> [2018-10-17 14:19:59.693] Finished config file parsing
> [2018-10-17 14:19:59.695] Compiled 0 Regex filters and 138 whitelisted domains in 1.2 msec (0 errors)
> [2018-10-17 14:19:59.697] Database successfully initialized
> [2018-10-17 14:19:59.699] Imported 0 queries from the long-term database
> [2018-10-17 14:19:59.699]  -> Total DNS queries: 0
> [2018-10-17 14:19:59.700]  -> Cached DNS queries: 0
> [2018-10-17 14:19:59.700]  -> Forwarded DNS queries: 0
> [2018-10-17 14:19:59.700]  -> Exactly blocked DNS queries: 0
> [2018-10-17 14:19:59.700]  -> Unknown DNS queries: 0
> [2018-10-17 14:19:59.700]  -> Unique domains: 0
> [2018-10-17 14:19:59.700]  -> Unique clients: 0
> [2018-10-17 14:19:59.700]  -> Known forward destinations: 0
> [2018-10-17 14:19:59.700] Successfully accessed setupVars.conf
> [2018-10-17 14:19:59.712] PID of FTL process: 2210
> [2018-10-17 14:19:59.712] Listening on port 4711 for incoming IPv4 telnet connections
> [2018-10-17 14:19:59.713] Listening on port 4711 for incoming IPv6 telnet connections
> [2018-10-17 14:19:59.714] Listening on Unix socket
> [2018-10-17 14:21:56.879] ########## FTL started! ##########
> [2018-10-17 14:21:56.879] FTL branch: 
> [2018-10-17 14:21:56.879] FTL version: v4.0
> [2018-10-17 14:21:56.879] FTL commit: 8493df4
> [2018-10-17 14:21:56.880] FTL date: 2018-08-05 13:40:30 -0700
> [2018-10-17 14:21:56.880] FTL user: root
> [2018-10-17 14:21:56.880] WARNING: Starting pihole-FTL as user root is not recommended
> [2018-10-17 14:21:56.880] Starting config file parsing (/etc/pihole/pihole-FTL.conf)
> [2018-10-17 14:21:56.880]    SOCKET_LISTENING: only local
> [2018-10-17 14:21:56.880]    AAAA_QUERY_ANALYSIS: Show AAAA queries
> [2018-10-17 14:21:56.880]    MAXDBDAYS: max age for stored queries is 365 days
> [2018-10-17 14:21:56.881]    RESOLVE_IPV6: Resolve IPv6 addresses
> [2018-10-17 14:21:56.881]    RESOLVE_IPV4: Resolve IPv4 addresses
> [2018-10-17 14:21:56.881]    DBINTERVAL: saving to DB file every minute
> [2018-10-17 14:21:56.881]    DBFILE: Using /etc/pihole/pihole-FTL.db
> [2018-10-17 14:21:56.881]    MAXLOGAGE: Importing up to 24.0 hours of log data
> [2018-10-17 14:21:56.882]    PRIVACYLEVEL: Set to 0
> [2018-10-17 14:21:56.882]    IGNORE_LOCALHOST: Show queries from localhost
> [2018-10-17 14:21:56.882]    BLOCKINGMODE: Null IPs for blocked domains
> [2018-10-17 14:21:56.882]    REGEX_DEBUGMODE: Inactive
> [2018-10-17 14:21:56.882] Finished config file parsing
> [2018-10-17 14:21:56.884] Compiled 0 Regex filters and 138 whitelisted domains in 1.4 msec (0 errors)
> [2018-10-17 14:21:56.887] Database successfully initialized
> [2018-10-17 14:21:56.889] Imported 0 queries from the long-term database
> [2018-10-17 14:21:56.889]  -> Total DNS queries: 0
> [2018-10-17 14:21:56.889]  -> Cached DNS queries: 0
> [2018-10-17 14:21:56.889]  -> Forwarded DNS queries: 0
> [2018-10-17 14:21:56.889]  -> Exactly blocked DNS queries: 0
> [2018-10-17 14:21:56.890]  -> Unknown DNS queries: 0
> [2018-10-17 14:21:56.890]  -> Unique domains: 0
> [2018-10-17 14:21:56.890]  -> Unique clients: 0
> [2018-10-17 14:21:56.890]  -> Known forward destinations: 0
> [2018-10-17 14:21:56.890] Successfully accessed setupVars.conf
> [2018-10-17 14:21:56.904] PID of FTL process: 2351
> [2018-10-17 14:21:56.905] Listening on port 4711 for incoming IPv4 telnet connections
> [2018-10-17 14:21:56.906] Listening on port 4711 for incoming IPv6 telnet connections
> [2018-10-17 14:21:56.907] Listening on Unix socket

Im just starting ftl as root since it wont with its own user. So far i known it is a known problem too.

Indeed it is.

Try:

sudo service pihole-FTL stop
sudo chown root:pihole /etc/pihole/pihole-FTL.db
sudo service pihole-FTL start

In addition to the chown I ended up trying a chmod to 664 as the file was listed as 644 not giving the pihole user write permission. It seems to be working now.

pi@pi-3b-3:~ $ ls -al  /etc/pihole/pihole-FTL.db
-rw-r--r-- 1 root pihole 37810176 Oct 21 17:08 /etc/pihole/pihole-FTL.db

sudo chmod 664 /etc/pihole/pihole-FTL.db

pi@pi-3b-3:~ $ ls -al  /etc/pihole/pihole-FTL.db
-rw-rw-r-- 1 root pihole 37810176 Oct 21 17:08 /etc/pihole/pihole-FTL.db

The errors in my log were:

pi@pi-3b-3:~ $ tail -f  /var/log/pihole-FTL.log
[2018-10-21 18:45:03.056] Listening on port 4711 for incoming IPv6 telnet connections
[2018-10-21 18:45:03.057] Listening on Unix socket
[2018-10-21 18:45:03.058] Compiled 0 Regex filters and 2 whitelisted domains in 0.1 msec (0 errors)
[2018-10-21 18:45:03.058] /etc/pihole/black.list: parsed 0 domains (took 0.0 ms)
[2018-10-21 18:45:03.872] /etc/pihole/gravity.list: parsed 129535 domains (took 814.0 ms)
[2018-10-21 18:46:01.460] save_to_DB() - SQL error (8): attempt to write a readonly database
[2018-10-21 18:46:01.464] save_to_DB() - SQL error (8): attempt to write a readonly database
[2018-10-21 18:46:01.464] save_to_DB() - SQL error (8): attempt to write a readonly database
[2018-10-21 18:46:01.465] save_to_DB() - exiting due to too many errors
[2018-10-21 18:46:01.465] dbquery(UPDATE counters SET value = value + 0 WHERE id = 0;) - SQL error (8): attempt to write a readonly database
1 Like

The problem still persist for me. Maybe is my problem related to this workaround: Problem with FTL and dnsmasq after pihole -up (Ubuntu 16.04.5 LTS) - #12 by duceduc
Since i cant use pihole as a user...

Are you starting FTL manually, or did you change the init.d file that is mentioned in the post you linked?

I changed the initd file, and reloaded systemctl afterward. If i have the time, i will soon try another distro on my pi2, since im using dietpi and maybe their changes somehow affect pihole.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.