dunxd / HomeAssistantAddons

Home Assistant Addons developed by dunxd
4 stars 0 forks source link

Error COPS: SQLSTATE[HY000]: General error: 5 database is locked #58

Open vmbajop opened 1 month ago

vmbajop commented 1 month ago

Connecting to http://292.268.1.45:8000/ I receive the following error:

Error
COPS: SQLSTATE[HY000]: General error: 5 database is locked

Please report this issue at https://github.com/mikespub-org/seblucas-cops/issues if needed

Link: [Home](http://192.168.0.45:8000/index.php?page=index&db=0&vl=0)

In my config, I have the following setup: In HOASS Storage, I have a link to a disk locally configured as NFS. The name is "Biblioteca", and it's accessible in media/Biblioteca. With HA COPS, I have entered "Biblioteca" in the Library Folder field. My YAML configuration is:

title: Biblioteca Local
library_folder: Biblioteca
rsync: false
reader: monocle

Has anyone else had the same problem?

dunxd commented 1 month ago

Have you tried specifying just:

library_folder: Biblioteca

It is not necessary to specify /media/.

The remote directory you mounted must be your Calibre Library with the metadata.db file and all the book sub-directories.

I've only tested with SMB shares. If the above doesn't work, let me know in case there are some NFS permissions issues I don't yet know of.

vmbajop commented 1 month ago

Sorry, I actually only put "Biblioteca" and not "media/Biblioteca", it stayed on the clipboard after copying it from somewhere else. I have modified the original message to avoid confusion.

I also confirm that in the link to the network folder, from "media/Biblioteca" in HOASS (File Editor), I can access the folder where "metadata.db" is located.

I'm going to try SMB and will comment.

Thank you and greetings.

vmbajop commented 1 month ago

With Samba it works. I prefer NFS, but its ok. Thanks so much.

dunxd commented 1 month ago

The library_folder field must specify where all the calibre library files are. If this is a subfolder of Biblioteca you need to specify it -e.g. Biblioteca/subfolder.

I'm sure this is what you meant, so I am just adding this here in case anyone else has trouble. Perhaps I can make the documentation clearer.

Glad you got SMB working. I'm not sure what may have been the issue with NFS if this was the only difference between working and not working. There may be some restrictions on accessing different mounts types in docker, which is used to host HA Add-ons, or there may be some requirements to configure the NFS share in a particular way on the source host. If you figure it out, please do share!