Jellyfin Forum
linux service not working as intended, can only access jellyfin by manually executing - 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: linux service not working as intended, can only access jellyfin by manually executing (/t-linux-service-not-working-as-intended-can-only-access-jellyfin-by-manually-executing)



linux service not working as intended, can only access jellyfin by manually executing - Jimmy Bungalo - 2023-11-07

i installed jellyfin on my raspberry pi (running ubuntu 23.10) and created a service to run jellyfin without manual intervention, e.g. having to open up a terminal (through ssh) and execute jellyfin as well as keep the terminal open throughout my entire usage, and while this seemed to work in the past, something has changed, and i have been unable to connect to jellyfin through the same means with the service as with manual execution. if i couldn't connect to jellyfin at all, that would also be an issue, but my confusion lies in that only with the service does jellyfin refuse to connect. i created the service using sudo systemctl enable jellyfin, which seemed to have worked since running sudo systemctl status jellyfin denotes that it is active (running). what might be the problem here? a while ago i screwed around with the ports but if that was the problem i a) wouldn't know where to begin fixing that and b) don't know why it still works manually if that is the case. any thoughts?


RE: linux service not working as intended, can only access jellyfin by manually executing - TheDreadPirate - 2023-11-07

How did you install Jellyfin? The Ubuntu automated install script should have created the jellyfin service for you.


RE: linux service not working as intended, can only access jellyfin by manually executing - Jimmy Bungalo - 2023-11-10

i did install it with the script originally, however it didn't want to work without running jellyfin manually using a command. this is always how i've been using jellyfin since transitioning from raspberry pi os to ubuntu. i had no issues with the service on rpios, and i would think the much larger and more advanced ubuntu wouldn't as well. my confusion lies in that it functions perfectly well through commands but not with the service. i made sure to completely uninstall and purge jellyfin from my system before confirming that this was the case, and yes, after the reinstallation i still cannot connect to jellyfin.


RE: linux service not working as intended, can only access jellyfin by manually executing - TheDreadPirate - 2023-11-10

Did you open your firewall?

sudo ufw allow 8096


RE: linux service not working as intended, can only access jellyfin by manually executing - Jimmy Bungalo - 2023-11-11

i've opened the firewall, but now with the fresh installation, the service quickly dies as seen with running sudo systemctl status jellyfin, and subsequently running sudo systemctl start jellyfin results in more or less the same. the log is as follows:

○ jellyfin.service - Jellyfin Media Server
Loaded: loaded (/lib/systemd/system/jellyfin.service; disabled; preset: enabled)
Drop-In: /etc/systemd/system/jellyfin.service.d
└─jellyfin.service.conf
Active: inactive (dead)

Nov 10 19:42:56 raspberrypi jellyfin[416985]: at SQLitePCL.pretty.DatabaseConnection.Execute(IDatabaseConnection This, String sql)
Nov 10 19:42:56 raspberrypi jellyfin[416985]: at Emby.Server.Implementations.Data.BaseSqliteRepository.GetConnection(Boolean readOnly)
Nov 10 19:42:56 raspberrypi jellyfin[416985]: at Emby.Server.Implementations.Data.SqliteItemRepository.Initialize(SqliteUserDataRepository userDataRepo, IUserManager userManager)
Nov 10 19:42:56 raspberrypi jellyfin[416985]: at Emby.Server.Implementations.ApplicationHost.InitializeServices()
Nov 10 19:42:56 raspberrypi jellyfin[416985]: at Jellyfin.Server.Program.StartApp(StartupOptions options)
Nov 10 19:42:56 raspberrypi jellyfin[416985]: [19:42:56] [INF] Running query planner optimizations in the database... This might take a while
Nov 10 19:42:56 raspberrypi jellyfin[416985]: [19:42:56] [INF] Disposing CoreAppHost
Nov 10 19:42:56 raspberrypi jellyfin[416985]: [19:42:56] [INF] Received a SIGTERM signal, shutting down
Nov 10 19:42:56 raspberrypi systemd[1]: jellyfin.service: Deactivated successfully.
Nov 10 19:42:56 raspberrypi systemd[1]: jellyfin.service: Consumed 13.376s CPU time.

keep in mind this was after deleting the service i made, uninstalling jellyfin, then reinstalling fresh. maybe it was a setting modification? i did notice that the settings remained after reinstallation.


RE: linux service not working as intended, can only access jellyfin by manually executing - TheDreadPirate - 2023-11-11

apt purge jellyfin

To make sure everything is cleared out.

Then run the install script again..