Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DietPi-Software | Jellyfin #5559

Merged
merged 6 commits into from
Jun 23, 2022
Merged

DietPi-Software | Jellyfin #5559

merged 6 commits into from
Jun 23, 2022

Conversation

Joulinar
Copy link
Collaborator

Jellyfin service needs some time now to finish first time startup. Otherwise config files are not created next time we start the service. https://dietpi.com/forum/t/jellyfin-installation-error/13402

I'm not quite happy with the delay of 30 sec, maybe you have a better idea @MichaIng

Furthermore we need to changed WorkingDirectory within service config to point to /mnt/dietpi_userdata/jellyfin as well.

DietPi-Software | Jellyfin - delay to stop the service to allow first time startup to finish
@Joulinar Joulinar requested a review from MichaIng June 12, 2022 14:16
@Joulinar Joulinar self-assigned this Jun 12, 2022
@Joulinar Joulinar added this to the v8.6 milestone Jun 12, 2022
Copy link
Owner

@MichaIng MichaIng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check out the Create_Config function, which does basically the same: Loop and wait for config file with timeout 🙂.

@Joulinar
Copy link
Collaborator Author

Check out the Create_Config function

That's as it is right now.

And there is the problem atm. Because the service needs to finish his startup once, to be able to create configuration files on next service start. Currently we stop the service right after package has been installed. And that's to early. There the service did not complete and will not create files next service start, which ist triggered by create_config. Means no configuration files are created and create_config is failing. Therefore I tried to delay the shutdown of the service right after it has been installed.

I hope I could explain it a bit. Honestly I'm not sure if this is an intended behaviour.

@MichaIng
Copy link
Owner

Ah nasty. There must be another file we can wait for on first service start, or is or something like a database entry that needs to exist?

@Joulinar
Copy link
Collaborator Author

Honestly I don't know. The service needs to pass the first a couple of initial steps. But not sure if he is doing something on file system level.

@MichaIng
Copy link
Owner

There must be some change in filesystem level, as there is nothing else that can be different on service restart. But a specific database entry is difficult to check for. I'll have a look.

@MichaIng
Copy link
Owner

Actually if the config files do not exist yet, why do we stop the service just for starting it again. In this case we can just let it run to safe time and extra restart loop when waiting for the config file to be created.

@Joulinar
Copy link
Collaborator Author

Doesn't matter how we do it, we need to keep the service first time running for 20-30 seconds before we are going to restart.

@Rmy1992
Copy link

Rmy1992 commented Jun 23, 2022

(Therefore I tried to delay the shutdown of the service right after it has been installed)

can u teach how to do this, so just before the arrival of dietpi v8.6?

- DietPi-Software | Jellyfin: Different approach to assure network.xml is created
@Joulinar
Copy link
Collaborator Author

Most probably we will release a beta version of DietPi v8.6 on upcoming weekend. I recommend to wait 2 more days.

@Joulinar Joulinar requested a review from MichaIng June 23, 2022 19:50
Joulinar and others added 2 commits June 23, 2022 21:51
- DietPi-Software | Jellyfin: Increase timeout when waiting for migrations.xml to 60 seconds and do WorkingDirectory change via drop-in config
@MichaIng MichaIng merged commit 29f98dc into dev Jun 23, 2022
@MichaIng MichaIng deleted the jellyfin branch June 23, 2022 21:00
@MichaIng MichaIng linked an issue Jul 1, 2022 that may be closed by this pull request
MichaIng added a commit that referenced this pull request May 22, 2024
- DietPi-Software | Jellyfin: Since a while FFmpeg 6 is available for Jellyfin, but on old installs with the old FFmpeg 5 package, it is not upgraded automatically by APT. This DietPi update applies the FFmpeg upgrade to all affected systems. Many thanks to @gioxx and @WolfganP for reporting this issue: #7080
- DietPi-Software | Jellyfin: Resolved an issue where the intended HTTP port change could not be applied, since the network config file is not created anymore at service start. We do now pre-create a minimal one, which is complemented with defaults automatically. There was a related issue: #5559. However, now, indeed network.xml is never created, intentionally, which is fine, since Jellyfin internally applies defaults for all non-defined settings, and stores them back to the config file when completing the web UI setup or saving network settings in web UI. So we can perfectly pre-create a minimal config with just the settings we need to have changed from defaults. Also XML syntax can be minimal, no XML meta data or schemes needed. No need to wait for config files to be created while setting the service start up.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Jellyfin "Error while starting server" Error installing Jellyfin on ASUS Tinker Board
3 participants