Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Jellyfin Docker SQLite "unable to open database file" - a.k.a. Help with General File Permission in Unraid

Featured Replies

Hi guys,

I'm having some trouble recently due to my Jellyfin docker being unable to start up, and the logs show that

[14:49:09] [FTL] [1] Main: Unhandled Exception

Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 14: 'unable to open database file'.

seems to be the most likely culprit why it isn't able to start up.

It seems most likely that some kind of file permissions went wrong, and since this isn't the first time nor the only docker I have an issue with (can't use some SMB over Windows, have to use CLI to copy/ move stuff, Syncthing also refuses to work sometimes, etc), I figured I could ask for some help in managing file permissions here generally, and what the best practices are.

Any help would be appreciated!

Solved by bmartino1

  • Community Expert

Required appdata permissions vary by container so the only "best practice" is to never touch them or access appdata via SMB.

Check that file's perms looks right compared to others in that container's appdata. But it could also mean the file is corrupted.

  • Community Expert
  • Solution

sounds like database coruptions..
as it specfic to sqlite...
(More on that latter...) as that apears to be the core issue here...

image.png


To Inform:
Unraid runs at the root user level to gurantee file access. However, Linux OS files type permission are run at the no user(nobody) and set to group(users) permission for all users defined in users group

Each User and group has a ID # associated...

Unraid host
root 0 ID

nobody 99 ID

users 100 ID

image.png


Jelly fin may require additional data such as PUID and PGID

this said due to general file access and permission sometimes that is not enuoth and there is a need to run as the root user... the pgid and puid is set to 0

image.png

image.png


Unraid has a system tool in place to set "docker safe permission"
This essentials set chmod 777 and chown nobody:users to folders and files...

cd /path of jelly fin data

Docekr safe permission for Unraid


cd /mnt/user/appdata

chmod 777 -R *

chown nobody:users -R *


to fix file access and permission

Edited by bmartino1

  • Community Expert

plex is prone to this as well so is jellyfin...

sql corruption and database issues...

https://support.plex.tv/articles/repair-a-corrupted-database/


https://forum.jellyfin.org/t-sqlite-database-corruption-in-jellyfin-10-10-6-sudden-failure-without-system-change

The sql database holds the content data. You can delete the file and recreate it (this also deletes the metadata and data in the library a content rescan / add fixes it tough...

-Recommend with very bad non-recoverable sql errors...

or run sql commands from the docker to repir the sql file and have itt check itself...

  • 2 months later...

Since the beginning of this week, my Jellyfin container has stopped starting:

I have been running the Jellyfin container (linuxserver's repository) for a few months and it has been working perfectly. At the beginning of this week, it stopped and will no longer start. I found the following error messages in the log:

"[15:31:16] [ERR] [1] Microsoft.EntityFrameworkCore.Database.Command: Failed executing DbCommand (5ms) [Parameters=[], CommandType='Text', CommandTimeout='30']

[15:31:16] [FTL] [1] Main: Error while starting server

Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 14: 'unable to open database file'."

Since I couldn't find a solution in the forum, I uninstalled and reinstalled the container, and it ran without any problems—until the next server restart. After that, it wouldn't start anymore, and the log showed the same error messages again.

So I tried another container (Official Container) => same result, after restarting the server, the container no longer starts with the same errors in the log...

It would be great if someone could help me and has a suitable idea for a solution.

  • Community Expert
5 hours ago, Hinkley said:

Since the beginning of this week, my Jellyfin container has stopped starting:

I have been running the Jellyfin container (linuxserver's repository) for a few months and it has been working perfectly. At the beginning of this week, it stopped and will no longer start. I found the following error messages in the log:

"[15:31:16] [ERR] [1] Microsoft.EntityFrameworkCore.Database.Command: Failed executing DbCommand (5ms) [Parameters=[], CommandType='Text', CommandTimeout='30']

[15:31:16] [FTL] [1] Main: Error while starting server

Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 14: 'unable to open database file'."

Since I couldn't find a solution in the forum, I uninstalled and reinstalled the container, and it ran without any problems—until the next server restart. After that, it wouldn't start anymore, and the log showed the same error messages again.

So I tried another container (Official Container) => same result, after restarting the server, the container no longer starts with the same errors in the log...

It would be great if someone could help me and has a suitable idea for a solution.

You have a corrupted database file and need to recreate the database...

Please make your own general post and not hijack another...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.