Jellyfin Forum
Failed to start jellyfin.service - Jellyfin Media Server. - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: General Questions (https://forum.jellyfin.org/f-general-questions)
+--- Thread: Failed to start jellyfin.service - Jellyfin Media Server. (/t-failed-to-start-jellyfin-service-jellyfin-media-server)

Pages: 1 2 3


RE: Failed to start jellyfin.service - Jellyfin Media Server. - rahulsharma49 - 2024-06-03

(2024-06-03, 04:47 PM)TheDreadPirate Wrote: I have no idea why that keeps happening.  At this point I want to purge Jellyfin on your system and start from scratch.  There are a couple steps to ensure we start clean.

Are you ok with that?

If this is the only option then what I can say, let’s do it

What steps I need to follow?


RE: Failed to start jellyfin.service - Jellyfin Media Server. - TheDreadPirate - 2024-06-03

Just in case, we are going to backup the corpse of your previous install.

Code:
sudo mv /var/lib/jellyfin /var/lib/orig_jellyfin
sudo mv /etc/jellyfin /etc/orig_jellyfin

Now we are going to purge jellyfin. We've already relocated the jellyfin data by moving instead of copying the data so we don't have to delete the original path.

Code:
sudo apt purge jellyfin*

Now reinstall jellyfin with the automated script.

Code:
curl https://repo.jellyfin.org/install-debuntu.sh | sudo bash



RE: Failed to start jellyfin.service - Jellyfin Media Server. - rahulsharma49 - 2024-06-03

(2024-06-03, 05:55 PM)TheDreadPirate Wrote: Just in case, we are going to backup the corpse of your previous install.

Code:
sudo mv /var/lib/jellyfin /var/lib/orig_jellyfin
sudo mv /etc/jellyfin /etc/orig_jellyfin

Now we are going to purge jellyfin.  We've already relocated the jellyfin data by moving instead of copying the data so we don't have to delete the original path.

Code:
sudo apt purge jellyfin*

Now reinstall jellyfin with the automated script.

Code:
curl https://repo.jellyfin.org/install-debuntu.sh | sudo bash

No progress, see these logs -

Code:
$ sudo journalctl -u jellyfin
Jun 04 01:11:01 homeserver systemd[1]: Started jellyfin.service - Jellyfin Media Server.
Jun 04 01:11:01 homeserver (jellyfin)[10895]: jellyfin.service: Changing to the requested working directory failed: No such file or directory
Jun 04 01:11:01 homeserver systemd[1]: jellyfin.service: Main process exited, code=exited, status=200/CHDIR
Jun 04 01:11:01 homeserver systemd[1]: jellyfin.service: Failed with result 'exit-code'.
Jun 04 01:11:01 homeserver systemd[1]: jellyfin.service: Scheduled restart job, restart counter is at 1.
Jun 04 01:11:01 homeserver systemd[1]: Started jellyfin.service - Jellyfin Media Server.
Jun 04 01:11:01 homeserver (jellyfin)[10897]: jellyfin.service: Changing to the requested working directory failed: No such file or directory
Jun 04 01:11:01 homeserver systemd[1]: jellyfin.service: Main process exited, code=exited, status=200/CHDIR
Jun 04 01:11:01 homeserver systemd[1]: jellyfin.service: Failed with result 'exit-code'.
Jun 04 01:11:02 homeserver systemd[1]: jellyfin.service: Scheduled restart job, restart counter is at 2.
Jun 04 01:11:02 homeserver systemd[1]: Started jellyfin.service - Jellyfin Media Server.
Jun 04 01:11:02 homeserver (jellyfin)[10899]: jellyfin.service: Changing to the requested working directory failed: No such file or directory
Jun 04 01:11:02 homeserver systemd[1]: jellyfin.service: Main process exited, code=exited, status=200/CHDIR
Jun 04 01:11:02 homeserver systemd[1]: jellyfin.service: Failed with result 'exit-code'.
Jun 04 01:11:02 homeserver systemd[1]: jellyfin.service: Scheduled restart job, restart counter is at 3.
Jun 04 01:11:02 homeserver systemd[1]: Started jellyfin.service - Jellyfin Media Server.
Jun 04 01:11:02 homeserver (jellyfin)[10901]: jellyfin.service: Changing to the requested working directory failed: No such file or directory
Jun 04 01:11:02 homeserver systemd[1]: jellyfin.service: Main process exited, code=exited, status=200/CHDIR
Jun 04 01:11:02 homeserver systemd[1]: jellyfin.service: Failed with result 'exit-code'.
Jun 04 01:11:02 homeserver systemd[1]: jellyfin.service: Scheduled restart job, restart counter is at 4.
Jun 04 01:11:02 homeserver systemd[1]: Started jellyfin.service - Jellyfin Media Server.
Jun 04 01:11:02 homeserver (jellyfin)[10903]: jellyfin.service: Changing to the requested working directory failed: No such file or directory
Jun 04 01:11:02 homeserver systemd[1]: jellyfin.service: Main process exited, code=exited, status=200/CHDIR
Jun 04 01:11:02 homeserver systemd[1]: jellyfin.service: Failed with result 'exit-code'.
Jun 04 01:11:02 homeserver systemd[1]: jellyfin.service: Scheduled restart job, restart counter is at 5.
Jun 04 01:11:02 homeserver systemd[1]: jellyfin.service: Start request repeated too quickly.
Jun 04 01:11:02 homeserver systemd[1]: jellyfin.service: Failed with result 'exit-code'.
Jun 04 01:11:02 homeserver systemd[1]: Failed to start jellyfin.service - Jellyfin Media Server.



RE: Failed to start jellyfin.service - Jellyfin Media Server. - TheDreadPirate - 2024-06-03

Is the output of journalctl the same? I don't understand how the same issue is happening with a fresh install.


RE: Failed to start jellyfin.service - Jellyfin Media Server. - pcm - 2024-06-04

You need to tail the journalctl ...

run

Code:
sudo journalctl -u jellyfin -n 100 --no-pager

That will show the most recent 100 lines ...

If you remember the approx time when you re-installed jellyfin, then you can do

Code:
sudo journalctl -u jellyfin --since "YYYY-MM-DD HH:MM:SS" --no-pager

replace the YYYY-MM-DD part with the approx time you re-installed jellyfin......


EDIT: Just realized you probably provided the recent journalctl logs.
Quote:Jun 04 01:11:02 homeserver (jellyfin)[10901]: jellyfin.service: Changing to the requested working directory failed: No such file or directory

I wonder what dir it's trying to change to ... Do you mind tailing the last 100 lines of jellyfin logs ? They should be in
Quote:/var/log/jellyfin

Code:
cd /var/log/jellyfin && tail -100f $(ls -1tr | tail -1)
should do the trick ...


RE: Failed to start jellyfin.service - Jellyfin Media Server. - Avatar - 2024-07-28

(2024-06-02, 05:12 AM)TheDreadPirate Wrote: Go to /etc/jellyfin.  Are any of the XMLs empty?  migrations.xml?

Sorry if this would've been better in a new thread, but I think I just had this exact same issue, also caused by a weird thing that happened that filled up my entire disk (still trying to figure that out).

My migrations.xml is 0kb. Does that mean my database is torched and I have to start anew with the same instructions you posted in this thread? I do not have a backup. Confused-face

This is the error I get:

Code:
× jellyfin.service - Jellyfin Media Server
    Loaded: loaded (/lib/systemd/system/jellyfin.service; enabled; vendor preset: enabled)
    Drop-In: /etc/systemd/system/jellyfin.service.d
            └─jellyfin.service.conf
    Active: failed (Result: core-dump) since Sat 2024-07-27 18:17:44 PDT; 19min ago
    Process: 2666 ExecStart=/usr/bin/jellyfin $JELLYFIN_WEB_OPT $JELLYFIN_FFMPEG_OPT $JELLYFIN_SERVICE>
  Main PID: 2666 (code=dumped, signal=ABRT)
        CPU: 382ms

Jul 27 18:17:44 luffy systemd[1]: jellyfin.service: Scheduled restart job, restart counter is at 5.
Jul 27 18:17:44 luffy systemd[1]: Stopped Jellyfin Media Server.
Jul 27 18:17:44 luffy systemd[1]: jellyfin.service: Start request repeated too quickly.
Jul 27 18:17:44 luffy systemd[1]: jellyfin.service: Failed with result 'core-dump'.
Jul 27 18:17:44 luffy systemd[1]: Failed to start Jellyfin Media Server.



RE: Failed to start jellyfin.service - Jellyfin Media Server. - TheDreadPirate - 2024-07-28

go to /var/log/jellyfin and post your full jellyfin log to pastebin.


RE: Failed to start jellyfin.service - Jellyfin Media Server. - Avatar - 2024-07-28

(2024-07-28, 04:16 AM)TheDreadPirate Wrote: go to /var/log/jellyfin and post your full jellyfin log to pastebin.

Pastebin wouldn't allow the whole log because it apparently found something "sensitive" or "offensive" which is confusing, but here is the log going back a bit before system drive got completely used up by an excessive syslog/kern.log file and I had to reboot and run Ubuntu in recovery mode "clean" to get it to boot. Upon reboot jellyfin no longer works. Slightly-frowning-face

https://pastebin.com/HbHTBWbG


RE: Failed to start jellyfin.service - Jellyfin Media Server. - TheDreadPirate - 2024-07-28

It looks like it was extracting subtitles before your disk fill up. But it must have been close to full since subtitles aren't that large.

In /etc/jellyfin delete both the system.xml and migrations.xml and try starting the service.


RE: Failed to start jellyfin.service - Jellyfin Media Server. - Avatar - 2024-07-28

(2024-07-28, 03:06 PM)TheDreadPirate Wrote: It looks like it was extracting subtitles before your disk fill up.  But it must have been close to full since subtitles aren't that large.

In /etc/jellyfin delete both the system.xml and migrations.xml and try starting the service.

Yes that fixed it for me! Thanks so much! (: