DNS and FTL goes down

Hi,

I'm using on rpi3, and sometimes, i found
DNS service not running and also FTL offline

I use DoH configuration with cloudflare and pivpn to connect my phone with wireguard.

https://tricorder.pi-hole.net/tu15dg6v1a

Thanks

You may have a corrupted long term database:

*** [ DIAGNOSING ]: contents of /var/log/lighttpd

-rw-r--r-- 1 www-data www-data 4872 Jun 30 10:59 /var/log/lighttpd/error.log
-----head of error.log------
2021-06-27 00:01:07: (server.c.1759) logfiles cycled UID = 0 PID = 25399
2021-06-27 17:11:49: (mod_fastcgi.c.421) FastCGI-stderr: PHP Warning: SQLite3::query(): Unable to prepare statement: 11, database disk image is malformed in /var/www/html/admin/api_db.php on line 402

Run these commands to move the existing database to a different file name and start a new database.

sudo service pihole-FTL stop

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

sudo service pihole-FTL start

Thanks

But is possible to investigate, to know why ?

Isn't the first time that happend

Check power supply and exchange power supply USB cable (if possible) for diagnosing:

Also make sure not too many power hungry USB devices are connected to Pi that might cause under-voltage brownouts.
And always try to properly shutdown the Pi instead of just unplugging the power.
A power outage can also sometimes corrupt files.

If the dbase was corrupted, there is a possibility that other files got corrupted too.
To check, you would have to insert the SD card into another Linux host and run the filesystem checker tool fsck on the two partitions (FAT32 & EXT4) contained on the SD card.

Thanks to reply

But I use RPI3 with only ssd via usb. Not SD card.

pi@RASPBERRYPi3:~ $ sudo zgrep -i voltage /var/log/syslog*
pi@RASPBERRYPi3:~ $
pi@RASPBERRYPi3:~ $ dmesg -T | grep -i voltage
pi@RASPBERRYPi3:~ $
pi@RASPBERRYPi3:~ $ vcgencmd get_throttled int
throttled=0x0

As you can see seems that there isn't any undervoltage trouble.

I use a 3A usb power.

Maybe is corrupted for a bad shutdown ?

So needed to reinstall all again?

1 Like

The syslog's stored on the SD card/SSD go only back about a week or so.
The kernel ring buffer (dmesg) stored in RAM gets wiped at reboot.
vcgencmd status gets wiped on power cycle.
Keep an eye on them for a period.

Possibly.

Not necessarily if you can run fsck on the SD card & SSD drive partitions to check if corrupted files can be repaired.

EDIT: forgot the SSD in that last sentence :wink:

EDIT2: Ow ps. even when boot from an SSD, a small part of the boot process is still loaded from the SD card /boot partition like the .elf files and initramfs.

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