Skip to content

[Issue]: Unable to open database file #9758

Closed as not planned
Closed as not planned
@pkylian

Description

Please describe your bug

Hello,

I have got a problem with the Jellyfin server. Yesterday the server worked fine and today when I arrived at home the server was inaccessible. I watched logs and I saw this error :

CannotOpen: SQLitePCL.pretty.SQLiteException: unable to open database file

The server reboots in loop with this error. So I tried in a first time to restart the Docker container and it was the same. I also tried to restart the Docker service & socket but it didn't work. Same when I tried to reboot my Debian server.

Some precisions:

  • I already encountered an error with an older version of Jellyfin, I tried to delete jellyfin.db & library.db in the /config/data/ directory but it didn't work. I had to recreate entirely the Docker container to solve the issue
  • I have enough space on the SSD on which the Jellyfin Docker volume is stored
  • I didn't touch anything inside the container (permissions, installed packages, configurations...)
  • I use Docker with Portainer

Jellyfin Version

10.8.9

if other:

No response

Environment

- OS: Debian GNU/Linux 11 (bullseye)
- Linux Kernel: 6.1.0-0.deb11.6-amd64
- Virtualization: Docker with Portainer
- Storage: 256GB SSD (where Docker volumes are stored, 78GB used), 6To RAID 5 for movies/shows (~900GB used)

Jellyfin logs

[19:59:36] [INF] [1] Main: Jellyfin version: 10.8.9
[19:59:36] [INF] [1] Main: Environment Variables: ["[JELLYFIN_LOG_DIR, /config/log]", "[JELLYFIN_DATA_DIR, /config]", "[JELLYFIN_FFMPEG, /usr/lib/jellyfin-ffmpeg/ffmpeg]", "[JELLYFIN_CONFIG_DIR, /config/config]", "[JELLYFIN_PublishedServerUrl, https://jellyfin.kylianprevot.fr]", "[JELLYFIN_WEB_DIR, /jellyfin/jellyfin-web]", "[JELLYFIN_CACHE_DIR, /cache]", "[DOTNET_SYSTEM_GLOBALIZATION_INVARIANT, 1]"]
[19:59:36] [INF] [1] Main: Arguments: ["/jellyfin/jellyfin.dll"]
[19:59:36] [INF] [1] Main: Operating system: Linux
[19:59:36] [INF] [1] Main: Architecture: X64
[19:59:36] [INF] [1] Main: 64-Bit Process: True
[19:59:36] [INF] [1] Main: User Interactive: True
[19:59:36] [INF] [1] Main: Processor count: 4
[19:59:36] [INF] [1] Main: Program data path: /config
[19:59:36] [INF] [1] Main: Web resources path: /jellyfin/jellyfin-web
[19:59:36] [INF] [1] Main: Application directory: /jellyfin/
[19:59:36] [INF] [1] Emby.Server.Implementations.AppBase.BaseConfigurationManager: Setting cache path: /cache
[19:59:36] [INF] [1] Emby.Server.Implementations.ApplicationHost: Loading assemblies
[19:59:37] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Defined LAN addresses : [10.0.0.0/8,172.16.0.0/12,192.168.0.0/16]
[19:59:37] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Defined LAN exclusions : []
[19:59:37] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Using LAN addresses: [10.0.0.0/8,172.16.0.0/12,192.168.0.0/16]
[19:59:37] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Using bind addresses: []
[19:59:37] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Using bind exclusions: []
[19:59:40] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: TMDb 10.8.9.0
[19:59:40] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: Studio Images 10.8.9.0
[19:59:40] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: OMDb 10.8.9.0
[19:59:40] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: MusicBrainz 10.8.9.0
[19:59:40] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: AudioDB 10.8.9.0
[19:59:40] [INF] [1] Jellyfin.Server.Migrations.MigrationRunner: Applying migration 'MigrateActivityLogDatabase'
[19:59:40] [ERR] [1] Jellyfin.Server.Migrations.MigrationRunner: Could not apply migration 'MigrateActivityLogDatabase'
CannotOpen: SQLitePCL.pretty.SQLiteException: unable to open database file
   at SQLitePCL.pretty.SQLiteException.Throw(Int32 rc, Int32 extended, String msg)
   at SQLitePCL.pretty.SQLiteException.CheckOk(sqlite3 db, Int32 rc)
   at SQLitePCL.pretty.SQLiteDatabaseConnectionBuilder.Build()
   at Jellyfin.Server.Migrations.Routines.MigrateActivityLogDb.Perform()
   at Jellyfin.Server.Migrations.MigrationRunner.PerformMigrations(IMigrationRoutine[] migrations, MigrationOptions migrationOptions, Action`1 saveConfiguration, ILogger logger)
[19:59:40] [FTL] [1] Main: Error while starting server.
CannotOpen: SQLitePCL.pretty.SQLiteException: unable to open database file
   at SQLitePCL.pretty.SQLiteException.Throw(Int32 rc, Int32 extended, String msg)
   at SQLitePCL.pretty.SQLiteException.CheckOk(sqlite3 db, Int32 rc)
   at SQLitePCL.pretty.SQLiteDatabaseConnectionBuilder.Build()
   at Jellyfin.Server.Migrations.Routines.MigrateActivityLogDb.Perform()
   at Jellyfin.Server.Migrations.MigrationRunner.PerformMigrations(IMigrationRoutine[] migrations, MigrationOptions migrationOptions, Action`1 saveConfiguration, ILogger logger)
   at Jellyfin.Server.Migrations.MigrationRunner.Run(CoreAppHost host, ILoggerFactory loggerFactory)
   at Jellyfin.Server.Program.StartApp(StartupOptions options)
[19:59:40] [INF] [1] Main: Running query planner optimizations in the database... This might take a while
[19:59:40] [INF] [1] Emby.Server.Implementations.ApplicationHost: Disposing CoreAppHost
[19:59:40] [INF] [1] Emby.Server.Implementations.ApplicationHost: Disposing MusicBrainzAlbumProvider
[19:59:40] [INF] [1] Emby.Server.Implementations.ApplicationHost: Disposing SchedulesDirect
[19:59:40] [INF] [1] Emby.Server.Implementations.ApplicationHost: Disposing EmbyTV
[19:59:40] [INF] [2] Main: Received a SIGTERM signal, shutting down

FFmpeg logs

No response

Please attach any browser or client logs here

No response

Please attach any screenshots here

image
image
image

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions