Jellyfin docker can't write to truenas folder. Sqlite database locked

fx2mx3

Cadet
Joined
May 18, 2023
Messages
6
Hi all,

It's my first post and do indeed apologise if this isn't the right place for my question, but I have to start somewhere... :)

So I have installed truenas scale latest version on my esxi 8 server on one VM (192.168.10.12) and I have another VM with debian running portainer (192.168.10.20).

On the Debian VM, I have mounted the following shares:

//192.168.10.12/esxi-share /mnt/esxi-share cifs credentials=/root/.smbcredentials,uid=1000,gid=1000,noauto,x-systemd.automount,vers=3.0,rw 0 0

//192.168.10.12/esxi-media /mnt/esxi-media cifs credentials=/root/.smbcredentials,uid=1000,gid=1000,noauto,x-systemd.automount,vers=3.0,rw 0 0

All is good, I can read and write from those folders. I then installed jellyfin on portainer with the following yaml

version: '3.5'
services:
jellyfin:
image: jellyfin/jellyfin
container_name: jellyfin
volumes:
- /mnt/esxi-share/.docker/jellyfin/config:/config
- /mnt/esxi-share/.docker/jellyfin/cache:/cache
- /mnt/esxi-media/Media/Movies:/media/movies
- /mnt/esxi-media/Media/TVShows:/media/tvshows
- /mnt/esxi-media/Media/Music:/media/music
ports:
- 8096:8096
- 8920:8920
- 7359:7359/udp
- 1900:1900/udp
restart: 'unless-stopped'
environment:
- PGUID=1000
- PGID=1000
- TZ=Etc/UTC
- NVIDIA_VISIBLE_DEVICES=all
runtime: nvidia

The problem is when the jellyfin config path is set to the truenas share /mnt/esxi-share/.docker/jellyfin/config:/config I get the following error:

Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'database is locked'.
at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db)

if I change that config to a folder locally for instance /home/myuser/docker/jellyfin/config:/config it works flawlessly.

I have noticed this problem with other containers as well where they can't read or write from subfolders within the share folder.

I have tried applying chmod 777 commands to the folder etc, but something is locking the db

I have attached the full error. thank you very much in advance.
 

fx2mx3

Cadet
Joined
May 18, 2023
Messages
6
For anyone reading this in the future, this is definitely not a truenas issue, I tried with OMV and exactly the same problem!
 

fx2mx3

Cadet
Joined
May 18, 2023
Messages
6
Generally speaking, sqlite database isn't a great choice for using over network. https://www.sqlite.org/useovernet.html
If you need a database hosted on a remote system you should use appropriate software e.g. postgres.
Thanks, matey for replying! To be fair I didn't even pick sqllite it just came with the jellyfin docker image. But the reason that it locks it's due to some issue with sqlite locking the file. I did find a solution, but it involved tampering with the CIFS automount thing... I just installed the config locally and am done with it! :))
 
Top