Lost Connection to API occurs multiple times

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

Expected Behaviour:

Rebooted pi-hole on raspberry pi after updating hosts file and expect it to come back up clean

Actual Behaviour:

Upon reboot, receive a Lost Connection to API. Rebooted again to verify, same error.

Debug Token:

Debug log won’t upload, but did download the debug log. Don’t want to post it here, but willing to share.

More Info:
I got the “Lost Connection to API” earlier this week while on Stretch after doing an upgrade/update. Decided to start over and installed Buster and setup pi-hole. Everything was working great and re-configured. Updated the host file on both of my pi-hole (one is a VM) and rebooted. The raspberry pi now received the above error message…again. Not sure if this may be hardware related or not.

You can edit /etc/resolv.conf and change the 127.0.0.1 to say … 1.1.1.1 and then upload the debug log.

Also, when you are experiencing the error, that is the output of sudo systemctl status pihole-FTL.service ?

Token ID https://tricorder.pi-hole.net/8viqsqck2a

Output of sudo systemctl status pihole-FTL.service
pihole-FTL.service - LSB: pihole-FTL daemon
Loaded: loaded (/etc/init.d/pihole-FTL; generated)
Active: active (exited) since Fri 2019-11-08 18:16:38 GMT; 3min 58s ago
Docs: man:systemd-sysv-generator(8)
Process: 9874 ExecStart=/etc/init.d/pihole-FTL start (code=exited, status=0/SUCCESS)

Nov 08 18:16:38 raspberrypi systemd[1]: Starting LSB: pihole-FTL daemon…
Nov 08 18:16:38 raspberrypi pihole-FTL[9874]: Not running
Nov 08 18:16:38 raspberrypi su[9903]: (to pihole) root on none
Nov 08 18:16:38 raspberrypi su[9903]: pam_unix(su:session): session opened for user pihole by (uid=0)
Nov 08 18:16:38 raspberrypi pihole-FTL[9874]: Illegal instruction
Nov 08 18:16:38 raspberrypi su[9903]: pam_unix(su:session): session closed for user pihole
Nov 08 18:16:38 raspberrypi systemd[1]: Started LSB: pihole-FTL daemon.

Wondering what this is all about … Checking the debug debug log now.

I see you’re using cloudfare, based on port 5053?

Maybe that has something to do with it (not sure as I use Unbound for my upstream).

There might be some sort of configuration level error for pihole-FTL.

The debug log doesn’t tell me anything related to that. Let’s focus on the error itself.

let’s see if it tells us what’s wrong when it starts.

please issue
sudo systemctl stop pihole-FTL.service && sudo systemctl start pihole-FTL.service && sudo systemctl status pihole-FTL.service
and share the output

pihole-FTL.service - LSB: pihole-FTL daemon
Loaded: loaded (/etc/init.d/pihole-FTL; generated)
Active: active (exited) since Fri 2019-11-08 18:31:49 GMT; 114ms ago
Docs: man:systemd-sysv-generator(8)
Process: 17544 ExecStart=/etc/init.d/pihole-FTL start (code=exited, status=0/SUCCESS)

Nov 08 18:31:49 raspberrypi systemd[1]: Starting LSB: pihole-FTL daemon…
Nov 08 18:31:49 raspberrypi pihole-FTL[17544]: Not running
Nov 08 18:31:49 raspberrypi su[17573]: (to pihole) root on none
Nov 08 18:31:49 raspberrypi su[17573]: pam_unix(su:session): session opened for user pihole by (uid=0)
Nov 08 18:31:49 raspberrypi pihole-FTL[17544]: Illegal instruction
Nov 08 18:31:49 raspberrypi su[17573]: pam_unix(su:session): session closed for user pihole
Nov 08 18:31:49 raspberrypi systemd[1]: Started LSB: pihole-FTL daemon.

For what it’s worth, I use the same exact configuration on my secondary pi-hole. And this one worked until I rebooted.

I’ve had similar errors when the card was going bad and files were corrupted …

What’s the content of you /etc/dnsmasq.d

ls -l /etc/dnsmasq.d

total 4
-rw-r–r-- 1 root root 1451 Nov 8 18:16 01-pihole.conf

ok and cat /etc/dnsmasq.d/01-pihole.conf ?

