Jellyfin service broken

Hey,
so installed jellyfin using yay, started it using systemctl and everything was working as it should out of the box, except for the fact that I couldn’t add my users folders as media library.

In an attempt to resolve that, I went into jellyfin.service and changed User to my username. Now jellyfin doesn’t work at all.
I tried:
changing User back to what it was.
Updating my system
stopping, restarting, disabling, reenabling the service
rebooting my system
deleting every file called jellyfin and reinstalling it

I believe the problem might be in my service file:

[Unit]
Description=Jellyfin Media Server
After=network.target

[Service]
User=jellyfin
ExecStart=/usr/lib/jellyfin/jellyfin
Restart=always

[Install]
WantedBy=default.target

I am not to sure about the ExecStart since, although jellfin is successfully installed according to yay, sudo find / -name jellyfin yields

find: ‘/run/user/969/gvfs’: Permission denied
/home/jonas/.cache/yay/jellyfin

systemctl status yields

× jellyfin.service - Jellyfin Media Server
Loaded: loaded (/usr/lib/systemd/system/jellyfin.service; enabled; preset: disabled)
Active: failed (Result: exit-code) since Sat 2023-08-26 13:49:02 CEST; 44min ago
Duration: 2ms
Process: 26927 ExecStart=/usr/lib/jellyfin/jellyfin (code=exited, status=203/EXEC)
Main PID: 26927 (code=exited, status=203/EXEC)
CPU: 1ms

Aug 26 13:49:02 homeserver systemd[1]: jellyfin.service: Scheduled >restart job, restart job, restart counter is at 5.
Aug 26 13:49:02 homeserver systemd[1]: Stopped Jellyfin Media >Server.
Aug 26 13:49:02 homeserver systemd[1]: jellyfin.service: Start request repeated too quickly.
Aug 26 13:49:02 homeserver systemd[1]: jellyfin.service: Failed with result ‘exit-code’.
Aug 26 13:49:02 homeserver systemd[1]: Failed to start Jellyfin Media Server.

Help would be greatly appreciated

Hi @jonasb,

Have you tried deleting that cache directory?

rm -rf ~/.cache/yay/jellyfin

Edit:

Please provide the output of:

journalctl --unit=jellyfin.service --no-pager

Yes I did remove the .cache file.

Aug 26 15:07:38 homeserver systemd[1]: jellyfin.service: Failed with result ‘exit-code’.
Aug 26 15:07:38 homeserver systemd[1]: jellyfin.service: Scheduled restart job, restart counter is at 4.
Aug 26 15:07:38 homeserver systemd[1]: Stopped Jellyfin Media Server.
Aug 26 15:07:38 homeserver systemd[1]: Started Jellyfin Media Server.
Aug 26 15:07:38 homeserver (jellyfin)[102279]: jellyfin.service: Failed to locate executable /usr/lib/jellyfin/jellyfin: No such file or directory
Aug 26 15:07:38 homeserver (jellyfin)[102279]: jellyfin.service: Failed at step EXEC spawning /usr/lib/jellyfin/jellyfin: No such file or directory
Aug 26 15:07:38 homeserver systemd[1]: jellyfin.service: Main process exited, code=exited, status=203/EXEC
Aug 26 15:07:38 homeserver systemd[1]: jellyfin.service: Failed with result ‘exit-code’.
Aug 26 15:07:38 homeserver systemd[1]: jellyfin.service: Scheduled restart job, restart counter is at 5.
Aug 26 15:07:38 homeserver systemd[1]: Stopped Jellyfin Media Server.
Aug 26 15:07:38 homeserver systemd[1]: jellyfin.service: Start request repeated too quickly.
Aug 26 15:07:38 homeserver systemd[1]: jellyfin.service: Failed with result ‘exit-code’.
Aug 26 15:07:38 homeserver systemd[1]: Failed to start Jellyfin Media Server.

OK, let’s try this, then:

pamac build jellyfin --overwrite='/usr/lib/jellyfin/*'

Below you see what I got from that.
I do not have a /usr/lib/jellyfin directory.
reinstalling jellyfin gives me some warnings about packages exceeding recommended size but no errors?

Build packages from AUR and install them with their dependencies

If no package name is given, use the PKGBUILD file in the current directory
The build directory will be the parent directory, --builddir option will be ignored
and --no-clone option will be enforced

pamac build [options] [package(s)]

options:
–builddir : build directory, if no directory is given the one specified in
pamac.conf file is used
–keep, -k : keep built packages in cache after installation
–no-keep : do not keep built packages in cache after installation
–dry-run, -d : only print what would be done but do not run the transaction
–no-clone : do not clone build files from AUR, only use local files
–no-confirm : bypass any and all confirmation messages

And that is the problem, what I’m trying to fix with the overwrite. Try:

pamac --overwrite='/usr/lib/jellyfin/*' build jellyfin

You need to use the new service file. It is completely different to the one you posted.

https://aur.archlinux.org/cgit/aur.git/tree/jellyfin.service?h=jellyfin

her I get:
Available actions:
pamac --version
pamac --help, -h [action]
pamac search [options] <package(s)>
pamac list [options] <package(s)>
pamac info [options] <package(s)>
pamac install [options] <package(s)>
pamac reinstall [options] <package(s)>
pamac remove [options] [package(s)]
pamac checkupdates [options]
pamac update,upgrade [options]
pamac clone [options] <package(s)>
pamac build [options] [package(s)]
pamac clean [options]

:bangbang: Tip: :bangbang:

When posting terminal output, copy the output and paste it here, wrapped in three (3) backticks, before AND after the pasted text. Like this:

