• 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: corrupted library.db when upgrading to >10.9.3

    Pages (2): 1 2 Next »

     
    • 0 Vote(s) - 0 Average

    SOLVED: corrupted library.db when upgrading to >10.9.3

    Each time I try to update Jellyfin to a >10.9.3 version, my library.db gets corrupted.
    fabien
    Offline

    Junior Member

    Posts: 7
    Threads: 1
    Joined: 2023 Nov
    Reputation: 0
    Country:France
    #1
    2024-07-09, 10:28 PM
    There was 2 issues related to this problem opened in GitHub but the were closed as a dev suggested to head for support on the forum
    https://github.com/jellyfin/jellyfin/issues/12035
    https://github.com/jellyfin/jellyfin/issues/12069

    So Here it is.
    I'm running Jellyfin through Debian on a VM.
    Each time I try to update Jellyfin to a >10.9.3 version, my library.db
     gets corrupted.
    I tried to replace
    library.db
     with a backup, as stated above, but no success..
    Here's the log where the corruption seems to happen?

    Code:
    [color=#1f2328][2024-07-04 01:12:35.869 +02:00] [INF] Applying migration '"UpdateDefaultPluginRepository10.9"'[/color]
    [color=#1f2328][2024-07-04 01:12:35.870 +02:00] [INF] Saving system configuration[/color]
    [color=#1f2328][2024-07-04 01:12:35.872 +02:00] [INF] Setting cache path: "/var/cache/jellyfin"[/color]
    [color=#1f2328][2024-07-04 01:12:35.872 +02:00] [INF] Migration '"UpdateDefaultPluginRepository10.9"' applied successfully[/color]
    [color=#1f2328][2024-07-04 01:12:35.879 +02:00] [INF] Applying migration '"FixAudioData"'[/color]
    [color=#1f2328][2024-07-04 01:12:35.883 +02:00] [INF] Backing up "library.db" to "/var/lib/jellyfin/data/library.db.bak2"[/color]
    [color=#1f2328][2024-07-04 01:12:36.535 +02:00] [INF] "library.db" backed up to "/var/lib/jellyfin/data/library.db.bak2"[/color]
    [color=#1f2328][2024-07-04 01:12:36.536 +02:00] [INF] Backfilling audio lyrics data to database.[/color]
    [color=#1f2328][2024-07-04 01:12:43.827 +02:00] [ERR] Could not apply migration '"FixAudioData"'[/color]
    [color=#1f2328]Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 11: 'database disk image is malformed'.[/color]
    [color=#1f2328]  at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()[/color]
    [color=#1f2328]  at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)[/color]
    [color=#1f2328]  at Microsoft.Data.Sqlite.SqliteCommand.ExecuteNonQuery()[/color]

    Thanks for your help, I'm stuck with Jellyfin 10.8.13.
    Go to solution
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,375
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #2
    2024-07-09, 10:35 PM
    Do you have another app that is monitoring Jellyfin and killing it if it doesn't start up after a certain amount of time?

    There was a migration in 10.9.4+ that can take some time to complete. A lot Synology Docker users (I know this doesn't apply to you) had watchdogs that killed Jellyfin if it didn't complete startup after 30 seconds, mid-migration, that caused their corruption.

    Do you have something similar going on?
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    fabien
    Offline

    Junior Member

    Posts: 7
    Threads: 1
    Joined: 2023 Nov
    Reputation: 0
    Country:France
    #3
    2024-07-10, 01:22 AM
    Thanks for your time and quick answer.

    I'm running Jellyfin server on a Virtual Machine (.qcow2) with Debian.
    I'm quite a beginner in Linux, How could I check if an app is monitoring Jellyfin and killing it?
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,375
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #4
    2024-07-10, 02:15 AM
    You not knowing means you didn't install one. There aren't any built in.

    Can you share your full Jellyfin log via pastebin? Preferably one immediately after upgrading.

    Also, what are the server hardware specs and what is the OS of the host machine? I'm assuming also Linux and this is a KVM based VM.
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    fabien
    Offline

    Junior Member

    Posts: 7
    Threads: 1
    Joined: 2023 Nov
    Reputation: 0
    Country:France
    #5
    2024-07-11, 12:32 AM
    OS of the host machine is called Freebox OS, The Freebox is the name of the router of my ISP which can handle VM management
    Freebox OS is a 64 bit Linux distribution (developped by the ISP)
    (According to the linked article) it incorporates a simple quad-core ARMv8 SoC, the Armada 8040 (88F8040) based on Cortex-A72, etched in 28nm
    16 Go RAM DDR4 ECC (I upgraded the RAM)

    VM Debian 12.6 has 2 CPU, and 4 Go RAM allocated + a cloud-init

    Jellyfin has been running flawessly with this config for more than 2 years before the 10.9.3 upgrade bug.

    Here's the Jellyfin log with a corrupted database happening at 
    [2024-07-11 02:23:34.441 +02:00] [ERR] Could not apply migration '"FixAudioData"'
    https://pastebin.com/36TciHPD
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,375
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #6
    2024-07-11, 04:29 PM
    The two issues you linked in your first post involved docker killing the Jellyfin container mid-migration because the FixAudioData migration was taking too long. That does not appear to be the case here.

    Other than some plugins failing to start immediately after the upgrade (normal), I don't see anything out of the ordinary to explain what is happening.

    When you say you restored a backup, is that a backup you made or are you talking about using library.db.bak2?
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    fabien
    Offline

    Junior Member

    Posts: 7
    Threads: 1
    Joined: 2023 Nov
    Reputation: 0
    Country:France
    #7
    2024-07-11, 05:16 PM
    It's a whole backup of my Debian ".qcow2" image before the failing upgrade.
    Thanks for the hint, I will try to upgrade by uninstalling some plugins first.
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,375
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #8
    2024-07-11, 05:20 PM
    Uninstalling the plugins SHOULDN'T make a difference, but who knows. I've seen weirder things.
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    fabien
    Offline

    Junior Member

    Posts: 7
    Threads: 1
    Joined: 2023 Nov
    Reputation: 0
    Country:France
    #9
    2024-07-11, 10:34 PM
    Indeed. Same bug happened.
    :-(

    What about this fix?
    https://forum.jellyfin.org/t-solved-erro...4#pid29294
    In my case, the "migrations.xml" located in etc/jellyfin file doesn't contain any
    "FixAudioData" line
    ??
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,375
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #10
    2024-07-11, 10:50 PM
    What happens when you just rename migrations.xml?
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    Pages (2): 1 2 Next »

    « Next Oldest | Next Newest »

    Users browsing this thread: 2 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