Jellyfin Forum
SOLVED: Jellyfin attempting to access /jellyfin after server reboot - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: SOLVED: Jellyfin attempting to access /jellyfin after server reboot (/t-solved-jellyfin-attempting-to-access-jellyfin-after-server-reboot)

Pages: 1 2


Jellyfin attempting to access /jellyfin after server reboot - boxherd - 2024-10-21

Jellyfin server 10.9.11.0
Ubuntu server 24.04 LTS
Installed via apt
Managed via systemctl

Boot log:

-- Boot 1b257e98674b4b0fac4de7d64eef8894 --
Oct 21 15:27:43 ebert systemd[1]: Started jellyfin.service - Jellyfin Media Server.
Oct 21 15:27:43 ebert jellyfin[847]: Unhandled exception. System.UnauthorizedAccessException: Access to the path '/jellyfin' is denied.
Oct 21 15:27:43 ebert jellyfin[847]:  ---> System.IO.IOException: Permission denied
Oct 21 15:27:43 ebert jellyfin[847]:    --- End of inner exception stack trace ---
Oct 21 15:27:43 ebert jellyfin[847]:    at System.IO.FileSystem.CreateDirectory(String fullPath, UnixFileMode unixCreateMode)
Oct 21 15:27:43 ebert jellyfin[847]:    at System.IO.Directory.CreateDirectory(String path)
Oct 21 15:27:43 ebert jellyfin[847]:    at Jellyfin.Server.Helpers.StartupHelpers.CreateApplicationPaths(StartupOptions options)
Oct 21 15:27:43 ebert jellyfin[847]:    at Jellyfin.Server.Program.StartApp(StartupOptions options)
Oct 21 15:27:43 ebert jellyfin[847]:    at Jellyfin.Server.Program.<Main>(String[] args)
Oct 21 15:27:44 ebert systemd[1]: jellyfin.service: Main process exited, code=dumped, status=6/ABRT
Oct 21 15:27:44 ebert systemd[1]: jellyfin.service: Failed with result 'core-dump'.

I installed Jellyfin via apt last week while setting up my new Ubuntu host, and it streamed several movies and was working great. After a reboot yesterday, it began coredumping with the error above, trying to access a nonexistent /jellyfin path. I've reviewed all my config files and none have a reference to this path. I also ran ls -ld /etc/jellyfin /var/lib/jellyfin /var/cache/jellyfin /usr/share/jellyfin and permissions looked good. I'm not sure what step to take next; I do not know how to inspect the core dump or what to look for.

Thanks in advance for any help you can offer!


RE: Jellyfin attempting to access /jellyfin after server reboot - TheDreadPirate - 2024-10-21

Share the output of "systemctl show jellyfin" and "sudo journalctl -u jellyfin -n 200 --no-pager". Both commands will produce a lot of text so use pastebin to share the output.


RE: Jellyfin attempting to access /jellyfin after server reboot - boxherd - 2024-10-21

systemctl show jellyfin: https://pastebin.com/yK7aCuXQ

sudo journalctl -u jellyfin -n 200 --no-pager: https://pastebin.com/C7LsXUDg


RE: Jellyfin attempting to access /jellyfin after server reboot - TheDreadPirate - 2024-10-21

Did you do anything that may have affected the jellyfin service? There are a lot of things missing in "show jellyfin". No environment file is set, which would include all the data paths and working directories for Jellyfin, the execstart doesn't include any options.

Let's backup your install data and reset Jellyfin.

Code:
sudo mkdir /jellyBackup
cd /jellyBackup
sudo rsync -a -p --progress /var/lib/jellyfin libJellyfin/
sudo rsync -a -p --progress /etc/jellyfin etcJellyfin/
sudo rsync -a -p --progress /var/cache/jellyfin cacheJellyfin/
sudo apt purge jellyfin*
curl https://repo.jellyfin.org/install-debuntu.sh | sudo bash
sudo systemctl stop jellyfin
sudo rsync -a -p --progress libJellyfin/jellyfin /var/lib/ --delete
sudo rsync -a -p --progress etcJellyfin/jellyfin /etc/ --delete
sudo rsync -a -p --progress cacheJellyfin/jellyfin /var/cache/ --delete
sudo chown -R jellyfin: /etc/jellyfin /var/lib/jellyfin /var/cache/jellyfin
sudo systemctl start jellyfin



RE: Jellyfin attempting to access /jellyfin after server reboot - boxherd - 2024-10-23

Thanks. I ran the above, reinstalling jellyfin, and I'm still seeing the same error trying to create a /jellyfin directory at service start. I feel bad just saying "what next?" but I'm genuinely stumped.

edit: As far as changes, the change I made that necessitated the reboot was switching network devices from wifi to ethernet. I hadn't touched jellyfin config myself, and when I looked at the relevant files, I didn't notice any with changes that looked like they'd been made near the time I rebooted.

I don't have a ton of time put into this particular install. Should I just start over from scratch? Re-do what you did above, but without trying to preserve the existing config, and just see if I can get it running from scratch again?


RE: Jellyfin attempting to access /jellyfin after server reboot - TheDreadPirate - 2024-10-23

What are the contents of /etc/systemd/system/jellyfin.service.d/jellyfin.service.conf?

And you're starting the service with "sudo systemctl start jellyfin" correct?


RE: Jellyfin attempting to access /jellyfin after server reboot - boxherd - 2024-10-23

Correct, I'm running it via systemctl.

File contents, though it appears that every line is commented out:

Code:
# Jellyfin systemd configuration options

# Use this file to override default systemd unit values

[Service]
# Alter the user/group that Jellyfin runs as
#User = jellyfin
#Group = jellyfin

# Alter where environment variables are sourced from
#EnvironmentFile = /etc/default/jellyfin

# Alter the working directory (useful if changing the data path)
#WorkingDirectory = /var/lib/jellyfin

# Service hardening options
# These optional options provide additional service hardening for Jellyfin
# These are an ADVANCED FEATURE - if you enable these and encounter issues,
# please disable them first and triage which if any are causing the trouble
# before reporting any issues.
#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



RE: Jellyfin attempting to access /jellyfin after server reboot - TheDreadPirate - 2024-10-23

Ugh. I keep doing this. That is the wrong path.

This one. Sorry.

/usr/lib/systemd/system/jellyfin.service

And /etc/default/jellyfin.


RE: Jellyfin attempting to access /jellyfin after server reboot - boxherd - 2024-10-24

No problem. I appreciate your help!

Code:
[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_FFMPEG_OPT $JELLYFIN_SERVICE_OPT $JELLYFIN_NOWEBAPP_OPT $JELLYFIN_ADDITIONAL_OPTS
Restart = on-failure
TimeoutSec = 15
SuccessExitStatus=0 143

[Install]
WantedBy = multi-user.target



RE: Jellyfin attempting to access /jellyfin after server reboot - TheDreadPirate - 2024-10-24

And what about the contents of /etc/default/jellyfin?