Database locked (dashboard and query log are empty)

The issue I am facing:
I noted today that the dashboard is empty, as well as the query log.
Tools --> Tail pihole.log and pihole-FTL.log are not showing anything either.

When I run tail pihole-FTL.log from command line, I get:

[2021-01-19 22:27:31.654 1306/T1310] SQLite3 message: file unlinked while open: /etc/pihole/gravity.db (28)
[2021-01-19 22:27:31.707 1306/T1310] Compiled 0 whitelist and 0 blacklist regex filters for 0 clients in 1.2 msec
[2021-01-19 22:30:01.174 1306/T1310] ERROR: SQL query "END TRANSACTION" failed: database is locked
[2021-01-19 22:30:01.175 1306/T1310] WARNING: Storing devices in network table failed: database is locked
[2021-01-19 22:39:20.349 1306M] getMACfromIP("127.0.0.1") - Database not available
[2021-01-19 22:39:20.350 1306M] getNameFromIP("127.0.0.1") - Database not available
[2021-01-19 22:39:20.350 1306M] getIfaceFromIP("127.0.0.1") - Database not available
[2021-01-19 22:39:20.459 1306M] getMACfromIP("10.7.8.8") - Database not available
[2021-01-19 22:39:20.459 1306M] getNameFromIP("10.7.8.8") - Database not available
[2021-01-19 22:39:20.460 1306M] getIfaceFromIP("10.7.8.8") - Database not available

However, adblocking seems to be working properly.

Details about my system:
Running the latest Pi-hole on an Raspi 3.
Pi-hole: 5.2.4
web interface: 5.3.1
FTL: 5.5.1

I had the same problem yesterday when still running FTL 5.4

What I have changed since installing Pi-hole:

  • I installed and configured unbound as local resolver
  • I have very recently renamed my PI using the raspi-config tool.
  • I have also run apt-upgrade recently.
apt upgrade transaction details
Start-Date: 2021-01-17  20:02:10
Commandline: apt upgrade
Requested-By: pi (1000)
Upgrade: libpolkit-gobject-1-0:armhf (0.105-25, 0.105-25+rpt1), libraspberrypi-bin:armhf (1.20201201-1, 1.20210108-1), libraspberrypi-dev:armhf (1.20201201-1, 1.20210108-1), libraspberrypi-doc:armhf (1.20201201-1, 1.20210108-1), rpi-eeprom:armhf (11.0-1, 11.5-1), libpolkit-agent-1-0:armhf (0.105-25, 0.105-25+rpt1), rpi.gpio-common:armhf (0.7.0-0.1~bpo10+2, 0.7.0-0.1~bpo10+4), raspberrypi-kernel:armhf (1.20201201-1, 1.20210108-1), raspberrypi-bootloader:armhf (1.20201201-1, 1.20210108-1), libpolkit-backend-1-0:armhf (0.105-25, 0.105-25+rpt1), libraspberrypi0:armhf (1.20201201-1, 1.20210108-1), python-rpi.gpio:armhf (0.7.0-0.1~bpo10+2, 0.7.0-0.1~bpo10+4), policykit-1:armhf (0.105-25, 0.105-25+rpt1)
End-Date: 2021-01-17  20:11:42

Debug Token:
That process is not finishing sucesfully but stuck at *** [ DIAGNOSING ]: Dashboard and block page
Everything up to here can be seen below:

Debug as far as the pihole -d command goes
*** [ INITIALIZING ]
[i] 2021-01-19:22:44:40 debug log has been initialized.

*** [ INITIALIZING ] Sourcing setup variables
[i] Sourcing /etc/pihole/setupVars.conf...

