• 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 Jellyfin container fails to start after update

     
    • 0 Vote(s) - 0 Average

    Jellyfin container fails to start after update

    robertjdac
    Offline

    Junior Member

    Posts: 5
    Threads: 2
    Joined: 2024 Jun
    Reputation: 0
    #1
    2024-12-30, 03:07 AM
    I've had Jellyfin set up in a Docker container for the past  year working with nvidia hardware transcoding without issue.

    Today I made the mistake of running Watchtower which updated all my containers. All successfully updated except for Jellyifn.

    When it tries to start, I get this error in Portainer:

    Failed starting container: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error running hook #0: error running hook: exit status 1, stdout: , stderr: Auto-detected mode as 'legacy' nvidia-container-cli: detection error: nvml error: unknown error: unknown

    The logs spam the following for a while:

    [02:49:33] [INF] [23] Jellyfin.Api.Auth.CustomAuthenticationHandler: CustomAuthentication was not authenticated. Failure message: Invalid token.

    Any idea what I broke when updating?

    Thanks
    robertjdac
    Offline

    Junior Member

    Posts: 5
    Threads: 2
    Joined: 2024 Jun
    Reputation: 0
    #2
    2024-12-30, 03:32 AM (This post was last modified: 2024-12-30, 03:32 AM by robertjdac.)
    I removed the gpu/device passthrough from the docker compose file and jellyfin container does start; however I can't even login to my server anymore. It's like it deleted my user/settings.

    Guess I should never run Watchtower.
    bitmap
    Offline

    Community Moderator

    Posts: 1,073
    Threads: 9
    Joined: 2023 Jul
    Reputation: 31
    #3
    2024-12-30, 03:58 AM
    Quote:Guess I should never run Watchtower.

    Yes, please! Watchtower is an absolute nightmare unless you use something like LSIO images pinned to a version number that receive various updates to the base OS. It will absolutely destroy your shit otherwise.

    If you want an "update" solution that worked well for me for a number of years, try diun: https://github.com/crazy-max/diun. You get notified when a new version is available (I used Slack and Matrix webhooks while I used it) and can format the message to your liking, even with links to release notes and such. Nowadays I check often enough that I don't really need notifications, plus my server is extremely stable, so I fear introducing instability...
    Jellyfin 10.10.7 LSIO Docker | Ubuntu 24.04 LTS | i7-13700K | Arc A380 6 GB | 64 GB RAM | 79 TB Storage

    [Image: AP1GczPBda58ILsKKDCRtSyY9IlUsAPsBNpv5sNY...-h160-s-no]
    robertjdac
    Offline

    Junior Member

    Posts: 5
    Threads: 2
    Joined: 2024 Jun
    Reputation: 0
    #4
    2024-12-30, 04:20 AM
    (2024-12-30, 03:32 AM)robertjdac Wrote: I removed the gpu/device passthrough from the docker compose file and jellyfin container does start; however I  can't even login to my server anymore. It's like it deleted my user/settings.

    Guess I should never run Watchtower.

    Well I was able to get  it running again, and logged back in... however, I still can't get the Nvidia transcoding to work. It seems to have completely broken. Now whenever I run "nvidia-smi" from the command line, it just says "NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running."

    Not sure why Watchtower would have broken my nvidia drivers... but this was all working and it was a huge pain to set up!
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,373
    Threads: 10
    Joined: 2023 Jun
    Reputation: 465
    Country:United States
    #5
    2024-12-30, 01:33 PM
    Reinstall the Nvidia container toolkit?
    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]
    SilveryAbaba
    Offline

    Junior Member

    Posts: 14
    Threads: 4
    Joined: 2024 Jan
    Reputation: 0
    #6
    2025-08-15, 08:10 PM (This post was last modified: 2025-09-14, 01:27 PM by SilveryAbaba. Edited 1 time in total.)
    (2024-12-30, 01:33 PM)TheDreadPirate Wrote: Reinstall the Nvidia container toolkit?


    I'm having a similar issue (less watchtower).
    Woke up this morning and Jellyfin hadn't started and docker-compose up -d throws this error:

    Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error
    running prestart hook #0: exit status 1, stdout: , stderr: Auto-detected mode as 'legacy'
    nvidia-container-cli: ldcache error: process /sbin/ldconfig.real terminated with signal 9



    I saw this post saying they fixed it: https://forums.truenas.com/t/nvidia-gpu-...ning/32580 but it seems like that's a trueNAS thing because it didn't help my situation. I did reinstall the toolkit to no avail. Commenting out the nvidia stuff is the only way to get it to start.

    jellyfin:
        image: jellyfin/jellyfin
        container_name: jellyfin
        networks:
          - bridge_network
          - backend_network
        user: 1000:1000
        volumes:
          - jellyconfigConfused-faceconfig
          - jellycacheConfused-facecache
          - /media/8tb/moviesConfused-faceMovies
        restart: unless-stopped
        #runtime: nvidia
        #deploy:
        #  resources:
        #    reservations:
        #      devices:
        #        - driver: nvidia
        #          count: all
        #          capabilities: [gpu]


    9/14/25 an update may have fixed my problem, or it may have been because proprietary nvidia drivers had gotten uninstalled? Either way it's transcoding again.
    skittle
    Offline

    Junior Member

    Posts: 2
    Threads: 0
    Joined: 2025 Dec
    Reputation: 0
    #7
    Today, 07:44 AM (This post was last modified: Today, 07:50 AM by skittle. Edited 1 time in total.)
    I ran into this as well or at least something like it just on jellyfin running in a docker container on Debian 13. Here is the original error that I got. 

    Code:
    $ docker compose up
    Attaching to jellyfin
    Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error running prestart hook #0: exit status 1, stdout: , stderr: Auto-detected mode as 'legacy'
    nvidia-container-cli: initialization error: nvml error: driver not loaded

    I then noticed that when I ran NVIDIA SMI, it said it was not connected to the driver. Weirder still, there was no NVIDIA kernel module loaded. I know I definitely installed the driver not a week ago!

    Code:
    $ nvidia-smi
    NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.
    $ lsmod | grep nvidia
    $

    Here was the smoking gun. Note that my kernel has a different number than the NVIDIA current module!

    Code:
    $ uname -r
    6.12.57+deb13-amd64
    $ sudo dkms status
    nvidia-current/550.163.01, 6.12.48+deb13-amd64, x86_64: installed

    I think what happened is that at some point in the past (after setting the driver up) I did a harmless little apt-upgrade without noticing my kernel was upgraded. Then, because my kernel version incremented, but nothing was around to rebuild the NVIDIA module, it was never loaded when the machine later rebooted. ultimately leading to the errors with trying to use transcoding on the GPU. If you reinstall NVIDIA drivers here, it should work because it will give you a module built for your current kernel, but you can also do that yourself. It's probably a little bit faster that way. The key observation here is that it's probably not some new software that you installed. You might have just done an update which incremented your kernel, thereby breaking your NVIDIA driver from working with your new kernel. 

    If you're like me, and you confirm that the kernel version is not a match for the driver module, here is how you can rebuild the NVIDIA module for your new kernel.

    First, make sure your headers are installed for the current kernel. Replace my version number (6.12.57) with the right name. After that, you can reboot. This might not actually be needed, but it would ensure everything is going to match after booting back up. When the installation finishes, you will run DKMS auto install.

    Code:
    sudo apt install -y linux-headers-6.12.57+deb13-amd64

    sudo dkms autoinstall

    Hopefully that finishes successfully and you see something like:

    Code:
    Autoinstall on 6.12.57+deb13-amd64 succeeded for module(s) nvidia-current.

    Hooray! Now you can manually load it, confirm that it's listed, and even successfully test with NVIDIA SMI. 

    Code:
    $ sudo modprobe nvidia
    $ lsmod | grep nvidia
    nvidia              60702720  0
    drm                  774144  5 drm_kms_helper,drm_shmem_helper,nvidia,virtio_gpu
    $ nvidia-smi
    Sun Dec 14 23:10:11 2025
    +-----------------------------------------------------------------------------------------+
    | NVIDIA-SMI 550.163.01            Driver Version: 550.163.01    CUDA Version: 12.4    |
    |-----------------------------------------+------------------------+----------------------+
    | GPU  Name                Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
    | Fan  Temp  Perf          Pwr:Usage/Cap |          Memory-Usage | GPU-Util  Compute M. |
    |                                        |                        |              MIG M. |
    |=========================================+========================+======================|
    |  0  Quadro P2000                  Off |  00000000:09:00.0 Off |                  N/A |
    | 51%  25C    P0            18W /  75W |      0MiB /  5120MiB |      0%      Default |
    |                                        |                        |                  N/A |
    +-----------------------------------------+------------------------+----------------------+

    +-----------------------------------------------------------------------------------------+
    | Processes:                                                                              |
    |  GPU  GI  CI        PID  Type  Process name                              GPU Memory |
    |        ID  ID                                                              Usage      |
    |=========================================================================================|
    |  No running processes found                                                            |
    +-----------------------------------------------------------------------------------------+

    Now, Jellyfin should be happy because the driver is working properly. You shouldn't need to reinstall anything or change anything else. To prevent this from biting me again in the future, I pinned that kernel in apt so that it would not try and upgrade it in the future even if a newer one is available. It will now be my responsibility to check for updates, update the kernel, and rebuild the nvidia module if necessary. 

    Code:
    sudo apt-mark hold linux-image-amd64 linux-headers-amd64
    .
    ..
    ...
    ..
    .
    linux-image-amd64 set on hold.
    linux-headers-amd64 set on hold.

    Hopefully, this might help somebody else who's searching the same error messages that I did and stumbles upon this thread, even if it's not exactly about the same issue for sure. Good luck!
    « 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