Lost Connection to API

Hello,

my PiHole shows "Lost - Connection - to - API" on the web-interface.
Tried the commands from the FAQ:

sudo service pihole-FTL restart
Job for pihole-FTL.service failed because the control process exited with error code.
See "systemctl status pihole-FTL.service" and "journalctl -xe" for details.
sudo systemctl status --full --no-pager pihole-FTL.service
● pihole-FTL.service
   Loaded: loaded (/etc/init.d/pihole-FTL; generated)
   Active: failed (Result: exit-code) since Fri 2020-04-03 14:09:56 BST; 23min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 812 ExecStart=/etc/init.d/pihole-FTL start (code=exited, status=203/EXEC)

Apr 03 14:09:56 raspberrypi systemd[1]: Starting pihole-FTL.service...
Apr 03 14:09:56 raspberrypi systemd[812]: pihole-FTL.service: Failed to execute command: Exec format error
Apr 03 14:09:56 raspberrypi systemd[812]: pihole-FTL.service: Failed at step EXEC spawning /etc/init.d/pihole-FTL: Exec format error
Apr 03 14:09:56 raspberrypi systemd[1]: pihole-FTL.service: Control process exited, code=exited, status=203/EXEC
Apr 03 14:09:56 raspberrypi systemd[1]: pihole-FTL.service: Failed with result 'exit-code'.
Apr 03 14:09:56 raspberrypi systemd[1]: Failed to start pihole-FTL.service.

Debug: nxoeookf50

Any Ideas?

Your debug log shows pihole-FTL as inactive.

We would need the sudo output of that command to find out what prevents your pihole-FTL from starting, so please run:

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

on your Pi-hole machine and provide the output, preferably in its textual form.

sudo systemctl status --full --no-pager pihole-FTL.service
● pihole-FTL.service
   Loaded: loaded (/etc/init.d/pihole-FTL; generated)
   Active: failed (Result: exit-code) since Fri 2020-04-03 14:09:56 BST; 23min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 812 ExecStart=/etc/init.d/pihole-FTL start (code=exited, status=203/EXEC)

Apr 03 14:09:56 raspberrypi systemd[1]: Starting pihole-FTL.service...
Apr 03 14:09:56 raspberrypi systemd[812]: pihole-FTL.service: Failed to execute command: Exec format error
Apr 03 14:09:56 raspberrypi systemd[812]: pihole-FTL.service: Failed at step EXEC spawning /etc/init.d/pihole-FTL: Exec format error
Apr 03 14:09:56 raspberrypi systemd[1]: pihole-FTL.service: Control process exited, code=exited, status=203/EXEC
Apr 03 14:09:56 raspberrypi systemd[1]: pihole-FTL.service: Failed with result 'exit-code'.
Apr 03 14:09:56 raspberrypi systemd[1]: Failed to start pihole-FTL.service.

Also added this to the first post.

(You can format your output by highlighting a text passage and choose </> - Preformatted text from the menu )

What's the output for

ls -la /usr/bin/pihole-FTL

Already, this doesn*t bode well:
pihole-FTL's program file seems to be corrupted.

This is normally the case with defective SD cards, which in turn could be caused by excessive use wearage (or very long term normal), but are also often seen when using an insufficient power supply with an RPi.

We could check for recent critical voltage situations on your RPi:

grep -i "voltage" /var/log/syslog

If this returns such warnings, you definitely should consider acquiring a better power supply.
But you may need a new SD card either way.

Thanks for the help and time!

ls -la /usr/bin/pihole-FTL
-rwxr-xr-x 1 root root 3612624 Apr  2 20:17 /usr/bin/pihole-FTL

Actually got many lines for the grep :confused:

I try to feed the rpi with dual USB-A to micro-USB (Y-adapter) with one 0.9A and one 0.5A USB-A.
Disabled most of the unsued services like Bluetooth/WiFi/LEDs. Also underclocked to 900MHz / 300MHz (min) with -2/-7 undervolt on the 3B+. Thought this would be sufficient.
Can I repair my broken files in any way?

For a 3B+, Raspberry Pi recommends a full 2.5A power supply. What you are using is inadequate and has likely caused card damage (or at a minimum, corruption).

It would be best to assume the card is permanently damaged, and with a new proper power supply and a fresh SD card (the bigger the better, as the writes are spread over more locations and cards are cheap), start new.

You might try to export your Pi-hole settings with teleporter. If that works, that is something saved from this installation.

You should heed the advice that's all over the place:
Use a 2.5A quality power supply to power your RPi, and 3A one for an RPi 4.

The only potential exemption is the Zero, which can live with 1A when used headless, i.e. specifically without a USB hub plugged into its only free USB port.

You could try to repair your installation, but I wouldn't recommend that.
Sooner or later, you'll see other files dying as well.

I strongly recommend to get a new SD card and a better power unit.

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