Error when starting service in Devuan #526

Closed
opened 2025-12-21 16:51:48 +01:00 by backuprepo · 5 comments
Owner

Originally created by @97carmine on GitHub (Mar 18, 2019).

Describe the bug

I installed Jellyfin in Devuan following the Debian repository, but I found an error when starting the service
error

root@F-35:/home/superusuario# service jellyfin status cat: /var/run/jellyfin.pid: No existe el fichero o el directorio Jellyfin is not running
root@F-35:/home/superusuario# service jellyfin start cat: /var/run/jellyfin.pid: No existe el fichero o el directorio /etc/init.d/jellyfin: 18: [: unexpected operator Jellyfin already running

System (please complete the following information):

  • OS: Devuan ascii
  • Jellyfin Version: 10.2.2
Originally created by @97carmine on GitHub (Mar 18, 2019). **Describe the bug** <!-- A clear and concise description of what the bug is. --> I installed Jellyfin in Devuan following the Debian repository, but I found an error when starting the service error `root@F-35:/home/superusuario# service jellyfin status cat: /var/run/jellyfin.pid: No existe el fichero o el directorio Jellyfin is not running` `root@F-35:/home/superusuario# service jellyfin start cat: /var/run/jellyfin.pid: No existe el fichero o el directorio /etc/init.d/jellyfin: 18: [: unexpected operator Jellyfin already running` **System (please complete the following information):** - OS: Devuan ascii - Jellyfin Version: 10.2.2
backuprepo 2025-12-21 16:51:48 +01:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@joshuaboniface commented on GitHub (Mar 19, 2019):

The traditional initscript is not particularly well-maintained - we're de facto only supporting systemd unit files right now since that's what all the major deb-based distros use. That said, the initscript is there (under deployment/debian-package-x64/pkg-src) and we'd welcome a PR fixing it up.

@joshuaboniface commented on GitHub (Mar 19, 2019): The traditional initscript is not particularly well-maintained - we're *de facto* only supporting `systemd` unit files right now since that's what all the major `deb`-based distros use. That said, the initscript is there (under `deployment/debian-package-x64/pkg-src`) and we'd welcome a PR fixing it up.
Author
Owner

@texneus commented on GitHub (Apr 7, 2019):

Just wanted to chime in with a couple of options...not fixes but work arounds. I've been trying MX Linux 18.1 lately which uses systemvinit and systemd-shim. I'm not an init guru by any means but the systemd-shim is supposed to "translate" systemd requests to systemv. IME, it frequently fails for software that is not in the MX Linus repos, Jellyfin included.

While Jellyfin-ffmpeg installs fine, I get similar errors installing Jellyfin:

