Jellyfin Forum
Podman container fails to start at boot - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Off Topic (https://forum.jellyfin.org/f-off-topic)
+--- Forum: General Discussion (https://forum.jellyfin.org/f-general-discussion)
+--- Thread: Podman container fails to start at boot (/t-podman-container-fails-to-start-at-boot)



Podman container fails to start at boot - trekkie690 - 2023-12-22

Running Jellyfin on a Fedora38 using podman version 4.7.2 system. I am running into an issue where it wont startup the container at boot. It fails with exit code 125, and the logs usually say that it

Code:
Error: statfs /pathto/mediavolume: no such file or directory

I configured it to start up at boot using a local user 'jellyfin' so not root. which i gave the linger privileges and confirmed. The system does try to boot which logs show. Once the system is fully booted i can run service start command below with no issue.

Code:
$ systemctl --user start jellyfin.service

Created the jelly.service file using the podman command to create systemd service, then added the parts to ensure all the thing i want our good. 99% certain its that the volumes cannot mount so it errors out. Tried changing the "After=" in the jellyfin.service key file to be post RAID mounting but still having the issue. 

Any ideas or tips for Troubleshooting?


RE: Podman container fails to start at boot - tmsrxzar - 2023-12-22

check your work against the documentation because it looks very different than what you are describing https://jellyfin.org/docs/general/installation/container#managing-via-systemd


RE: Podman container fails to start at boot - trekkie690 - 2023-12-28

So i did follow the instructions when i started this (event re-did it). Created and placed the quadlet file and placed it in the user .config/.... path. Did the systemctl daemon-reload. Nothing was found. Checked permission and even disabled selinux...nada. did a systemctl --user list-unit-files, to ensure it loaded and NADA. So i tried the traditional service route, cause maybe something will worked, and bam it was viewed and ready to load. The only issue is that it fails from a cold start every time. Not sure why. Reboot, will auto start normally with no issues....


RE: Podman container fails to start at boot - TheDreadPirate - 2023-12-28

Is there anything in the logs when the cold start fails? Perhaps some of the hard drives your libraries are in aren't mounting in time?


RE: Podman container fails to start at boot - trekkie690 - 2023-12-28

Here is a snippet from the Log on the system.

Quote:systemd[1259]: Failed to start jellyfin.service - Jellyfin Media Server Podman container systemd service.
systemd[1259]: jellyfin.service: Failed with result 'exit-code'.
systemd[1259]: jellyfin.service: Start request repeated too quickly.
systemd[1259]: Stopped jellyfin.service - Jellyfin Media Server Podman container systemd service.
systemd[1259]: jellyfin.service: Scheduled restart job, restart counter is at 5.
NetworkManager[1198]: <info>  [1703780509.3616] agent-manager: agent[6e1a0f74fbb42db0,:1.36/org.gnome.Shell.NetworkAgent/42]: agent registered
systemd[1259]: Failed to start jellyfin.service - Jellyfin Media Server Podman container systemd service.
systemd[1259]: jellyfin.service: Failed with result 'exit-code'.
systemd[1259]: jellyfin.service: Main process exited, code=exited, status=125/n/a
podman[1888]: 2023-12-28 11:21:49.237205249 -0500 EST m=+0.030293386 image pull 73ede7955dcb726a7fef2d5a9c079e64d794879cd7db671262afd06edab36391 localhost/jellyfin:10.8.13
podman[1888]: Error: statfs /mnt/RAID/TVShow: no such file or directory

It shows similar issue for each of the 5 times it tries to start, noting the MOVIE, TVSHOW, MUSIC, and VIDEO folders mounts for each failure (but not all) for the media folders i scan.

My SMB server which is also running mounts the directory at boot. But its also one of the last things to execute so i think its a boot order thing and i need to have the service start AFTER the mnt-RAID.mount executes which falls under user@42.service. That executes after 1001 (jellyfin user) least when i do 'systemd-analyze plot > startup_plot.svg'. Not certain how to do that...tried 'after= mnt-RAID.mount ' or 'after=user@42.service' but no success (unless i did the command wrong).


RE: Podman container fails to start at boot - trekkie690 - 2024-01-14

so finally got it working. Basically my software RAID wasn't initializing fast enough for systemd so it moved on before it would be ready for other services to then use that raid. Had to add a ExecStartPre=/path/To/Script to the service. This script was simple DIR exists check. If it did then it would let the service start.

Alternate way i found (but didnt implment because couldnt find the right file) was to increase the time for the .mount of the raid in the unit file. Just couldnt find that file....cause lazy.