Jellyfin Forum
container stuck restarting - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: container stuck restarting (/t-container-stuck-restarting)



container stuck restarting - Precise7955 - 2023-08-13

Hello,
   my container is stuck 'restarting' -the cause seems to be 'CannotOpen: SQLitePCL.pretty.SQLiteException: unable to open database file'

Jellyfin suddenly encountered an issue where it's unable to open the SQLite database file (jellyfin.db)

I am running Jellyfin in a Docker container on Ubuntu Server.
The container is using the jellyfin/jellyfin image.
I've ruled out permission issues on the database file and its parent directory.
I've checked the database file integrity using PRAGMA integrity_check;, and it reported as "ok."
The container is set up using Docker Compose, and the relevant volumes are mounted correctly.
Restarting the container and Docker itself did not resolve the issue.
I've tried a container rebuild with the latest image, but the issue persists.

I think everything is pointing to something wrong with the db but I also think PRAGMA integrity_check; retuning "ok" rules out a bad/corrupted db? I don't know much at all about databases.
the permissions all seem correct on the volumes
volumes:
      - /dev/driConfused-facedev/dri
      - /home/jayelem/bin/docker/jellyfinConfused-faceconfig
      - /home/jayelem/bin/docker/jellyfinConfused-facecache
      - /mnt/ms_storage/streamConfused-facemedia

drwxr-xr-x  3 jayelem jayelem  4096 Aug 11 18:35 config
drwxr-xr-x  4 jayelem jayelem  4096 Aug 11 17:59 data
-rw-r--r-- 1 jayelem jayelem  4968448 Aug 11 17:59 jellyfin.db

And as I said this issue just seemed to start after everything running well for months. I'm not saying I didn't do something to cause the issue (it's totally possible) but I can't think of what it would be.

here are the (I hope) relevant logs
Code:
[23:29:09] [INF] [1] Main: Running query planner optimizations in the database... This might take a while
[23:29:09] [INF] [1] Emby.Server.Implementations.ApplicationHost: Disposing CoreAppHost
[23:29:09] [INF] [1] Emby.Server.Implementations.ApplicationHost: Disposing SchedulesDirect
[23:29:09] [INF] [1] Emby.Server.Implementations.ApplicationHost: Disposing EmbyTV
[23:29:09] [INF] [1] Emby.Server.Implementations.ApplicationHost: Disposing MusicBrainzAlbumProvider
[23:29:09] [INF] [2] Main: Received a SIGTERM signal, shutting down

[23:30:09] [INF] [1] Main: Jellyfin version: 10.8.10
[23:30:09] [INF] [1] Main: Environment Variables: ...
[23:30:09] [INF] [1] Main: Arguments: ...
[23:30:09] [INF] [1] Main: Operating system: Linux
[23:30:09] [INF] [1] Main: Architecture: X64
[23:30:09] [INF] [1] Main: 64-Bit Process: True
[23:30:09] [INF] [1] Main: User Interactive: True
[23:30:09] [INF] [1] Main: Processor count: 12
[23:30:09] [INF] [1] Main: Program data path: /config
[23:30:09] [INF] [1] Main: Web resources path: /jellyfin/jellyfin-web
[23:30:09] [INF] [1] Main: Application directory: /jellyfin/
[23:30:10] [INF] [1] Emby.Server.Implementations.AppBase.BaseConfigurationManager: Setting cache path: /cache
[23:30:10] [INF] [1] Emby.Server.Implementations.ApplicationHost: Loading assemblies
[23:30:10] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Defined LAN addresses: ...
[23:30:10] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Defined LAN exclusions: []
[23:30:10] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Using LAN addresses: ...
[23:30:10] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Using bind addresses: []
[23:30:10] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Using bind exclusions: []

[23:31:11] [INF] [1] Main: Jellyfin version: 10.8.10
[23:31:11] [INF] [1] Main: Environment Variables: ...
[23:31:11] [INF] [1] Main: Arguments: ...
[23:31:11] [INF] [1] Main: Operating system: Linux
[23:31:11] [INF] [1] Main: Architecture: X64
[23:31:11] [INF] [1] Main: 64-Bit Process: True
[23:31:11] [INF] [1] Main: User Interactive: True
[23:31:11] [INF] [1] Main: Processor count: 12
[23:31:11] [INF] [1] Main: Program data path: /config
[23:31:11] [INF] [1] Main: Web resources path: /jellyfin/jellyfin-web
[23:31:11] [INF] [1] Main: Application directory: /jellyfin/
[23:31:13] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugins: TMDb, Studio Images, OMDb, MusicBrainz, AudioDB

[23:32:13] [INF] [1] Main: Jellyfin version: 10.8.10
[23:32:13] [INF] [1] Main: Environment Variables: ...
[23:32:13] [INF] [1] Main: Arguments: ...
[23:32:13] [INF] [1] Main: Operating system: Linux
[23:32:13] [INF] [1] Main: Architecture: X64
[23:32:13] [INF] [1] Main: 64-Bit Process: True
[23:32:13] [INF] [1] Main: User Interactive: True
[23:32:13] [INF] [1] Main: Processor count: 12
[23:32:13] [INF] [1] Main: Program data path: /config
[23:32:13] [INF] [1] Main: Web resources path: /jellyfin/jellyfin-web
[23:32:13] [INF] [1] Main: Application directory: /jellyfin/
[23:32:15] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugins: TMDb, Studio Images, OMDb, MusicBrainz, AudioDB

Apologies if I've missed something obvious, I'm happy to post any other info that might help,
I'd appreciate any help/insight.
Thank you.


RE: container stuck restarting - Venson - 2023-08-14

Hey @Precise7955

That sounds like a permission issue.


drwxr-xr-x 3 jayelem jayelem 4096 Aug 11 18:35 config
drwxr-xr-x 4 jayelem jayelem 4096 Aug 11 17:59 data
-rw-r--r-- 1 jayelem jayelem 4968448 Aug 11 17:59 jellyfin.db


Indicates that jellyfin/docker is not owner of those files an cannot access them therefor.


RE: container stuck restarting - Precise7955 - 2023-08-16

(2023-08-14, 09:38 AM)Venson Wrote: Hey @Precise7955

That sounds like a permission issue.


drwxr-xr-x  3 jayelem jayelem  4096 Aug 11 18:35 config
drwxr-xr-x  4 jayelem jayelem  4096 Aug 11 17:59 data
-rw-r--r-- 1 jayelem jayelem  4968448 Aug 11 17:59 jellyfin.db


Indicates that jellyfin/docker is not owner of those files an cannot access them therefor.

Thanks very much for the reply. You may be correct but I've since rebuilt from the ground up with different paths and users. So I couldn't say for certain. I do recall setting it up that way was not typical and had permission issues initially because of it.

Thank you again for helping. Hopefully this thread helps someone in the future.