Jellyfin Forum
Jellyfin container fails to start after update - 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: Jellyfin container fails to start after update (/t-jellyfin-container-fails-to-start-after-update)



Jellyfin container fails to start after update - robertjdac - 2024-12-30

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


RE: Jellyfin container fails to start after update - robertjdac - 2024-12-30

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.


RE: Jellyfin container fails to start after update - bitmap - 2024-12-30

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...


RE: Jellyfin container fails to start after update - robertjdac - 2024-12-30

(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!


RE: Jellyfin container fails to start after update - TheDreadPirate - 2024-12-30

Reinstall the Nvidia container toolkit?


RE: Jellyfin container fails to start after update - SilveryAbaba - 2025-08-15

(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-not-found-prevents-jellyfin-container-from-opening/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.


RE: Jellyfin container fails to start after update - skittle - 2025-12-15

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!