FTL Offline - HELP

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

Expected Behaviour:

[Pihole run as it was before the last update]

Actual Behaviour:

[The FTL is Offline and the webpage say Lost connection to API]

Debug Token:

[TOKEN:nsvempsvyv]

Your debug log shows pihole-FTL not running, and your gravity list is empty.

[âś—] pihole-FTL daemon is failed

*** [ DIAGNOSING ]: Gravity list
-rw-r--r-- 1 root root 0 Jun  2 17:17 /etc/pihole/gravity.list
   -----head of gravity.list------

   -----tail of gravity.list------

First, what is the output of this command from the Pi terminal?

echo ">stats" | nc localhost 4711

Let's reset your Pi nameserver temporarily to bypass Pi-Hole and repair your install (this will also rebuild gravity).

sudo nano /etc/resolv.conf

edit nameserver 127.0.0.1 to nameserver 9.9.9.9 or your preferred third party DNS service, save and exit

Run pihole -r and select repair.

ok, i've done that but whilhe repairing it get stuck on Restarting pihole-FTL service...

what's the output of

sudo systemctl status --full --no-pager pihole-FTL.service

After the repair the webpage say the same thing, FTL Offline, and now says Lost Connection to API.

pi@raspberrypi:~ $ sudo systemctl status --full --no-pager pihole-FTL.service
â—Ź pihole-FTL.service - LSB: pihole-FTL daemon
   Loaded: loaded (/etc/init.d/pihole-FTL; generated; vendor preset: enabled)
   Active: failed (Result: timeout) since Mon 2019-06-03 17:34:59 WEST; 8min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 14188 ExecStart=/etc/init.d/pihole-FTL start (code=killed, signal=TERM)

Jun 03 17:29:59 raspberrypi pihole-FTL[11933]: Terminated
Jun 03 17:30:00 raspberrypi pihole-FTL[14188]: Stopped
Jun 03 17:30:00 raspberrypi pihole-FTL[14188]: /etc/resolvconf/update.d/libc: Warning: /etc/resolv.conf is not a symbolic link to /etc/resolvconf/run/resolv.conf
Jun 03 17:30:00 raspberrypi su[14264]: Successful su for pihole by root
Jun 03 17:30:00 raspberrypi su[14264]: + ??? root:pihole
Jun 03 17:30:00 raspberrypi su[14264]: pam_unix(su:session): session opened for user pihole by (uid=0)
Jun 03 17:34:59 raspberrypi systemd[1]: pihole-FTL.service: Start operation timed out. Terminating.
Jun 03 17:34:59 raspberrypi systemd[1]: Failed to start LSB: pihole-FTL daemon.
Jun 03 17:34:59 raspberrypi systemd[1]: pihole-FTL.service: Unit entered failed state.
Jun 03 17:34:59 raspberrypi systemd[1]: pihole-FTL.service: Failed with result 'timeout'.

What was the output of the command above?

i don't get any output from that command...

Copy and paste this command below - the quotes on the previous one were converted by the forum formatter:

echo ">stats" | nc localhost 4711

Command does nothing... :confused:
Did a restart just to make sure but keeps the same.

If you think that help i can just uninstall and make a new install...

How about:

ls -lh /etc/pihole/pihole-FTL.db

ls -lh /var/log/pihole.log*

pi@raspberrypi:~ $ ls -lh /etc/pihole/pihole-FTL.db
-rw-r--r-- 1 pihole pihole 97M Jun  3 16:03 /etc/pihole/pihole-FTL.db
pi@raspberrypi:~ $ ls -lh /var/log/pihole.log*
-rw-r--r-- 1 pihole pihole  43K Jun  3 18:06 /var/log/pihole.log
-rw-r--r-- 1 pihole pihole 205M Jun  3 00:00 /var/log/pihole.log.1

That may be the next step. I think you may have a lot of queries stored that is causing Pi-Hole problems loading on startup.

How long has this Pi-Hole installation been running? And, do you have conditional forwarding enabled?

Edit - from you debug log, I see that you do not have conditional forwarding enabled.

i don't think so....

pi@raspberrypi:~ $ cat /etc/pihole/setupVars.conf
WEBPASSWORD=
BLOCKING_ENABLED=true
DNSMASQ_LISTENING=local
PIHOLE_DNS_3=2001:4860:4860:0:0:0:0:8888
PIHOLE_DNS_4=2001:4860:4860:0:0:0:0:8844
PIHOLE_DNS_5=192.168.1.94#53
DNS_FQDN_REQUIRED=true
DNS_BOGUS_PRIV=true
DNSSEC=false
CONDITIONAL_FORWARDING=false
PIHOLE_INTERFACE=eth0
IPV4_ADDRESS=192.168.1.94/24
IPV6_ADDRESS=2001:818:d860:4500:b623:5c21:9131:fbad
PIHOLE_DNS_1=8.8.8.8
PIHOLE_DNS_2=8.8.4.4
QUERY_LOGGING=true
INSTALL_WEB_SERVER=true
INSTALL_WEB_INTERFACE=true
LIGHTTPD_ENABLED=true

Try this to help FTL load. We'll move your long term database to a new file for now, then restart FTL.

sudo service pihole-FTL stop

sudo mv /etc/pihole/pihole-FTL.db /etc/pihole/pihole-FTL.old

sudo service pihole-FTL start

1 Like

WOW, it worked for now....
Please don't close this post right now let me test it and i will report if it's good ok? :smiley:

Give me a few hours to get home :smiley:

So the main problem was with the old database right?

I suspect the problem was that you have a huge number of requests happening, and when you restart FTL it loads all the queries for the last 24 hours into memory, from the long term database. I don't think the problem is with the database, it's just the amount of queries in the past 24 hours.

If you look at the size of yesterday's pihole.log, it's 204 MB. By comparison, my log on a Pi-Hole that serves 29 clients and 30K queries per day is less than 1 MB. Something is generating a lot of queries, and that's what the "echo stats...." command was checking for.

Oh ok!
Thank you so much, i was getting crazy with this!
I'm new with RPI :smiley:
Let me check all the things and i give a feedback :wink:

Is above Pi-hole's own IP address ?
If so, you've created a loop.
Try remove that upstream DNS server.