*** [ DIAGNOSING ]: Core version
[i] Core: v5.2.4 (https://discourse.pi-hole.net/t/how-do-i-update-pi-hole/249)
[i] Remotes: origin	https://github.com/pi-hole/pi-hole.git (fetch)
             origin	https://github.com/pi-hole/pi-hole.git (push)
[i] Branch: master
[i] Commit: v5.2.4-0-gcbfb58f

*** [ DIAGNOSING ]: Web version
[i] Web: v5.3.1 (https://discourse.pi-hole.net/t/how-do-i-update-pi-hole/249)
[i] Remotes: origin	https://github.com/pi-hole/AdminLTE.git (fetch)
             origin	https://github.com/pi-hole/AdminLTE.git (push)
[i] Branch: master
[i] Commit: v5.3.1-0-g704e5d4

*** [ DIAGNOSING ]: FTL version
[✓] FTL: v5.5.1

*** [ DIAGNOSING ]: lighttpd version
[i] 1.4.53

*** [ DIAGNOSING ]: php version
[i] 7.3.19

*** [ DIAGNOSING ]: Operating system
[i] dig return code:  0
[i] dig response:  "Raspbian=9,10 Ubuntu=16,18,20 Debian=9,10 Fedora=31,32 CentOS=7,8"
[✓] Distro:  Raspbian
[✓] Version: 10

*** [ DIAGNOSING ]: SELinux
[i] SELinux not detected

*** [ DIAGNOSING ]: FirewallD
[i] Firewalld service inactive

*** [ DIAGNOSING ]: Processor
[✓] armv7l

*** [ DIAGNOSING ]: Networking
[✓] IPv4 address(es) bound to the eth0 interface:
   10.7.8.8/24 matches the IP found in /etc/pihole/setupVars.conf

[✓] IPv6 address(es) bound to the eth0 interface:
   fe80::b974:ae25:4cb2:211c does not match the IP found in /etc/pihole/setupVars.conf (https://discourse.pi-hole.net/t/use-ipv6-ula-addresses-for-pi-hole/2127)

   ^ Please note that you may have more than one IP address listed.
   As long as one of them is green, and it matches what is in /etc/pihole/setupVars.conf, there is no need for concern.

   The link to the FAQ is for an issue that sometimes occurs when the IPv6 address changes, which is why we check for it.

[i] Default IPv4 gateway: 10.7.8.1
   * Pinging 10.7.8.1...
[✓] Gateway responded.

*** [ DIAGNOSING ]: Ports in use
*:22 sshd (IPv4)
*:22 sshd (IPv6)
127.0.0.1:5335 unbound (IPv4)
[80] is in use by lighttpd
[80] is in use by lighttpd
[53] is in use by pihole-FTL
[53] is in use by pihole-FTL
[4711] is in use by pihole-FTL
[4711] is in use by pihole-FTL

*** [ DIAGNOSING ]: Name resolution (IPv4) using a random blocked domain and a known ad-serving domain
[✓] moated-lines.000webhostapp.com is 0.0.0.0 via localhost (127.0.0.1)
[✓] moated-lines.000webhostapp.com is 0.0.0.0 via Pi-hole (10.7.8.8)
[✓] doubleclick.com is 172.217.22.14 via a remote, public DNS server (8.8.8.8)

*** [ DIAGNOSING ]: Discovering active DHCP servers (takes 10 seconds)
   Scanning all your interfaces for DHCP servers
   Timeout: 10 seconds
   
   * Received 548 bytes from eth0:10.7.8.1
     Offered IP address: 10.7.8.8
     Server IP address: 10.7.8.1
     Relay-agent IP address: N/A
     BOOTP server: (empty)
     BOOTP file: (empty)
     DHCP options:
      Message type: DHCPOFFER (2)
      server-identifier: 10.7.8.1
      lease-time: 86400 ( 1d )
      renewal-time: 43200 ( 12h )
      rebinding-time: 75600 ( 21h )
      netmask: 255.255.255.0
      router: 10.7.8.1
      dns-server: 10.7.8.1
      domain-name: "fritz.box"
      broadcast: 10.7.8.255
      Unknown option 158 with length 5
      --- end of options ---
    
   DHCP packets received on interface lo: 0
   DHCP packets received on interface eth0: 1

*** [ DIAGNOSING ]: Pi-hole processes
[✓] lighttpd daemon is active
[✓] pihole-FTL daemon is active

*** [ DIAGNOSING ]: Pi-hole-FTL full status
   ● pihole-FTL.service - LSB: pihole-FTL daemon
   Loaded: loaded (/etc/init.d/pihole-FTL; generated)
   Active: active (exited) since Tue 2021-01-19 20:49:23 CET; 1h 55min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 1284 ExecStart=/etc/init.d/pihole-FTL start (code=exited, status=0/SUCCESS)

Jan 19 20:49:22 pi3-hole systemd[1]: Starting LSB: pihole-FTL daemon...
Jan 19 20:49:22 pi3-hole pihole-FTL[1284]: Not running
Jan 19 20:49:22 pi3-hole su[1302]: (to pihole) root on none
Jan 19 20:49:22 pi3-hole su[1302]: pam_unix(su:session): session opened for user pihole by (uid=0)
Jan 19 20:49:23 pi3-hole pihole-FTL[1284]: FTL started!
Jan 19 20:49:23 pi3-hole su[1302]: pam_unix(su:session): session closed for user pihole
Jan 19 20:49:23 pi3-hole systemd[1]: Started LSB: pihole-FTL daemon.

*** [ DIAGNOSING ]: Setup variables
    BLOCKING_ENABLED=true
    ADMIN_EMAIL=<REMOVED>
    WEBUIBOXEDLAYOUT=boxed
    WEBTHEME=default-dark
    DNSMASQ_LISTENING=single
    DNS_FQDN_REQUIRED=true
    DNS_BOGUS_PRIV=true
    DNSSEC=false
    REV_SERVER=false
    PIHOLE_INTERFACE=eth0
    IPV4_ADDRESS=10.7.8.8/24
    IPV6_ADDRESS=
    PIHOLE_DNS_1=127.0.0.1#5335
    PIHOLE_DNS_2=
    QUERY_LOGGING=true
    INSTALL_WEB_SERVER=true
    INSTALL_WEB_INTERFACE=true
    LIGHTTPD_ENABLED=true
    CACHE_SIZE=10000

sqlite3 /etc/pihole/pihole-FTL.db "PRAGMA integrity_check;"
ok

1 Like

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