-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
This is a: Run Issue
When running a fresh install of pihole/pihole:2025.02.4, Gravity does not pull in any domains from my blocklist either via the web UI or command line. I have no issues adding individual domains to the blocklist
Same result when running via command line:
pi@pihole:~/pihole $ docker exec pihole sudo pihole -g
Gravity temporary directory does not exist or is not a writeable directory, falling back to /tmp.
[✓] DNS resolution is available
[i] Neutrino emissions detected...
[✓] Preparing new gravity database
[✓] Creating new gravity databases
[✓] Pulling blocklist source list into range
[i] Using libz compression
[✗] Unable to write to /etc/pihole/listsCache
Please run pihole -g as root
[✓] Building tree
[i] Number of gravity domains: 0 (0 unique domains)
[i] Number of exact denied domains: 1
[i] Number of regex denied filters: 0
[i] Number of exact allowed domains: 0
[i] Number of regex allowed filters: 0
[✓] Optimizing database
[✓] Swapping databases
[✓] The old database remains available
[✓] Cleaning up stray matter
[✓] Done.
Any help is greatly appreciated!
Related Issues
- I have searched this repository/Pi-hole forums for existing issues and pull requests that look similar
How to reproduce the issue
- Environment data
- Operating System: Raspbian 10 - Buster
- Hardware: Raspberry Pi 2 Model B
- Kernel Architecture: ArmV7
- Docker Install Info and version:
- Software source: image tag pihole:2025.02.4
- Hardware architecture: ARMv7
- docker-compose.yml contents, docker run shell command, or paste a screenshot of any UI based configuration of containers here
services:
pihole:
container_name: pihole
image: pihole/pihole:2025.02.4
network_mode: host
# ports:
# DNS Ports
# - "53:53/tcp"
# - "53:53/udp"
# Default HTTP Port
# - "80:80/tcp"
# Default HTTPs Port. FTL will generate a self-signed certificate
# - "443:443/tcp"
# Uncomment the below if using Pi-hole as your DHCP Server
#- "67:67/udp"
environment:
# Set the appropriate timezone for your location from
# https://en.wikipedia.org/wiki/List_of_tz_database_time_zones, e.g:
TZ: 'America/New York'
# Set a password to access the web interface. Not setting one will result in a random password being assigned
FTLCONF_webserver_api_password: 'REDACTED'
# If using Docker's default `bridge` network setting the dns listening mode should be set to 'all'3
FTLCONF_dns_listeningMode: 'all'
# Volumes store your data between container upgrades
volumes:
# For persisting Pi-hole's databases and common configuration file
- '/home/pi/pihole/etc-pihole:/etc/pihole'
# For persisting custom dnsmasq config files. Most will not need this, and can be safely removed/commented out
# - '/home/pi/pihole/etc-dnsmasq.d:/etc/dnsmasq.d'
cap_add:
# Required if you are using Pi-hole as your DHCP server, else not needed
# See Note On Capabilities below
- NET_ADMIN
restart: unless-stopped
- any additional info to help reproduce
While the updater implies possible permission issues, I have no other issues when writing to these directories. I've successfully written a test file to the listsCache directory from inside the container. As noted above, there are no issues when adding individual domains to the block list.
Here are the volume permissions (inside and outside) the container
pi@pihole:~/pihole/etc-pihole $ ll
total 1784
-rw-rw---- 1 pi pi 65 Feb 23 08:08 adlists.list
-rw-r----- 1 pi pi 44 Feb 23 08:08 cli_pw
drwxr-xr-x 2 pi pi 4096 Feb 23 07:47 config_backups
-rw-rw---- 1 pi pi 1192 Feb 23 08:10 dhcp.leases
-rw-rw---- 1 pi pi 5421 Feb 22 14:54 dnsmasq.conf
drwxr-xr-x 2 pi pi 4096 Feb 23 08:08 gravity_backups
-rw-rw-r-- 1 pi pi 102400 Feb 23 08:08 gravity.db
-rw-r----- 1 root root 102400 Feb 23 08:08 gravity_old.db
drwxr-xr-x 2 pi pi 4096 Feb 22 14:48 hosts
drwxr-xr-x 2 pi pi 4096 Feb 22 14:46 listsCache
-rw-r--r-- 1 root root 421 Feb 23 08:08 logrotate
drwxr-xr-x 2 pi pi 4096 Feb 22 18:47 migration_backup
-rw-r----- 1 pi pi 1302528 Feb 23 08:08 pihole-FTL.db
-rw-r----- 1 pi pi 32768 Feb 23 08:11 pihole-FTL.db-shm
-rw-r----- 1 pi pi 164832 Feb 23 08:11 pihole-FTL.db-wal
-rw-rw---- 1 pi pi 52491 Feb 23 07:47 pihole.toml
-rw-rw---- 1 pi pi 733 Feb 22 14:48 tls_ca.crt
-rw-rw---- 1 pi pi 713 Feb 22 14:48 tls.crt
-rw-rw---- 1 pi pi 1001 Feb 22 14:48 tls.pem
-rw-r--r-- 1 pi pi 380 Feb 23 08:08 versions
pi@pihole:~/pihole/etc-pihole $
pi@pihole:~/pihole/etc-pihole $
pi@pihole:~/pihole/etc-pihole $ docker exec pihole ls -l /etc/pihole
total 1784
-rw-rw---- 1 pihole pihole 65 Feb 23 13:08 adlists.list
-rw-r----- 1 pihole pihole 44 Feb 23 13:08 cli_pw
drwxr-xr-x 2 pihole pihole 4096 Feb 23 12:47 config_backups
-rw-rw---- 1 pihole pihole 1192 Feb 23 13:10 dhcp.leases
-rw-rw---- 1 pihole pihole 5421 Feb 22 19:54 dnsmasq.conf
-rw-rw-r-- 1 pihole pihole 102400 Feb 23 13:08 gravity.db
drwxr-xr-x 2 pihole pihole 4096 Feb 23 13:08 gravity_backups
-rw-r----- 1 root root 102400 Feb 23 13:08 gravity_old.db
drwxr-xr-x 2 pihole pihole 4096 Feb 22 19:48 hosts
drwxr-xr-x 2 pihole pihole 4096 Feb 22 19:46 listsCache
-rw-r--r-- 1 root root 421 Feb 23 13:08 logrotate
drwxr-xr-x 2 pihole pihole 4096 Feb 22 23:47 migration_backup
-rw-r----- 1 pihole pihole 1302528 Feb 23 13:08 pihole-FTL.db
-rw-r----- 1 pihole pihole 32768 Feb 23 13:11 pihole-FTL.db-shm
-rw-r----- 1 pihole pihole 164832 Feb 23 13:11 pihole-FTL.db-wal
-rw-rw---- 1 pihole pihole 52491 Feb 23 12:47 pihole.toml
-rw-rw---- 1 pihole pihole 713 Feb 22 19:48 tls.crt
-rw-rw---- 1 pihole pihole 1001 Feb 22 19:48 tls.pem
-rw-rw---- 1 pihole pihole 733 Feb 22 19:48 tls_ca.crt
-rw-r--r-- 1 pihole pihole 380 Feb 23 13:08 versions
Here is the log that is produced when I run the updater via the web UI:
2025-02-23 13:16:00.925 UTC [56/T90] DEBUG_INOTIFY: File written: /etc/pihole/pihole-FTL.db-wal
2025-02-23 13:16:02.926 UTC [56/T90] DEBUG_INOTIFY: File deleted: /etc/pihole/gravity_old.db
2025-02-23 13:16:02.926 UTC [56/T90] DEBUG_INOTIFY: File written: /etc/pihole/gravity.db
2025-02-23 13:16:02.926 UTC [56/T90] DEBUG_INOTIFY: File written: /etc/pihole/pihole-FTL.db-wal
2025-02-23 13:16:02.926 UTC [56/T90] DEBUG_INOTIFY: File created: /etc/pihole/gravity.db_temp
2025-02-23 13:16:02.927 UTC [56/T90] DEBUG_INOTIFY: File created: /etc/pihole/gravity.db_temp-journal
2025-02-23 13:16:03.926 UTC [56/T90] DEBUG_INOTIFY: File written: /etc/pihole/gravity.db_temp-journal
2025-02-23 13:16:03.927 UTC [56/T90] DEBUG_INOTIFY: File deleted: /etc/pihole/gravity.db_temp-journal
2025-02-23 13:16:03.927 UTC [56/T90] DEBUG_INOTIFY: File written: /etc/pihole/gravity.db_temp
2025-02-23 13:16:03.927 UTC [56/T90] DEBUG_INOTIFY: File created: /etc/pihole/gravity.db_temp-journal
2025-02-23 13:16:03.927 UTC [56/T90] DEBUG_INOTIFY: File created: /etc/pihole/gravity.db_temp-mj0AB03B953
2025-02-23 13:16:03.928 UTC [56/T90] DEBUG_INOTIFY: File written: /etc/pihole/gravity.db_temp-mj0AB03B953
2025-02-23 13:16:03.928 UTC [56/T90] DEBUG_INOTIFY: File deleted: /etc/pihole/gravity.db_temp-mj0AB03B953
2025-02-23 13:16:03.928 UTC [56/T90] DEBUG_INOTIFY: File written: /etc/pihole/gravity.db_temp-journal
2025-02-23 13:16:03.928 UTC [56/T90] DEBUG_INOTIFY: File deleted: /etc/pihole/gravity.db_temp-journal
2025-02-23 13:16:03.928 UTC [56/T90] DEBUG_INOTIFY: File written: /etc/pihole/gravity.db_temp
2025-02-23 13:16:03.928 UTC [56/T90] DEBUG_INOTIFY: File written: /etc/pihole/gravity.db
2025-02-23 13:16:03.929 UTC [56/T90] DEBUG_INOTIFY: File created: /etc/pihole/gravity.db_temp-journal
2025-02-23 13:16:03.929 UTC [56/T90] DEBUG_INOTIFY: File written: /etc/pihole/gravity.db_temp-journal
2025-02-23 13:16:03.929 UTC [56/T90] DEBUG_INOTIFY: File deleted: /etc/pihole/gravity.db_temp-journal
2025-02-23 13:16:03.929 UTC [56/T90] DEBUG_INOTIFY: File written: /etc/pihole/gravity.db_temp
2025-02-23 13:16:03.929 UTC [56/T90] DEBUG_INOTIFY: File created: /etc/pihole/gravity.db_temp-journal
2025-02-23 13:16:03.929 UTC [56/T90] DEBUG_INOTIFY: File written: /etc/pihole/gravity.db_temp-journal
2025-02-23 13:16:03.930 UTC [56/T90] DEBUG_INOTIFY: File deleted: /etc/pihole/gravity.db_temp-journal
2025-02-23 13:16:03.930 UTC [56/T90] DEBUG_INOTIFY: File written: /etc/pihole/gravity.db_temp
2025-02-23 13:16:03.930 UTC [56/T90] DEBUG_INOTIFY: File created: /etc/pihole/gravity.db_temp-journal
2025-02-23 13:16:03.930 UTC [56/T90] DEBUG_INOTIFY: File written: /etc/pihole/gravity.db_temp-journal
2025-02-23 13:16:03.930 UTC [56/T90] DEBUG_INOTIFY: File deleted: /etc/pihole/gravity.db_temp-journal
2025-02-23 13:16:03.930 UTC [56/T90] DEBUG_INOTIFY: File written: /etc/pihole/gravity.db_temp
2025-02-23 13:16:04.927 UTC [56/T90] DEBUG_INOTIFY: File written: /etc/pihole/gravity.db_temp
2025-02-23 13:16:04.928 UTC [56/T90] DEBUG_INOTIFY: File created: /etc/pihole/gravity.db_temp-journal
2025-02-23 13:16:04.928 UTC [56/T90] DEBUG_INOTIFY: File written: /etc/pihole/gravity.db_temp-journal
2025-02-23 13:16:04.928 UTC [56/T90] DEBUG_INOTIFY: File deleted: /etc/pihole/gravity.db_temp-journal
2025-02-23 13:16:04.929 UTC [56/T90] DEBUG_INOTIFY: File written: /etc/pihole/gravity.db_temp
2025-02-23 13:16:04.929 UTC [56/T90] DEBUG_INOTIFY: File created: /etc/pihole/gravity_old.db
2025-02-23 13:16:04.929 UTC [56/T90] DEBUG_INOTIFY: File written: /etc/pihole/gravity_old.db
2025-02-23 13:16:04.929 UTC [56/T90] DEBUG_INOTIFY: File created: /etc/pihole/gravity.db-journal
2025-02-23 13:16:04.930 UTC [56/T90] DEBUG_INOTIFY: File written: /etc/pihole/gravity.db-journal
2025-02-23 13:16:04.930 UTC [56/T90] DEBUG_INOTIFY: File deleted: /etc/pihole/gravity.db-journal
2025-02-23 13:16:04.930 UTC [56/T90] DEBUG_INOTIFY: File created: /etc/pihole/gravity.db-journal
2025-02-23 13:16:04.930 UTC [56/T90] DEBUG_INOTIFY: File written: /etc/pihole/gravity.db-journal
2025-02-23 13:16:04.930 UTC [56/T90] DEBUG_INOTIFY: File deleted: /etc/pihole/gravity.db-journal
2025-02-23 13:16:04.931 UTC [56/T90] DEBUG_INOTIFY: File created: /etc/pihole/gravity.db-journal
2025-02-23 13:16:04.931 UTC [56/T90] DEBUG_INOTIFY: File written: /etc/pihole/gravity.db-journal
2025-02-23 13:16:04.931 UTC [56/T90] DEBUG_INOTIFY: File deleted: /etc/pihole/gravity.db-journal
2025-02-23 13:16:04.931 UTC [56/T90] DEBUG_INOTIFY: File written: /etc/pihole/gravity.db
2025-02-23 13:16:04.932 UTC [56/T90] DEBUG_INOTIFY: File moved from: /etc/pihole/gravity.db
2025-02-23 13:16:04.932 UTC [56/T90] DEBUG_INOTIFY: File moved from: /etc/pihole/gravity.db_temp
2025-02-23 13:16:04.932 UTC [56/T90] DEBUG_INOTIFY: File moved to: /etc/pihole/gravity.db
2025-02-23 13:16:04.976 UTC [56M] DEBUG_ANY: dnsmasq received signal 17
2025-02-23 13:16:05.031 UTC [56/T89] INFO: Gravity database has been updated, reloading now
2025-02-23 13:16:05.034 UTC [56/T89] DEBUG_ANY: Closing gravity database
2025-02-23 13:16:05.051 UTC [56/T89] INFO: Compiled 0 allow and 0 deny regex for 17 clients in 1.5 msec
I have tried other blocklists as well
These common fixes didn't work for my issue
- [ X] I have tried removing/destroying my container, and re-creating a new container
- [ X] I have tried fresh volume data by backing up and moving/removing the old volume data
- [X ] I have tried running the stock
docker runexample(s) in the readme (removing any customizations I added) - [ X] I have tried a newer or older version of Docker Pi-hole (depending what version the issue started in for me)
- [ X] I have tried running without my volume data mounts to eliminate volumes as the cause

