• Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below
  • Forum
  • Website
  • GitHub
  • Status
  • Translation
  • Features
  • Team
  • Rules
  • Help
  • Feeds
User Links
  • Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below

    Useful Links Forum Website GitHub Status Translation Features Team Rules Help Feeds
    Jellyfin Forum Support Troubleshooting SOLVED: First startup endless loop with db error

     
    • 0 Vote(s) - 0 Average

    SOLVED: First startup endless loop with db error

    First startup endless loop with db error
    orphanFelix
    Offline

    Junior Member

    Posts: 2
    Threads: 1
    Joined: 2025 Aug
    Reputation: 0
    #1
    Yesterday, 08:25 PM (This post was last modified: Yesterday, 08:27 PM by orphanFelix.)
    Hi,

    I am having trouble starting JellyFin for the first time.

    I run docker compose up. Scrolling text happens.
    Then this happens:

    Code:
    jellyfin  | [22:05:30] [INF] [4] Emby.Server.Implementations.ApplicationHost: There are pending EFCore migrations in the database. Applying... (This may take a while, do not stop Jellyfin)
    jellyfin  | [22:06:00] [ERR] [4] Microsoft.EntityFrameworkCore.Database.Command: Failed executing DbCommand (30,147ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
    jellyfin  | PRAGMA journal_mode = 'wal';
    jellyfin  | [22:06:00] [FTL] [4] Main: Error while starting server
    jellyfin  | Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'database is locked'.
    jellyfin  |    at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db)
    jellyfin  |    at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()
    jellyfin  |    at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)
    jellyfin  |    at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader()
    jellyfin  |    at Microsoft.Data.Sqlite.SqliteCommand.ExecuteNonQuery()
    jellyfin  |    at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteNonQuery(RelationalCommandParameterObject parameterObject)
    jellyfin  |    at Microsoft.EntityFrameworkCore.Sqlite.Storage.Internal.SqliteDatabaseCreator.Create()
    jellyfin  |    at Microsoft.EntityFrameworkCore.Storage.RelationalDatabaseCreator.CreateAsync(CancellationToken cancellationToken)
    jellyfin  |    at Microsoft.EntityFrameworkCore.Migrations.Internal.Migrator.MigrateAsync(String targetMigration, CancellationToken cancellationToken)
    jellyfin  |    at Emby.Server.Implementations.ApplicationHost.InitializeServices()
    jellyfin  |    at Emby.Server.Implementations.ApplicationHost.InitializeServices()
    jellyfin  |    at Jellyfin.Server.Program.StartServer(IServerApplicationPaths appPaths, StartupOptions options, IConfiguration startupConfig)
    jellyfin  | [22:06:00] [INF] [4] Main: Running query planner optimizations in the database... This might take a while

    After that it seems to retry.
    Different but also db related error happens:

    Code:
    jellyfin  | [22:06:03] [INF] [1] Emby.Server.Implementations.ApplicationHost: There are pending EFCore migrations in the database. Applying... (This may take a while, do not stop Jellyfin)
    jellyfin  | [22:06:33] [ERR] [1] Microsoft.EntityFrameworkCore.Database.Command: Failed executing DbCommand (30,010ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
    jellyfin  | CREATE TABLE "__EFMigrationsHistory" (
    jellyfin  |    "MigrationId" TEXT NOT NULL CONSTRAINT "PK___EFMigrationsHistory" PRIMARY KEY,
    jellyfin  |    "ProductVersion" TEXT NOT NULL
    jellyfin  | );
    jellyfin  | [22:06:33] [FTL] [1] Main: Error while starting server
    jellyfin  | Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'database is locked'.
    jellyfin  |    at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db)
    jellyfin  |    at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()
    jellyfin  |    at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)
    jellyfin  |    at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader()
    jellyfin  |    at Microsoft.Data.Sqlite.SqliteCommand.ExecuteNonQuery()
    jellyfin  |    at System.Data.Common.DbCommand.ExecuteNonQueryAsync(CancellationToken cancellationToken)
    jellyfin  | --- End of stack trace from previous location ---
    jellyfin  |    at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteNonQueryAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
    jellyfin  |    at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteNonQueryAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
    jellyfin  |    at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteNonQueryAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
    jellyfin  |    at Microsoft.EntityFrameworkCore.Migrations.Internal.Migrator.MigrateAsync(String targetMigration, CancellationToken cancellationToken)
    jellyfin  |    at Emby.Server.Implementations.ApplicationHost.InitializeServices()
    jellyfin  |    at Emby.Server.Implementations.ApplicationHost.InitializeServices()
    jellyfin  |    at Jellyfin.Server.Program.StartServer(IServerApplicationPaths appPaths, StartupOptions options, IConfiguration startupConfig)
    jellyfin  | [22:06:33] [INF] [1] Main: Running query planner optimizations in the database... This might take a while

    Then this runs in a loop forever.

    I think what happens is that it tries to write something to the db about it being a fresh install.
    It fails to do that properly, then reruns but then fails to write completly because the previous write messed up.

    Any idea how to approach this?

    Basic info about the system:


    jellyfin | **** permissions for /dev/dri/renderD128 are good ****
    jellyfin | **** permissions for /dev/dri/card1 are good ****
    jellyfin | **** permissions for /dev/dri/card0 are good ****
    jellyfin | [custom-init] No custom files found, skipping...
    jellyfin | [22:05:29] [INF] [4] Main: Jellyfin version: 10.10.7
    jellyfin | [22:05:29] [INF] [4] Main: Environment Variables: ["[JELLYFIN_CONFIG_DIR, /config]", "[JELLYFIN_WEB_DIR, /usr/share/jellyfin/web]", "[JELLYFIN_LOG_DIR, /config/log]", "[JELLYFIN_DATA_DIR, /config/data]", "[JELLYFIN_CACHE_DIR, /config/cache]"]
    jellyfin | [22:05:29] [INF] [4] Main: Arguments: ["/usr/lib/jellyfin/bin/jellyfin.dll", "--ffmpeg=/usr/lib/jellyfin-ffmpeg/ffmpeg"]
    jellyfin | [22:05:29] [INF] [4] Main: Operating system: Ubuntu 24.04.3 LTS
    jellyfin | [22:05:29] [INF] [4] Main: Architecture: X64
    jellyfin | [22:05:29] [INF] [4] Main: 64-Bit Process: True
    jellyfin | [22:05:29] [INF] [4] Main: User Interactive: True
    jellyfin | [22:05:29] [INF] [4] Main: Processor count: 4
    jellyfin | [22:05:29] [INF] [4] Main: Program data path: /config/data
    jellyfin | [22:05:29] [INF] [4] Main: Log directory path: /config/log
    jellyfin | [22:05:29] [INF] [4] Main: Config directory path: /config
    jellyfin | [22:05:29] [INF] [4] Main: Cache path: /config/cache
    jellyfin | [22:05:29] [INF] [4] Main: Temp directory path: /tmp/jellyfin
    jellyfin | [22:05:29] [INF] [4] Main: Web resources path: /usr/share/jellyfin/web
    jellyfin | [22:05:29] [INF] [4] Main: Application directory: /usr/lib/jellyfin/bin/
    Go to solution
    orphanFelix
    Offline

    Junior Member

    Posts: 2
    Threads: 1
    Joined: 2025 Aug
    Reputation: 0
    #2
    Yesterday, 08:45 PM
    Well, I got it working basically right after posting. 

    Everything was on a network drive.
    After moving everything to a local drive it immediatly worked.
    So jellyfin itself local. Movies and stuff can still be network drive and added later.
    « Next Oldest | Next Newest »

    Users browsing this thread: 1 Guest(s)


    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    Home · Team · Help · Contact
    © Designed by D&D - Powered by MyBB
    L


    Jellyfin

    The Free Software Media System

    Linear Mode
    Threaded Mode