New PiHole Docker Install Network Page Error

Please follow the below template, it will help us to help you!

When loading the "network" page of a new Pi-hole docker install I am getting the below error.
An unknown error occurred while loading the data.

piHole-FTL.db exists in the config folder. My devices also don't resolve the pi.hole/admin/ page if that's related.

Expected Behaviour:

[Replace this text with what you think should be happening. Please include as much detail as possible including, but not limited to:
-operating system Ubuntu 22.04.3 LTS (GNU/Linux 5.15.0-1041-raspi aarch64)
RPI 4 with 8GB RAM
DCHP is currently Eero pods pointed to Pi as primary DNS.

Ad blocking is working fine, it's the network page getting the above error. If I go on client management I get this as well.

Actual Behaviour:

[replace this text with what is actually happening]
Error when loading Clients on Network Page and Resolving pi.hole/admin/ page on devices on local network.

Debug Token:

[Replace this text with the debug token provided from running pihole -d (or running the debug script through the web interface]

Docker Compose

    container_name: pihole
    image: pihole/pihole:latest
    # For DHCP it is recommended to remove these ports and instead add: network_mode: "host"
      - "53:53/tcp"
      - "53:53/udp"
      - "67:67/udp" # Only required if you are using Pi-hole as your DHCP server
      - "80:80/tcp"
      TZ: "Europe/Malta"
      WEBPASSWORD: 'RandomPasswordThatIsntThis'
    # Volumes store your data between container upgrades
      - '/mnt/external/config/pihole/etc-pihole:/etc/pihole'
      - '/mnt/external/config/pihole/etc-dnsmasq.d:/etc/dnsmasq.d'
      - NET_ADMIN # Required if you are using Pi-hole as your DHCP server, else not needed
    restart: unless-stopped # Recommended but not required (DHCP needs NET_ADMIN)

You have many error messages like this:

[2023-10-24 21:18:25.474 270M] SQLite3 message: cannot open file at line 43450 of [831d0fb283] (14)
[2023-10-24 21:18:25.474 270M] SQLite3 message: os_unix.c:43450: (0) open(/etc/pihole/pihole-FTL.db) -  (14)
[2023-10-24 21:18:25.474 270M] Error while trying to open database: unable to open database file
[2023-10-24 21:18:25.474 270M] getNameFromIP("") - Failed to open DB

This seems to be a permission error with the files in this volume: /mnt/external/config/pihole/etc-pihole.

If I do a clean install by deleting the files in the mounted folders, it doesn't create a .db file at all I've noticed. Permissions seem to be correct:

root@a12f47fdae8d:/# ls -lha /etc/pihole
total 21M
drwxr-xr-x 1 1000 pihole 488 Oct 25 13:39 .
drwxr-xr-x 1 root root 4.0K Oct 25 13:38 ..
-rwxr-xr-x 1 1000 pihole 65 Oct 25 13:38 adlists.list
-rwxr-xr-x 1 1000 pihole 0 Oct 25 13:27 custom.list
-rwxr-xr-x 1 1000 pihole 0 Oct 25 13:27 dhcp.leases
-rwxr-xr-x 1 1000 pihole 651 Oct 25 13:38 dns-servers.conf
-rwxr-xr-x 1 1000 pihole 8.6M Oct 25 13:39 gravity.db
-rwxr-xr-x 1 1000 pihole 8.6M Oct 25 13:28 gravity_old.db
-rwxr-xr-x 1 1000 pihole 3.1M Oct 25 13:38
-rwxr-xr-x 1 1000 pihole 95 Oct 25 13:28
-rwxr-xr-x 1 1000 pihole 65 Oct 25 13:39 local.list
-rwxr-xr-x 1 1000 pihole 241 Oct 25 13:27 logrotate
drwxr-xr-x 1 1000 pihole 160 Oct 25 13:28 migration_backup
-rwxr-xr-x 1 1000 pihole 157 Oct 25 13:38 pihole-FTL.conf
-rwxr-xr-x 1 1000 pihole 209 Oct 25 13:38 setupVars.conf
-rwxr-xr-x 1 1000 pihole 209 Oct 25 13:38 setupVars.conf.update.bak
-rwxr-xr-x 1 1000 pihole 382 Oct 25 13:39 versions

Edit: I've also tried moving the db location with the config to /var/log (where the log is being written to fine) and it still has the same issue. I'm assuming sqllite3 is trying to write to a temp folder maybe somewhere that doesn't have the correct permissions or space?

I think you are trying to use a volume mounted in /dev/sda, correct?

If that's the case, can you please try using a volume mounted on the SD card? Does the file is created?

Yep correct, Running it on the SD card worked fine :slight_smile: Any ideas what the cause could be? I don't mind running it on the card but would much rather the external volume.

Which filesystem is used on the external disk? NTFS? ext4? exFAT? other?

I'm not sure (I'm not a docker expert), but I guess this is a combination of using a Bind mount (instead of a named volume), storing the files in an different filesystem (possibly NTFS) and permissions for the current user.

You probably can find better answers on docker forums.

1 Like

Right on the money :partying_face: Changing drive format to ext4 fixed it :slight_smile:

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