Lost Connection to API occurs multiple times

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?

Also do you have an /etc/dnsmasq.conf file and what are the contents of the file if you do have one.

Returns -
Illegal instruction

Try sudo /usr/bin/pihole-FTL debug

Contents of dnsmasq.conf:
conf-dir=/etc/dnsmasq.d

[2019-11-08 20:15:06.546 20537] Using log file /var/log/pihole-FTL.log
[2019-11-08 20:15:06.547 20537] ########## FTL started! ##########
[2019-11-08 20:15:06.547 20537] FTL branch: master
[2019-11-08 20:15:06.547 20537] FTL version: v4.3.1
[2019-11-08 20:15:06.547 20537] FTL commit: b60d63f
[2019-11-08 20:15:06.547 20537] FTL date: 2019-05-25 21:37:26 +0200
[2019-11-08 20:15:06.547 20537] FTL user: root
[2019-11-08 20:15:06.547 20537] Starting config file parsing (/etc/pihole/pihole-FTL.conf)
[2019-11-08 20:15:06.548 20537] SOCKET_LISTENING: only local
[2019-11-08 20:15:06.548 20537] AAAA_QUERY_ANALYSIS: Show AAAA queries
[2019-11-08 20:15:06.548 20537] MAXDBDAYS: max age for stored queries is 365 days
[2019-11-08 20:15:06.548 20537] RESOLVE_IPV6: Resolve IPv6 addresses
[2019-11-08 20:15:06.548 20537] RESOLVE_IPV4: Resolve IPv4 addresses
[2019-11-08 20:15:06.548 20537] DBINTERVAL: saving to DB file every minute
[2019-11-08 20:15:06.549 20537] DBFILE: Using /etc/pihole/pihole-FTL.db
[2019-11-08 20:15:06.549 20537] MAXLOGAGE: Importing up to 24.0 hours of log data
[2019-11-08 20:15:06.549 20537] PRIVACYLEVEL: Set to 0
[2019-11-08 20:15:06.549 20537] IGNORE_LOCALHOST: Show queries from localhost
[2019-11-08 20:15:06.549 20537] BLOCKINGMODE: Null IPs for blocked domains
[2019-11-08 20:15:06.549 20537] ANALYZE_ONLY_A_AND_AAAA: Disabled. Analyzing all queries
[2019-11-08 20:15:06.549 20537] DBIMPORT: Importing history from database
[2019-11-08 20:15:06.550 20537] PIDFILE: Using /var/run/pihole-FTL.pid
[2019-11-08 20:15:06.550 20537] PORTFILE: Using /var/run/pihole-FTL.port
[2019-11-08 20:15:06.550 20537] SOCKETFILE: Using /var/run/pihole/FTL.sock
[2019-11-08 20:15:06.550 20537] WHITELISTFILE: Using /etc/pihole/whitelist.txt
[2019-11-08 20:15:06.550 20537] BLACKLISTFILE: Using /etc/pihole/black.list
[2019-11-08 20:15:06.550 20537] GRAVITYFILE: Using /etc/pihole/gravity.list
[2019-11-08 20:15:06.550 20537] REGEXLISTFILE: Using /etc/pihole/regex.list
[2019-11-08 20:15:06.551 20537] SETUPVARSFILE: Using /etc/pihole/setupVars.conf
[2019-11-08 20:15:06.551 20537] AUDITLISTFILE: Using /etc/pihole/auditlog.list
[2019-11-08 20:15:06.551 20537] MACVENDORDB: Using /etc/pihole/macvendor.db
[2019-11-08 20:15:06.551 20537] PARSE_ARP_CACHE: Active
[2019-11-08 20:15:06.551 20537] Finished config file parsing
[2019-11-08 20:15:06.553 20537] WARNING: Starting pihole-FTL as user root is not recommended

That looks good, the binary is working correctly.

Next try su -s /bin/sh -c "/usr/bin/pihole-FTL" pihole

You may need a sudo in front of that if you are not currently the root user.

Ran the command, no information returned. I indeed had to use sudo as well.

Can you get us a copy of your /var/log/pihole-FTL.log file? cat /var/log/pihole-FTL.log | pihole tricorder will do that and give you a URL to link to.

You bet, here you go:
https://tricorder.pi-hole.net/9tc4hgpg3s

Thanks, that does show a crash of pihole-FTL but after that there are a few successful starts of the daemon. You will need to remove any FTL files in /var/run/shm/. After that try starting pihole-FTL again.

2 Likes

That did it! Thank you for taking the time to look through this.
Hopefully that is the last time I see any of this. Will bookmark this just in case I see this crop up yet again.

If it happens again then check /var/log/pihole-FTL.log to see if there was a crash or if things were shut down. I see the below block from your log that shows FTL was shutdown intentionally. That could either be from you shutting things down or it is possible that something else is calling for the process to be terminated.

[2019-11-08 16:38:53.473 26022] Resizing "/FTL-strings" from 40960 to 45056 
[2019-11-08 17:41:05.722 26022] Shutting down... 
[2019-11-08 17:41:05.922 26022] Finished final database update [2019-11-08 17:41:05.926 26022] ########## FTL terminated after 145954784.0 ms! ##########
1 Like

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