```
pasted text
```

Or three (3) tilde signs, like this:

~~~
pasted text
~~~

This will just cause it to be rendered like this:

Sed
sollicitudin dolor
eget nisl elit id
condimentum
arcu erat varius
cursus sem quis eros.

Instead of like this:

Sed sollicitudin dolor eget nisl elit id condimentum arcu erat varius cursus sem quis eros.

Alternatively, paste the text you wish to format as terminal output, select all pasted text, and click the </> button on the taskbar. This will indent the whole pasted section with one TAB, causing it to render the same way as described above.

Thereby increasing legibility thus making it easier for those trying to provide assistance.

For more information, please see:


:bangbang::bangbang: Additionally

If your language isn’t English, please prepend any and all terminal commands with LC_ALL=C. For example:

LC_ALL=C bluetoothctl

This will just cause the terminal output to be in English, making it easier to understand and debug.

Edit:

OK third time lucky (I hope). Try:

pamac build jellyfin --overwrite='/usr/lib/jellyfin/*'

Thanks for the tip, this is what I got

Build packages from AUR and install them with their dependencies

If no package name is given, use the PKGBUILD file in the current directory
The build directory will be the parent directory, --builddir option will be ignored
and --no-clone option will be enforced

pamac build [options] [package(s)]

options:
  --builddir <dir> : build directory, if no directory is given the one specified in
                     pamac.conf file is used
  --keep, -k       : keep built packages in cache after installation
  --no-keep        : do not keep built packages in cache after installation
  --dry-run, -d    : only print what would be done but do not run the transaction
  --no-clone       : do not clone build files from AUR, only use local files
  --no-confirm     : bypass any and all confirmation messages

Urgh…OK, only other thing I can think of is skipping the --overwrite argument:

pamac build jellyfin

that installed something and sudo find / -name jellyfin returns now

/var/tmp/pamac-build-jonas/jellyfin
find: ‘/run/user/1000/gvfs’: Permission denied
find: ‘/run/user/969/gvfs’: Permission denied
/home/jonas/.cache/yay/jellyfin

Hmmm…it still doesn’t seem to be there. OK, last thing to try:

  • Completely remove Jellyfin:
pamac remoe jellyfin

Followed by, just for good measure, rebooting.

  • Reinstall Jellyfin:
pamac build jellyfin

If this doesn’t work, please provide the output of:

ls /usr/lib/jellyfin

and

pamac list --files jellyfin

the find command returns now

/var/lib/jellyfin
/var/cache/jellyfin
/var/tmp/pamac-build-jonas/jellyfin
find: ‘/run/user/1000/gvfs’: Permission denied
find: ‘/run/user/969/gvfs’: Permission denied
/home/jonas/.cache/yay/jellyfin

there is no /usr/lib/jellyfin and pamac list --files jellyfin comes back empty.

The installation gave warnings:

WARNING: Package contains reference to $srcdir
WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
Entrypoints:
  main (1.2 MiB)
      main.jellyfin.bundle.js
WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
This can impact web performance.
Assets: 
  main.jellyfin.bundle.js (1.2 MiB)
  194d1b9ef54d0014b3c4.ttf (311 KiB)
  themes/blueradiance/bg.jpg (933 KiB)
  libraries/subtitles-octopus-worker.js (354 KiB)
  libraries/subtitles-octopus-worker-legacy.js.mem (643 KiB)
  libraries/subtitles-octopus-worker.wasm (1.95 MiB)
  libraries/pdf.worker.js (984 KiB)
  libraries/subtitles-octopus-worker-legacy.js (3.02 MiB)
  libraries/wasm-gen/libarchive.wasm (875 KiB)
  4333.cfb1664db2e629f294eb.chunk.js (985 KiB)
  1891.8c2b31f7219aa2b4b8df.chunk.js (376 KiB)
  5487.a6e79037c4e3cc8353ff.chunk.js (334 KiB)
  8233.82228f339f6ae66a80d5.chunk.js (279 KiB)
WARNING in libraries/subtitles-octopus-worker-legacy.js is 3.17 MB, and won't be precached. Configure maximumFileSizeToCacheInBytes to change this limit.

and serveral iterations of

npm WARN old lockfile

I don’t know if that has something to do with my issue.

Hmmm…I have absolutely NO idea where to go now or what to do from here. Sorry.

:sob:

You should stop using Pamac. Pamac is not an reliable AUR Helper.

This AUR package is a split package. The server part is in a package called jellyfin-server and the client part is called jellyfin-web, the jellyfin package contains no file, it just depends on the server and client package. But all 3 packages are desribed in one PKGBUILD file.

Use the manual way or use a reliable AUR helper like yay or paru. After the install, edit the new service file to change the username.

Well, this :point_down:

Kind of rankles me. Because:

  1. I recommend Pamac. I’ve always used Pamac. I’ll always recommend Pamac. I’ll always recommend pamac instead of pacman, especially for newcomers, as pamac was developed by Manajaro (developers) for Manjaro and just takes care of more thing than pacman.
  2. Even if it is unreliable, which I’m not saying it is, there is only one (1) way forr it to become more reliable: by using it, and testing.

But I know I’m mostly alone in this point of view, so I’ll shut up now.

I did not say Pamac is an unreliable libalpm Client. I was just referring to the AUR part of Pamac.

But maybe the problem with split AUR packages was fixed, I don’t really know. It just looks like it is not. :man_shrugging:

My point remains the same.

But yes, maybe it was a package. Doesn’t matter now. I still don’t recon it’s unreliable.