Jellyfin portainer stack completely reset after 10-hour server shutdown: why?

  • Hello!

    I've recently deployed a Jellyfin portainer stack (exactly as shown in this video) and afterwards shut down the server by typing "shutdown" in the CLI. Now I am presented with the Jellyfin setup after the server started up again: why did this happen; do you have any ideas on how to prevent this?


    Also, additional question: I'm trying to set up Plex and Jellyfin servers since one device that I am planning to stream this media to doesn't have a working Jellyfin program for it, is that possible? I've set up a Plex Server the other day and it worked perfectly, but now that I've mounted the same shared folders to also be accessible for Jellyfin and set up Jellyfin yesterday, I am getting a weird error when starting Plex! It says, "Please check that the file exists and the necessary drive is mounted." I know for a fact that the drive was mounted before mounting it also to Jellyfin, could it be that a shared folder can only be mounted once? Although it's ab SMB share and open to anyone! I do not understand.


    TL; DR: How to stop Jellyfin from resetting itself after a restart (and how to set up Plex and Jellyfin simultaneously)?

  • ryecoaaron

    Hat das Thema freigeschaltet.
  • as already written by another user in your other tread

    Lots on this in the Reddit Jellyfin forum

    the main focus in this forum is OMV, hence ymmv

    omv 6.9.6-2 (Shaitan) on RPi CM4/4GB with 64bit Kernel 6.1.21-v8+

    2x 6TB 3.5'' HDDs (CMR) formatted with ext4 via 2port PCIe SATA card with ASM1061R chipset providing hardware supported RAID1


    omv 6.9.3-1 (Shaitan) on RPi4/4GB with 32bit Kernel 5.10.63 and WittyPi 3 V2 RTC HAT

    2x 3TB 3.5'' HDDs (CMR) formatted with ext4 in Icy Box IB-RD3662-C31 / hardware supported RAID1

    For Read/Write performance of SMB shares hosted on this hardware see forum here

  • It's best to give Jellyfin read only access to your media shares (maybe Plex also but I don't use it). If you haven't then do so. It then stores its metadata etc in its own config files and database so less likely to interfere with another media playing system.

    Inwin MS04 case with 315 W PSU

    ASUS Prime H310i-Plus R2.0 board

    Two port PCI-E SATA card

    16GB Kingston DDR4

    Intel Pentium Coffee Lake G5400 CPU

    Samsung Evo M.2 256GB OS drive

    4x4TB WD Red NAS drives + 1x4TB + 1x5TB Seagate drives - MergerFS pool

    Seagate 5TB USB drives - SnapRAID parity x 2

    • Offizieller Beitrag

    It's best to give Jellyfin read only access to your media shares (maybe Plex also but I don't use it). If you haven't then do so. It then stores its metadata etc in its own config files and database so less likely to interfere with another media playing system.

    While that is certainly good advice to follow (with all of them, Plex, Emby, and Jellyfin).. I don't think that's his issue. I suspect when he rebooted, docker is starting before his storage drives are mounted... but given the fact he provided exactly zero information about his hardware/software setup, I can only speculate

  • While that is certainly good advice to follow (with all of them, Plex, Emby, and Jellyfin).. I don't think that's his issue. I suspect when he rebooted, docker is starting before his storage drives are mounted... but given the fact he provided exactly zero information about his hardware/software setup, I can only speculate

    I believe this must have been the reason. I edited the stack details and updated it, making it remount to all the volumes. Now it appears to be working, but I don't know if it'll continue to work once I reboot the server again.

  • Running both is simple, just run two different docker containers, pointed at different configs, but pointed at the same media library... just make sure there is no port issues between them.

    They are pointed at different configs, yet I believe that for some reason whenever I restart both services cannot find the drive. It is an external drive, could it be that containers start up before the system recognizes the existance of external drives?

  • It's best to give Jellyfin read only access to your media shares (maybe Plex also but I don't use it). If you haven't then do so. It then stores its metadata etc in its own config files and database so less likely to interfere with another media playing system.

    Well, Jellyfin creates awesome metadata that I believe Plex should use sometimes, and so far both services worked fine as seperate docker containers, yet when I restarted the server (the OMV not the container) they acted like none of the media existed.

    • Offizieller Beitrag

    You can write an override service file for docker. So that the start of docker is delayed by some second.


    systemctl edit docker.service

    paste

    Code
    [Service]
    ExecStartPre=/bin/sleep 30
    StartLimitInterval=300s

    save and restart docker

  • You can write an override service file for docker. So that the start of docker is delayed by some second.


    systemctl edit docker.service

    paste

    Code
    [Service]
    ExecStartPre=/bin/sleep 30
    StartLimitInterval=300s

    save and restart docker

    Thank you SO much. I'll try to apply this and see if it will work!

  • You can write an override service file for docker. So that the start of docker is delayed by some second.


    systemctl edit docker.service

    paste

    Code
    [Service]
    ExecStartPre=/bin/sleep 30
    StartLimitInterval=300s

    save and restart docker

    It asks me for a filename on this, I thought I was editing an already existing file? Very confused.

    • Offizieller Beitrag

    It is a bit confusing. You are not editing the unit file directly. You write a file that is then editing the original unit file. Basically the original file and the file you write are merged.

    The advantage is, that the override file will survive an update.


    From https://www.linode.com/docs/gu…ntroduction-to-systemctl/

    Zitat

    The edit command opens up a blank drop-in snippet file in the system’s default text editor:

    Code
    sudo systemctl edit ssh

    When the file is saved, systemctl will create a file called override.conf under a directory at /etc/systemd/system/yourservice.service.d, where yourservice is the name of the service you chose to edit. This command is useful for changing a few properties of the unit file.

    • Offizieller Beitrag

    I believe this must have been the reason. I edited the stack details and updated it, making it remount to all the volumes. Now it appears to be working, but I don't know if it'll continue to work once I reboot the server again.

    Well, the easy way to test... Reboot the server, check jellyfin and see if it is "normal" or if it is acting like a new install again. If it is acting as if it is "new"... just SSH your server and run the command


    systemctl restart docker


    Give docker about 20sec to completely restart, then refresh the Jellyfin page... if it now shows all your files, is configured, etc.. you know that's your issue. That script macom posted should fix the problem if done properly.

  • Yeah, sorry! Wanted to do that yesterday, but also had lots of FTP uploads happening at the same time and I didn't want to disrupt that. But, good news:

    When I turned on the server today and then looked at Jellyfin about a minute later (I know the script said 30 seconds, but that was for the entirety of Docker) everything worked! It did not act like a new setup and all the directories, including my config directory, seem to have mounted correctly!

    Thank you so much everyone!

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!