# dpkg --install jellyfin_10.2.2-1_debian-amd64.deb
Selecting previously unselected package jellyfin.
(Reading database ... 266958 files and directories currently installed.)
Preparing to unpack jellyfin_10.2.2-1_debian-amd64.deb ...
Unpacking jellyfin (10.2.2-1) ...
Setting up jellyfin (10.2.2-1) ...
cat: /var/run/jellyfin.pid: No such file or directory
/etc/init.d/jellyfin: 18: [: unexpected operator
Jellyfin already running
Processing triggers for libc-bin (2.24-11+deb9u4) ...
Processing triggers for systemd (232-25+deb9u9) ...
#

Note that despite the error Jellyfin IS NOT running either before or after the install.

Two possibilities which may or may not work for other non-systemd distros:

  1. Run the generic Linux version of Jellyfin (see #1208 )

  2. If you can install Docker, then run Jellyfin as a docker container. Note I have not actually done this on MX, but I have confirmed Docker for Debian Stretch will install and appears to function on MX Linux with the exception that the docker repository (step 4) deb https://download.docker.com/linux/debian stretch stable, must be added manually to /etc/apt/sources.list.d/various.list.

Hope this is helpful...

@texneus commented on GitHub (Apr 7, 2019): Just wanted to chime in with a couple of options...not fixes but work arounds. I've been trying MX Linux 18.1 lately which uses systemvinit and systemd-shim. I'm not an init guru by any means but the systemd-shim is supposed to "translate" systemd requests to systemv. IME, it frequently fails for software that is not in the MX Linus repos, Jellyfin included. While Jellyfin-ffmpeg installs fine, I get similar errors installing Jellyfin: ``` # dpkg --install jellyfin_10.2.2-1_debian-amd64.deb Selecting previously unselected package jellyfin. (Reading database ... 266958 files and directories currently installed.) Preparing to unpack jellyfin_10.2.2-1_debian-amd64.deb ... Unpacking jellyfin (10.2.2-1) ... Setting up jellyfin (10.2.2-1) ... cat: /var/run/jellyfin.pid: No such file or directory /etc/init.d/jellyfin: 18: [: unexpected operator Jellyfin already running Processing triggers for libc-bin (2.24-11+deb9u4) ... Processing triggers for systemd (232-25+deb9u9) ... # ``` Note that despite the error Jellyfin IS NOT running either before or after the install. Two possibilities which may or may not work for other non-systemd distros: 1) Run the generic Linux version of Jellyfin (see #1208 ) 2) If you can install Docker, then [run Jellyfin as a docker container](https://hub.docker.com/r/jellyfin/jellyfin). Note I have not actually done this on MX, but I have confirmed [Docker for Debian Stretch](https://docs.docker.com/install/linux/docker-ce/debian/) will install and appears to function on MX Linux with the exception that the docker repository (step 4) `deb https://download.docker.com/linux/debian stretch stable`, must be added manually to `/etc/apt/sources.list.d/various.list`. Hope this is helpful...
Author
Owner

@zeigerpuppy commented on GitHub (Nov 6, 2021):

I managed to start on Devaun Beowulf using the standard Buster packages install and then running manually:

if test -f /etc/default/jellyfin; then
    . /etc/default/jellyfin
fi

. /lib/lsb/init-functions
PIDFILE="/run/jellyfin.pid
sudo -u jellyfin /usr/bin/jellyfin -- $JELLYFIN_ARGS

Not sure why /etc/init.d/jellyfish fails yet but shouldn't be too hard to resolve. I have a hunch it may be an improperly set media DB path.

anyway, to start via /etc/rc.local try adding this:

$your_db_dir should be the parent of the jellyfin DB dir

cd $your_db_dir & 
if test -f /etc/default/jellyfin; then
    . /etc/default/jellyfin
fi
. /lib/lsb/init-functions
PIDFILE="/run/jellyfin.pid
sudo -u jellyfin /usr/bin/jellyfin -- $JELLYFIN_ARGS &

would be good to re-open this issue as I think it'll turn out to be a minor change to the init file.

@zeigerpuppy commented on GitHub (Nov 6, 2021): I managed to start on `Devaun Beowulf` using the standard `Buster` packages install and then running manually: ```bash if test -f /etc/default/jellyfin; then . /etc/default/jellyfin fi . /lib/lsb/init-functions PIDFILE="/run/jellyfin.pid sudo -u jellyfin /usr/bin/jellyfin -- $JELLYFIN_ARGS ``` Not sure why `/etc/init.d/jellyfish` fails yet but shouldn't be too hard to resolve. I have a hunch it may be an improperly set media DB path. anyway, to start via `/etc/rc.local` try adding this: `$your_db_dir` should be the parent of the `jellyfin` DB dir ```bash cd $your_db_dir & if test -f /etc/default/jellyfin; then . /etc/default/jellyfin fi . /lib/lsb/init-functions PIDFILE="/run/jellyfin.pid sudo -u jellyfin /usr/bin/jellyfin -- $JELLYFIN_ARGS & ``` would be good to re-open this issue as I think it'll turn out to be a minor change to the init file.
Author
Owner

@hugueslarrive commented on GitHub (Dec 13, 2021):

I installed version 10.7.7 (bullseye) on Devuan chimaera and encountered the same problem: start-stop-daemon does not pass the environment variables *_DIR to jellyfin which fails to launch.

Since these paths can be passed as arguments, I think the best way to solve it is to add them to JELLYFIN_ARGS in /etc/default/jellyfin:
JELLYFIN_ARGS="$JELLYFIN_WEB_OPT $JELLYFIN_RESTART_OPT $JELLYFIN_FFMPEG_OPT $JELLYFIN_SERVICE_OPT $JELLYFIN_NOWEBAPP_OPT -d $JELLYFIN_DATA_DIR -c $JELLYFIN_CONFIG_DIR -l $JELLYFIN_LOG_DIR -C $JELLYFIN_CACHE_DIR"

@hugueslarrive commented on GitHub (Dec 13, 2021): I installed version 10.7.7 (bullseye) on Devuan chimaera and encountered the same problem: start-stop-daemon does not pass the environment variables *_DIR to jellyfin which fails to launch. Since these paths can be passed as arguments, I think the best way to solve it is to add them to JELLYFIN_ARGS in /etc/default/jellyfin: `JELLYFIN_ARGS="$JELLYFIN_WEB_OPT $JELLYFIN_RESTART_OPT $JELLYFIN_FFMPEG_OPT $JELLYFIN_SERVICE_OPT $JELLYFIN_NOWEBAPP_OPT -d $JELLYFIN_DATA_DIR -c $JELLYFIN_CONFIG_DIR -l $JELLYFIN_LOG_DIR -C $JELLYFIN_CACHE_DIR"`
Author
Owner

@hankster112 commented on GitHub (Jul 22, 2023):

This is still an issue with Devuan 4 Chimaera. Modifying /etc/init.d/jellyfin like @hugueslarrive suggested isn't working. Adding those commands in a script (and removing the typos), and setting it to run in Jellyfin's crontab at startup also isn't working.

The crontab script in question:

cd /var/lib/jellyfin & 
if test -f /etc/default/jellyfin; then
    . /etc/default/jellyfin
fi
. /lib/lsb/init-functions
PIDFILE="/run/jellyfin.pid sudo -u jellyfin /usr/bin/jellyfin -- $JELLYFIN_ARGS"
/usr/bin/jellyfin $JELLYFIN_ARGS

This starts Jellyfin but places its data directory in the main user's home folder instead of /var/lib/jellyfin. I believe Jellyfin is not being passed its env variables at startup which is causing these issues. There shouldn't be hacks like this just to run Jellyfin on a system without systemd. I see #6991 was proposed but never merged, which may have fixed the issue.

@hankster112 commented on GitHub (Jul 22, 2023): This is still an issue with Devuan 4 Chimaera. Modifying `/etc/init.d/jellyfin` like @hugueslarrive suggested isn't working. Adding those commands in a script (and removing the typos), and setting it to run in Jellyfin's crontab at startup also isn't working. The crontab script in question: ``` cd /var/lib/jellyfin & if test -f /etc/default/jellyfin; then . /etc/default/jellyfin fi . /lib/lsb/init-functions PIDFILE="/run/jellyfin.pid sudo -u jellyfin /usr/bin/jellyfin -- $JELLYFIN_ARGS" /usr/bin/jellyfin $JELLYFIN_ARGS ``` This starts Jellyfin but places its data directory in the main user's home folder instead of /var/lib/jellyfin. I believe Jellyfin is not being passed its env variables at startup which is causing these issues. There shouldn't be hacks like this just to run Jellyfin on a system without systemd. I see #6991 was proposed but never merged, which may have fixed the issue.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: starred/jellyfin#526
No description provided.