[Solved] [The Epube] Cannot open calibre database file, PDOException

Sorry in advance if this is the wrong place to ask.

Running via docker, compose file unchanged (aside from commenting out dict), metadata.db has 777 permissions and is readable from inside the container; calibre says database has no errors. Docker logs:

updating epube source in /var/www/html/books from https://git.tt-rss.org/fox/the-epube.git...
fatal: not in a git directory
error: unable to update master repository.
[11:39:14] Database schema is already at latest version.
[04-Jun-2022 11:39:14] NOTICE: fpm is running, pid 1
[04-Jun-2022 11:39:14] NOTICE: ready to handle connections
[04-Jun-2022 11:40:03 UTC] PHP Fatal error:  Uncaught PDOException: SQLSTATE[HY000] [14] unable to open database file in /var/www/html/books/index.php:199
Stack trace:
#0 /var/www/html/books/index.php(199): PDO->__construct()
#1 {main}
  thrown in /var/www/html/books/index.php on line 199

What should I check?

hmm. epube expects metadata.db in /books/ which is where your Calibre books library should be mounted to.

does this work?

docker-compose exec app sudo -u app sqlite3 /books/metadata.db .dump | head -5

# or plain docker:
# docker exec -it epube-docker-compose_app_1 sudo -u app sqlite3 /books/metadata.db .dump | head -5

you haven’t specified the platform so i’m not sure what else to tell you. it could be many things, for example selinux preventing access to a host directory. you’ll need to provide more information.

are you using docker hub images? what’s that about git repo error?

e: also

docker-compose exec app env | grep BOOKS_DIR

this should show your host Calibre books directory and a epube container-internal one.

That did it. File itself was set in ACL to readable by everyone (and I could, e.g. cat /books/metadata.db, which threw me off), but directory wasn’t.
For the record, platform is Synology DSM. Thanks and sorry for taking your time.

I’m using https://git.tt-rss.org/fox/epube-docker-compose.git, which is linked to in wiki. Is that the wrong one?

i’m glad to hear it worked.

there’s a separate branch there which uses prebuilt images instead of dealing with git repositories, same as tt-rss: https://git.tt-rss.org/fox/epube-docker-compose.git/log/?h=static-dockerhub

i suggest using this one because it should be a bit more reliable since syntax errors and the like would fail my CI/CD pipeline and won’t be pushed to docker hub.

i suppose the wiki should be updated.

e: i’ve updated the wiki https://dev.tt-rss.org/fox/the-epube/wiki/Home mentioning both available branches.