*** [ DIAGNOSING ]: Disk usage
Filesystem Size Used Avail Use% Mounted on
udev 454M 0 454M 0% /dev
/dev/sda1 7.9G 2.3G 5.3G 31% /
tmpfs 457M 712K 456M 1% /dev/shm
tmpfs 183M 2.8M 180M 2% /run
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 1.0G 4.0K 1.0G 1% /tmp
tmpfs 50M 32K 50M 1% /var/log
*** [ DIAGNOSING ]: Info table
property value
-------------------- ----------------------------------------
version 15
Last gravity run finished at:
-----head of error.log------
2022-01-13 11:17:23: mod_fastcgi.c.487) FastCGI-stderr:PHP message: PHP Warning: SQLite3Stmt::execute(): Unable to execute statement: attempt to write a readonly database in /var/www/html/admin/scripts/pi-hole/php/teleporter.php on line 202PHP message: PHP Warning: SQLite3::exec(): attempt to write a readonly database in /var/www/html/admin/scripts/pi-hole/php/teleporter.php on line 90PHP message: PHP Warning: SQLite3Stmt::execute(): Unable to execute statement: attempt to write a readonly database in /var/www/html/admin/scripts/pi-hole/php/teleporter.php on line 202PHP message: PHP Warning: SQLite3::exec(): no such table: blacklist in /var/www/html/admin/scripts/pi-hole/php/teleporter.php on line 90PHP message: PHP Warning: SQLite3Stmt::execute(): Unable to execute statement: attempt to write a readonly database in /var/www/html/admin/scripts/pi-hole/php/teleporter.php on line 202PHP message: PHP Warning: SQLite3::exec(): no such table: regex_blacklist in /var/www/html/admin/scripts/pi-hole/php/teleporter.php on line 90PHP message: PHP Warning: SQLite3Stmt::execute(): Unable to execute statement: attempt to write a readonly database in /var/www/html/admin/scripts/pi-hole/php/teleporter.php on line 202PHP message: PHP Warning: SQLite3::exec(): attempt to write a readonly database in /var/www/html/admin/scripts/pi-hole/php/teleporter.php on line 90PHP message: PHP Warning: SQLite3::exec(): attempt to write a readonly database in /var/www/html/admin/scripts/pi-hole/php/teleporter.php on line 90PHP message: PHP Warning: SQLite3::exec(): attempt to write a readonly database in /var/www/html/admin/scripts/pi-hole/php/teleporter.php on line 90PHP message: PHP Warning: SQLite3Stmt::execute(): Unable to execute statement: attempt to write a readonly database in /var/www/html/admin/scripts/pi-hole/php/teleporter.php on line 202PHP message: PHP Warning: SQLite3::exec(): attempt to write a readonly database in /var/www/html/admin/scripts/pi-hole/php/teleporter.php on line 90PHP message: PHP Warning: SQLite3::exec(): no such table: whitelist in /var/www/html/admin/scripts/pi-hole/php/teleporter.php on line 90PHP message: PHP Warning: SQLite3Stmt::execute(): Unable to execute statement: attempt to write a readonly database in /var/www/html/admin/scripts/pi-hole/php/teleporter.php on line 202PHP message: PHP Warning: SQLite3::exec(): no such table: regex_whitelist in /var/www/html/admin/scripts/pi-hole/php/teleporter.php on line 9
2022-01-13 11:17:35: mod_fastcgi.c.487) FastCGI-stderr:PHP message: PHP Notice: Undefined variable: temperaturelimit in /var/www/html/admin/scripts/pi-hole/php/header.php on line 37
2022-01-13 11:17:41: mod_fastcgi.c.487) FastCGI-stderr:PHP message: PHP Notice: Undefined variable: temperaturelimit in /var/www/html/admin/scripts/pi-hole/php/header.php on line 37
[2022-01-13 11:34:55.268 342/T346] gravityDB_count(SELECT value FROM info WHERE property = 'gravity_count';) - SQL error step no more rows available
[2022-01-13 11:34:55.268 342/T346] Count of gravity domains not available. Please run pihole -g
[2022-01-13 11:34:55.269 342/T346] Compiled 0 whitelist and 0 blacklist regex filters for 0 clients in 0.6 msec
[2022-01-13 11:36:49.795 342M] Reloading DNS cache
[2022-01-13 11:36:50.469 342/T346] gravityDB_count(SELECT value FROM info WHERE property = 'gravity_count';) - SQL error step no more rows available
[2022-01-13 11:36:50.469 342/T346] Count of gravity domains not available. Please run pihole -g
[2022-01-13 11:36:50.470 342/T346] Compiled 0 whitelist and 0 blacklist regex filters for 0 clients in 0.9 msec
Was Pi-hole installed via dietpi-software or the official installer? In case dietpi-software was used, take care to select No when being asked during pihole -r > reconfigure whether you want to install Lighttpd/webserver, as this would mess with the webserver setup done by dietpi-software.
attempt to write a readonly database in /var/www/html/admin/scripts/pi-hole/php/teleporter.php on line 90
I think the Teleporter export/backup does contain the database (look into etc/), but it fails to import, either because it has wrong permissions or it indeed does not exist and the www-data user has no permissions to create new files. I though it is created automatically on pihole-FTL start?
Probably contained in the debug upload already:
ls -l /etc/pihole/gravity.db
The reconfiguration should definitely solve it. But probably even faster:
This doesn't guarantee that it was installed without dietpi-software and selecting Lighttpd in the Pi-hole installer would then install a conflicting lighttpd.conf and others .
-rw-rw-r-- 1 pihole pihole 92K Jan 13 10:56 /etc/pihole/gravity.db
Then I do not understand the error message . Probably an issue with the filesystem itself, being corrupted and then auto-remounted as read-only? Although then I'd expected a bunch of other errors around. Another thing to check:
Sorry for missing some of the more crucial information for you.
Yes, I was trying to install via the DietPi list of software directly. I had selected not to pick a Blocklist at the install stage, as I knew I'd be bringing my existing ones in.
I just tried the command pihole -r > reconfigure, and made sure to choose the prompted Adlist, and selected No when asked about the webserver.
Here's the output when it fails again:
[✓] Update local cache of available packages
[i] Existing PHP installation detected : PHP version 7.4.25
[✓] Checking apt-get for upgraded packages... up to date!
[i] Checking for / installing Required dependencies for OS Check...
[✓] Checking for grep
[✓] Checking for dnsutils
[✓] Supported OS detected
[i] Checking for / installing Required dependencies for this install script...
[✓] Checking for git
[✓] Checking for iproute2
[✓] Checking for whiptail
[✓] Checking for ca-certificates
[i] SELinux not detected
[i] Reconfigure option selected
[i] IPv4 address: 172.18.254.212/20
[i] Unable to find IPv6 ULA/GUA address
[i] IPv6 address:
[i] Using upstream DNS: Google (ECS, DNSSEC) (8.8.8.8, 8.8.4.4)
[i] Web Interface On
[i] Web Server Off
[i] Logging On.
[i] Privacy level 0 [i] Performing reconfiguration, skipping download of local repos
[✓] Resetting repository within /etc/.pihole...
[✓] Resetting repository within /var/www/html/admin...
[i] Checking for / installing Required dependencies for Pi-hole software...
[✓] Checking for cron
[✓] Checking for curl
[✓] Checking for iputils-ping
[✓] Checking for psmisc
[✓] Checking for sudo
[✓] Checking for unzip
[✓] Checking for idn2
[✓] Checking for sqlite3
[✓] Checking for libcap2-bin
[✓] Checking for dns-root-data
[✓] Checking for libcap2
[✓] Checking for netcat
[✓] Checking for user 'pihole'
[i] FTL Checks...
[✓] Detected x86_64 processor
[i] Checking for existing FTL binary...
[i] Latest FTL Binary already installed (v5.13). Confirming Checksum...
[i] Checksum correct. No need to download!
[✓] Installing scripts from /etc/.pihole
[i] Installing configs from /etc/.pihole...
[i] Existing dnsmasq.conf found... it is not a Pi-hole file, leaving alone!
[✓] Installed /etc/dnsmasq.d/01-pihole.conf
[✓] Installed /etc/dnsmasq.d/06-rfc6761.conf
[i] Installing blocking page...
[✓] Creating directory for blocking page, and copying files
[i] Backing up index.lighttpd.html
No default index.lighttpd.html file found... not backing up
[✓] Installing sudoer file
[✓] Installing latest Cron script
[i] Installing latest logrotate script...
[i] Existing logrotate file found. No changes made.
[i] Backing up /etc/dnsmasq.conf to /etc/dnsmasq.conf.old
[i] man not installed
[i] Testing if systemd-resolved is enabled
[i] Systemd-resolved is not enabled
[i] Restarting services...
[✓] Enabling pihole-FTL service to start on reboot...
[✓] Restarting pihole-FTL service...
[✓] Deleting existing list cache
[i] Neutrino emissions detected...
[✗] Pulling blocklist source list into range
[i] No source list found, or it is empty
[i] Building tree...
[✗] Unable to build gravity tree in /etc/pihole/gravity.db_temp
Error: no such table: main.gravity
[✗] Unable to create database. Please contact support.
Just re-run Reconfigure again, and made absolutely sure the default adlist was selected, and still get the same result:
[✗] Pulling blocklist source list into range
[i] No source list found, or it is empty
[i] Building tree...
[✗] Unable to build gravity tree in /etc/pihole/gravity.db_temp
Error: no such table: main.gravity
[✗] Unable to create database. Please contact support.
Looks to still fail:
root@DietPi:~# pihole -g -r recreate
[✓] Recreating gravity database from migration backup
[i] Creating new gravity database
[i] Migrating content of /etc/pihole/adlists.list into new database
[i] Neutrino emissions detected...
[✗] Pulling blocklist source list into range
[i] No source list found, or it is empty
[i] Building tree...
[✗] Unable to build gravity tree in /etc/pihole/gravity.db_temp
Error: no such table: main.gravity
[✗] Unable to create database. Please contact support.
I've spun up another VM and installed DietPi on it, and used the official installer, and Teleporter looks to work perfectly. I can test further with the borked install if you need me to as well.
Thanks for that info. I'm fine without investigating further. if everything is working right now for you. As linked above, the bug with an empty gravity should be fixed in the next release.