Brandawg93/Pi-Hole-Monitoring

sqlite3.OperationalError: unable to open database file

ticteam opened this issue · 1 comments

Hello,

first of all : NICE WORK !

now my problem,
I run this on a centos 7 with pi-hole from a docker-compose, nearly all seems to be fine, exept the connection to the pihole-FTL.db that is located at:
-rw-r--r-- 1 root root 147456 3. Jun 11:33 /data/apps/pi-hole/etc-pihole/pihole-FTL.db

I also put this path into the docker-compose.yaml line 11 as
environment:
- PIHOLE_FTL_DB=/data/apps/pi-hole/etc-pihole/pihole-FTL.db

but a got this error message from docker-compose logs

filling data...
Traceback (most recent call last):
File "//main.py", line 129, in
add_new_results(last)
File "//main.py", line 74, in add_new_results
con = connect(PIHOLE_FTL_DB)
sqlite3.OperationalError: unable to open database file

any ideas from your point ?

got it, the environment must stay at :
- PIHOLE_FTL_DB=/etc/pihole/pihole-FTL.db
because it's in the sql_influx and the file and folders are mounted by the
volumes:
- /data/apps/pi-hole/etc-pihole:/etc/pihole