Jellyfin installation error

Required Information

  • DietPi version = 8.5.1
  • Distro version = bullseye 0
  • Kernel version = Linux DietPi 5.15.32-v8+ #1538 SMP PREEMPT Thu Mar 31 19:40:39 BST 2022 aarch64 GNU/Linux
  • SBC model = RPi 4 Model B (aarch64)

Additional Information (if applicable)

  • Software title = Jellyfin
  • New installation

Steps to reproduce

  1. Install jellyfin with dietpi software with root user

Actual behaviour

Unable to create network config



1 Like

Thanks for the report, i have the same issue as yours

Hi guys,

welcome to our community.

Look like something changed on actual jellyfin version and we would need to adjust the way how we install this software. I guess we will provide a fix on next release.

PR up to add a fix DietPi-Software | Jellyfin by Joulinar · Pull Request #5559 · MichaIng/DietPi · GitHub

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

Please try:

sudo sed -i '/systemctl stop jellyfin/d' /boot/dietpi/dietpi-software

Then install Jellyfin again.

The code posted by @MichaIng might not gonna work. At least we tested a different solution this evening :slight_smile:

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

Add code sucess

apt-get -y --allow-change-held-packages install jellyfin

8096 - /etc/jellyfin/network.xml edit port

The solution was a bit more complicated than I was hoping but is now included for upcoming DietPi v8.6: DietPi-Software | Jellyfin by Joulinar · Pull Request #5559 · MichaIng/DietPi · GitHub

1 Like

I am running DietPi v8.6.1 and I still have this issue with Jellyfin. Is there something else I need to do?

Welcome to our community.

You could start sharing the exact issue you have. :wink:

It is the same issue as in the original post – when installing Jellyfin using dietpi-software, I get the exact errors from the bottom two screenshots.

What SBC you are running? Some more information on your system would be helpful.

I am using a Raspberry Pi 4B 8gb. Basically everything I have is the same as the original post besides the DietPi version, which is v8.6.1

Can you share the full installation log? At best copy & paste the raw text from SSH console, if possible.

Only explanation I have is that one of the loops waiting for the config file after service start times out. If that is the case the output of the following command would be helpful as well:

journalctl -u jellyfin

The output from installed Jellyfin looks like this (I have only included the bottom part of the install, everything up top seems to work fine and most of it is just grabbing packages from links):

[  OK  ] DietPi-Software | APT install for: jellyfin
[  OK  ] DietPi-Software | systemctl daemon-reload
[  OK  ] DietPi-Software | Starting Jellyfin to pre-create config file in max 60 seconds
[  OK  ] DietPi-Software | systemctl stop jellyfin
[FAILED] DietPi-Software | Waiting for Jellyfin config file failed, skipping pre-configuration
[  OK  ] DietPi-Software | systemctl stop jellyfin
[  OK  ] DietPi-Software | Verifying user "jellyfin" to run Jellyfin
[  OK  ] DietPi-Software | usermod -aG dietpi,video,render -d /mnt/dietpi_userdata/jellyfin -s /usr/sbin/nologin jellyfin
[  OK  ] DietPi-Software | systemctl daemon-reload
[  OK  ] DietPi-Software | Starting Jellyfin to pre-create config file in max 25 seconds
[  OK  ] DietPi-Software | systemctl stop jellyfin
[FAILED] DietPi-Software | Waiting for Jellyfin config file failed, skipping pre-configuration
[  OK  ] DietPi-Software | mv /var/lib/jellyfin /mnt/dietpi_userdata/jellyfin
[  OK  ] DietPi-Software | Setting in /etc/default/jellyfin adjusted: JELLYFIN_DATA_DIR=/mnt/dietpi_userdata/jellyfin
[  OK  ] DietPi-Software | eval echo -e '[Service]\nWorkingDirectory=/mnt/dietpi_userdata/jellyfin' > /etc/systemd/system/jellyfin.service.d/dietpi.conf
[  OK  ] DietPi-Software | mv /var/cache/jellyfin /mnt/dietpi_userdata/jellyfin/cache
[  OK  ] DietPi-Software | Setting in /etc/default/jellyfin adjusted: JELLYFIN_CACHE_DIR=/mnt/dietpi_userdata/jellyfin/cache
[  OK  ] DietPi-Software | chown -R jellyfin: /mnt/dietpi_userdata/jellyfin

The output from journalctl -u jellyfin is:

Jul 14 16:01:38 pi3 systemd[21968]: jellyfin.service: Failed to locate executable /opt/jellyfin/jellyfin.sh: No such file or directory
Jul 14 16:01:38 pi3 systemd[21968]: **jellyfin.service: Failed at step EXEC spawning /opt/jellyfin/jellyfin.sh: No such file or directory**
Jul 14 16:01:38 pi3 systemd[1]: **jellyfin.service: Main process exited, code=exited, status=203/EXEC**
Jul 14 16:01:38 pi3 systemd[1]: **jellyfin.service: Failed with result 'exit-code'.**
Jul 14 16:01:38 pi3 systemd[1]: jellyfin.service: Scheduled restart job, restart counter is at 5.
Jul 14 16:01:38 pi3 systemd[1]: Stopped Jellyfin.
Jul 14 16:01:38 pi3 systemd[1]: **jellyfin.service: Start request repeated too quickly.**
Jul 14 16:01:38 pi3 systemd[1]: **jellyfin.service: Failed with result 'exit-code'.**
Jul 14 16:01:38 pi3 systemd[1]: **Failed to start Jellyfin.**

​
Honestly, some of this output looks like from when I installed Jellyfin. I may have messed some stuff up on my own…

That is a strange file location for a DEB package, probably there is a non-original service in place. Can you show:

systemctl cat jellyfin
cat /lib/systemd/system/jellyfin.service
# /etc/systemd/system/jellyfin.service

[Unit]

Description=Jellyfin

After=network.target

[Service]

Type=simple

User=root

Restart=always

ExecStart=/opt/jellyfin/jellyfin.sh

[Install]

WantedBy=multi-user.target

# /etc/systemd/system/jellyfin.service.d/dietpi.conf

[Service]

WorkingDirectory=/mnt/dietpi_userdata/jellyfin

# /etc/systemd/system/jellyfin.service.d/jellyfin.service.conf

# Jellyfin systemd configuration options

# Use this file to override the user or environment file location.

[Service]

# Alter the user that Jellyfin runs as

#User = jellyfin

# Alter where environment variables are sourced from

#EnvironmentFile = /etc/default/jellyfin

# Service hardening options

# These were added in PR #6953 to solve issue #6952, but some combination of

# them causes "restart.sh" functionality to break with the following error:

# sudo: effective uid is not 0, is /usr/bin/sudo on a file system with the

# 'nosuid' option set or an NFS file system without root privileges?

# See issue #7503 for details on the troubleshooting that went into this.

# Since these were added for NixOS specifically and are above and beyond

# what 99% of systemd units do, they have been moved here as optional

# additional flags to set for maximum system security and can be enabled at

# the administrator's or package maintainer's discretion.

# Uncomment these only if you know what you're doing, and doing so may cause

# bugs with in-server Restart and potentially other functionality as well.

#NoNewPrivileges=true

#SystemCallArchitectures=native

#RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 AF_NETLINK

#RestrictNamespaces=false

#RestrictRealtime=true

#RestrictSUIDSGID=true

#ProtectControlGroups=false

#ProtectHostname=true

#ProtectKernelLogs=false

#ProtectKernelModules=false

#ProtectKernelTunables=false

#LockPersonality=true

#PrivateTmp=false

#PrivateDevices=false

#PrivateUsers=true

#RemoveIPC=true

#SystemCallFilter=~@clock

#SystemCallFilter=~@aio

#SystemCallFilter=~@chown

#SystemCallFilter=~@cpu-emulation

#SystemCallFilter=~@debug

#SystemCallFilter=~@keyring

#SystemCallFilter=~@memlock

#SystemCallFilter=~@module

#SystemCallFilter=~@mount

#SystemCallFilter=~@obsolete

#SystemCallFilter=~@privileged

#SystemCallFilter=~@raw-io

#SystemCallFilter=~@reboot

#SystemCallFilter=~@setuid

#SystemCallFilter=~@swap

#SystemCallErrorNumber=EPERM

[Unit]

Description = Jellyfin Media Server

After = network-online.target

[Service]

Type = simple

EnvironmentFile = /etc/default/jellyfin

User = jellyfin

Group = jellyfin

WorkingDirectory = /var/lib/jellyfin

ExecStart = /usr/bin/jellyfin ${JELLYFIN_WEB_OPT} ${JELLYFIN_RESTART_OPT} ${JELLYFIN_FFMPEG_OPT} ${JELLYFIN_SERVICE_OPT} ${JELLYFIN_NOWEBAPP_OPT} ${JELLYFIN_ADDITIONAL_OPTS}

Restart = on-failure

TimeoutSec = 15

SuccessExitStatus=0 143

[Install]

WantedBy = multi-user.target

A quick note: I tried installing jellyfin on my other Raspberry Pi (also running dietpi) and everything worked perfectly. I have somehow managed to mess something up on the first one, I’m just not sure what I did.

I guess this is a conflicting service. It should be /lib/systemd/system/jellyfin.service

I deleted “/etc/systemd/system/jellyfin.service” and “/lib/systemd/system/jellyfin.service” and that solved the problem. Thanks guys. Sorry for posting my question here. If I had realized I messed it up myself, I wouldn’t have posted here.

Thanks again.