weannounce / arrnounced

Notify Sonarr/Radarr/Lidarr of tracker IRC announcements.
22 stars 3 forks source link

"unable to open database" #13

Closed YDdraigGoch closed 4 years ago

YDdraigGoch commented 4 years ago

Hello, I am trying to use arrnounced with Docker but I get the following error:

pony.orm.dbapiprovider.OperationalError: unable to open database file

I am not sure how to resolve this.

Thanks in advance

Edit: wanted to add that before this line, there's a lot more python/sqlite error code, I guess related to this. I found this error checking the logs on portainer.

weannounce commented 4 years ago

Hi, it's difficult to help you without more information. Could you provide

In the directory you mapped to /config, does it contain the database file (brain.db)?

But if I had to guess it sounds like the docker container has not write permissions in /config. Make sure to run the container as the correct user i.e. Docker's --user flag.

YDdraigGoch commented 4 years ago

I didn't have chance to try sorting this out until now. Sorry that I didn't provide full logs - I'm a muppet for not doing so and not be much of a help.

Anyway, you're quite right it's to do with permissions. I use docker-compose rather than run. Now, even though I use the user flag, or add my user/group to environment, the folders created was still owned by root. I changed the permission to the right username and group and hey ho it works. I say work, but won't be able to try it out until I get a match from a tracker.

Thank you for prompting about permissions.

weannounce commented 4 years ago

Great that you found the problem.

Happy IRC'ing.