FTL offline: lost connection to API

Hey Guys, I installed PI hole on my RPI3 and it was working great until recent.
WEB Ui keeps showing 'lost connection to API'. I've researched and tried a few things but no luck.

I do a sudo service pihole-FTL restart - which resolves the issue for 15 seconds, then I get the same lost connection to API error.
I've done a pihole -r, and repaired the install, but this hasn't fixed it.

I ran a pihole -d, and uploaded the results. Here is my token : sl65g394pm

Additional info.

pihole-FTL version : v2.9.4

sudo service pihole-FTL status - Running
sudo service lighttpd status - Running
sudo service dnsmasq status - Running

We will release FTL v2.10 soon, which may fix this issue. If it doesn't it will give us more information in the error log so we can find out why it is crashing.

Hey Mcat12,
Thanks for looking into it.

Here is the FTL log error. Does this provide more info?

[2017-08-02 03:17:10.805] Successfully accessed setupVars.conf
[2017-08-02 03:17:10.806] Listening on port 4711 for incoming connections
[2017-08-02 05:30:00.042] SQL error (21): (null)
[2017-08-02 05:30:00.042] !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[2017-08-02 05:30:00.042] ----------------------------> FTL crashed! <----------------------------
[2017-08-02 05:30:00.042] !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[2017-08-02 05:30:00.042] > Please report a bug at Issues · pi-hole/FTL · GitHub
[2017-08-02 05:30:00.042] > and include in your report already the following details:
[2017-08-02 05:30:00.042] >
[2017-08-02 05:30:00.043] > Received signal: Segmentation fault
[2017-08-02 05:30:00.043] at address: 0
[2017-08-02 05:30:00.043] with code: SEGV_MAPERR (Address not mapped to object)
[2017-08-02 05:30:00.043] > Memory usage (structs): 686880
[2017-08-02 05:30:00.043] > Memory usage (dynamic): 30641
[2017-08-02 05:30:00.043] >
[2017-08-02 05:30:00.043] > Thank you for helping us to improve our FTL engine!
[2017-08-02 05:30:00.043] FTL terminated!

Ah, and this

[2017-08-02 05:35:18.151] Successfully accessed setupVars.conf
[2017-08-02 05:35:18.151] Listening on port 4711 for incoming connections
[2017-08-02 05:35:31.303] FATAL: FTL received SIGTERM from PID/UID 1/0, scheduled to exit gracefully
[2017-08-02 05:35:31.303] Shutting down...
[2017-08-02 05:35:31.304] ########## FTL terminated! ##########

Those logs were included in the debug log.

Ah ok. Quick question. How can I uninstall, remove any configs, remove the DB, and start from new?

I did a read from WIN32 Disk to back up my SD card and I think that screwed my database disk image.
I tried to install sqlite3, but it didn't help.

[2017-08-02 14:58:29.212] Listening on port 4711 for incoming connections
[2017-08-02 14:59:01.060] SQL error (11): database disk image is malformed
[2017-08-02 14:59:01.060] delete_old_queries_in_DB(): Deleting queries due to age of entries failed!
[2017-08-02 15:00:00.044] SQL error (21): (null)
[2017-08-02 15:00:00.045] !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[2017-08-02 15:00:00.045] ----------------------------> FTL crashed! <----------------------------
[2017-08-02 15:00:00.045] !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Try running these commands:

sudo service pihole-FTL stop
sudo rm /etc/pihole/pihole-FTL.db
sudo service pihole-FTL start
1 Like

You are awesome. Removing the DB did it. my WEBui works now. It's been up for 15 mins.

Thanks for the awesome help.

1 Like

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