> # (c) 2017 Pi-hole, LLC (https://pi-hole.net)
> # Network-wide ad blocking via your own hardware.
> #
> # Dnsmasq config for Pi-hole's FTLDNS
> #
> # This file is copyright under the latest version of the EUPL.
> # Please see LICENSE file for your rights under this license.
> 
> ###############################################################################
> #      FILE AUTOMATICALLY POPULATED BY PI-HOLE INSTALL/UPDATE PROCEDURE.      #
> # ANY CHANGES MADE TO THIS FILE AFTER INSTALL WILL BE LOST ON THE NEXT UPDATE #
> #                                                                             #
> #        IF YOU WISH TO CHANGE THE UPSTREAM SERVERS, CHANGE THEM IN:          #
> #                      /etc/pihole/setupVars.conf                             #
> #                                                                             #
> #        ANY OTHER CHANGES SHOULD BE MADE IN A SEPARATE CONFIG FILE           #
> #                    WITHIN /etc/dnsmasq.d/yourname.conf                      #
> ###############################################################################
> 
> addn-hosts=/etc/pihole/gravity.list
> addn-hosts=/etc/pihole/black.list
> addn-hosts=/etc/pihole/local.list
> 
> 
> localise-queries
> 
> 
> no-resolv
> 
> 
> 
> cache-size=10000
> 
> log-queries
> log-facility=/var/log/pihole.log
> 
> local-ttl=2
> 
> log-async
> server=127.0.0.1#5053
> interface=eth0
> server=/local/192.168.41.1
> server=/41.168.192.in-addr.arpa/192.168.41.1

I ordered another micro sd card just in case this can’t be resolved.

This also looks funky … Trying to think of something …

let’s try this …

sudo userdel pihole

then run a pihole -r and select reconfigure …

Go for the default config at first, as if it starts properly, one can re-configure it after.

During repair the DNS service refused to start

[✗] DNS service is not running
[✓] Restarting DNS service
[✗] DNS resolution is not available

How’s the pihole-FTL service looking?

sudo systemctl status pihole-FTL.service

Same as before…

pihole-FTL.service - LSB: pihole-FTL daemon
Loaded: loaded (/etc/init.d/pihole-FTL; generated)
Active: active (exited) since Fri 2019-11-08 19:26:26 GMT; 12min ago
Docs: man:systemd-sysv-generator(8)
Process: 3386 ExecStart=/etc/init.d/pihole-FTL start (code=exited, status=0/SUCCESS)

Nov 08 19:26:25 raspberrypi systemd[1]: Starting LSB: pihole-FTL daemon…
Nov 08 19:26:25 raspberrypi pihole-FTL[3386]: Not running
Nov 08 19:26:25 raspberrypi su[3415]: (to pihole) root on none
Nov 08 19:26:25 raspberrypi su[3415]: pam_unix(su:session): session opened for user pihole by (uid=0)
Nov 08 19:26:26 raspberrypi pihole-FTL[3386]: Illegal instruction
Nov 08 19:26:26 raspberrypi su[3415]: pam_unix(su:session): session closed for user pihole
Nov 08 19:26:26 raspberrypi systemd[1]: Started LSB: pihole-FTL daemon.

I’m at a loss here … never seen that before …

@DanSchaper @DL6ER have you seen this behavior with pihole-FTL?

What is readelf -A /usr/bin/pihole-FTL and uname -a showing as the CPU and the compiled version of the binary?

1 Like

Attribute Section: aeabi
File Attributes
Tag_CPU_name: “7-A”
Tag_CPU_arch: v7
Tag_CPU_arch_profile: Application
Tag_ARM_ISA_use: Yes
Tag_THUMB_ISA_use: Thumb-2
Tag_FP_arch: VFPv3-D16
Tag_ABI_PCS_wchar_t: 4
Tag_ABI_FP_rounding: Needed
Tag_ABI_FP_denormal: Needed
Tag_ABI_FP_exceptions: Needed
Tag_ABI_FP_number_model: IEEE 754
Tag_ABI_align_needed: 8-byte
Tag_ABI_enum_size: int
Tag_ABI_VFP_args: VFP registers
Tag_CPU_unaligned_access: v6

Linux raspberrypi 4.19.75-v7+ #1270 SMP Tue Sep 24 18:45:11 BST 2019 armv7l GNU/Linux

Okay, and sudo /usr/bin/pihole-FTL test?