unable to open database
coolfreak55 opened this issue · 4 comments
I'm getting this error in the logs:
time="2023-06-19T13:19:32Z" level=error msg="Failed to handle request" error="unable to open database file: is a directory"
And here's my docker compose file.. I am guessing I'm just pointing it correctly to the databae file, but not sure how or why. The sqlite file is here: /mnt/user/downloads/rarbgselfhosted/rarbg_db.sqlite
`---
version: "3.7"
services:
rarbg-selfhosted:
container_name: rarbg-selfhosted
image: "ghcr.io/mgdigital/rarbg-selfhosted:latest"
environment:
- "PATH_SQLITE_DB=/rarbg_db.sqlite" (optional, this is the default value)
- "PATH_TRACKERS=/trackers.txt" (optional, this is the default value)
- "DEBUG=1" (optional, useful for troubleshooting)
volumes:
- "/mnt/user/downloads/rarbgselfhosted/rarbg_db.sqlite:/rarbg_db.sqlite"
ports:
- "3333:3333"
restart: unless-stopped`
Hi,
The error message is telling you the exact problem - you are pointing to a directory when you should be pointing to a file.
I also tried just "/mnt/user/downloads/rarbgselfhosted/rarbg_db.sqlite" as the path but I received the same error message. Is there another way to point to a .sqlite file?
I think you're pointing at a directory and not a file. To confirm this, install the sqlite3 cli (Google how) then run:
sqlite3 /mnt/user/downloads/rarbgselfhosted/rarbg_db.sqlite "select * from items limit 1"
If you don't see some Torrent info then there's something wrong with your SQLite file, and I'm afraid I can't help you with that.
I am also encountering this issue with the latest docker image. I have confirmed the default mounting, and the database is a valid sqlite file and not a directory with the command you posted above. The output of the command is the first row, items omitted for various purposes.
Confirmed this was user error... something in the process wiped/converted this to a directory. Re-unziped the archive and it works just fine...