Jellyfin doesn't work - supertanno - 2023-07-20
I've been trying to get Jellyfin to work on Ubuntu 22.04 LTS. Initially, it worked fine, but after installing nginx it seems to have stopped working properly. While it does start up, the website refuses to load, with the connection getting timed out. Turning off Nginx doesn't fix the issue, so I'm not sure if it's actually related.
The logs are as follows:
Code: [20:56:17] [INF] [1] Main: Jellyfin version: 10.8.10
[20:56:17] [INF] [1] Main: Environment Variables: ["[JELLYFIN_LOG_DIR, /home/supertanno/jellyfin/log]"]
[20:56:17] [INF] [1] Main: Arguments: ["/usr/lib/jellyfin/bin/jellyfin.dll", "restart"]
[20:56:17] [INF] [1] Main: Operating system: Linux
[20:56:17] [INF] [1] Main: Architecture: X64
[20:56:17] [INF] [1] Main: 64-Bit Process: True
[20:56:17] [INF] [1] Main: User Interactive: True
[20:56:17] [INF] [1] Main: Processor count: 4
[20:56:17] [INF] [1] Main: Program data path: /home/supertanno/jellyfin
[20:56:17] [INF] [1] Main: Web resources path: /usr/lib/jellyfin/bin/jellyfin-web
[20:56:17] [INF] [1] Main: Application directory: /usr/lib/jellyfin/bin/
[20:56:17] [INF] [1] Emby.Server.Implementations.AppBase.BaseConfigurationManager: Setting cache path: /home/supertanno/.cache/jellyfin
[20:56:17] [INF] [1] Emby.Server.Implementations.ApplicationHost: Loading assemblies
[20:56:17] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Defined LAN addresses : [10.0.0.0/8,172.16.0.0/12,192.168.0.0/16]
[20:56:17] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Defined LAN exclusions : []
[20:56:17] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Using LAN addresses: [10.0.0.0/8,172.16.0.0/12,192.168.0.0/16]
[20:56:17] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Using bind addresses: []
[20:56:17] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Using bind exclusions: []
[20:56:20] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: TMDb 10.8.10.0
[20:56:20] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: Studio Images 10.8.10.0
[20:56:20] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: OMDb 10.8.10.0
[20:56:20] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: MusicBrainz 10.8.10.0
[20:56:20] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: AudioDB 10.8.10.0
[20:56:20] [INF] [1] Main: Kestrel listening on Any IP4 Address
[20:56:20] [INF] [1] Emby.Server.Implementations.ApplicationHost: Running startup tasks
[20:56:20] [INF] [1] Emby.Server.Implementations.ScheduledTasks.TaskManager: Daily trigger for Extract Chapter Images set to fire at 2023-07-21 02:00:00.000 +00:00, which is 05:03:39.0016938 from now.
[20:56:21] [ERR] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Error validating encoder
System.ComponentModel.Win32Exception (2): An error occurred trying to start process 'ffmpeg' with working directory '/home/supertanno'. No such file or directory
at System.Diagnostics.Process.ForkAndExecProcess(ProcessStartInfo startInfo, String resolvedFilename, String[] argv, String[] envp, String cwd, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec)
at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start()
at MediaBrowser.MediaEncoding.Encoder.EncoderValidator.GetProcessOutput(String path, String arguments, Boolean readStdErr, String testKey)
at MediaBrowser.MediaEncoding.Encoder.EncoderValidator.ValidateVersion()
[20:56:21] [WRN] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: FFmpeg: Failed version check: ffmpeg
[20:56:21] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: FFmpeg:
[20:56:21] [INF] [1] Emby.Server.Implementations.ApplicationHost: ServerId: 7924572d27044f44a1cad2af34dc57d3
[20:56:21] [INF] [1] Emby.Server.Implementations.ApplicationHost: Executed all pre-startup entry points in 0:00:00.1301507
[20:56:21] [INF] [1] Emby.Server.Implementations.ApplicationHost: Core startup complete
[20:56:21] [INF] [1] Emby.Server.Implementations.ApplicationHost: Executed all post-startup entry points in 0:00:00.173094
[20:56:21] [INF] [1] Main: Startup complete 0:00:04.2414129
[20:56:24] [INF] [11] Emby.Server.Implementations.ScheduledTasks.TaskManager: StartupTrigger fired for task: Update Plugins
[20:56:24] [INF] [11] Emby.Server.Implementations.ScheduledTasks.TaskManager: Queuing task PluginUpdateTask
[20:56:24] [INF] [13] Emby.Server.Implementations.ScheduledTasks.TaskManager: Executing Update Plugins
[20:56:25] [INF] [13] Emby.Server.Implementations.ScheduledTasks.TaskManager: Update Plugins Completed after 0 minute(s) and 1 seconds
[20:56:25] [INF] [13] Emby.Server.Implementations.ScheduledTasks.TaskManager: ExecuteQueuedTasks
It stays stuck on the final thing. The ports seem to be fine, according to NetStat:
Code: Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN 722/systemd-resolve
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 44528/nginx: master
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1534/sshd: /usr/sbi
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 44528/nginx: master
tcp6 0 0 :::80 :::* LISTEN 44528/nginx: master
tcp6 0 0 :::22 :::* LISTEN 1534/sshd: /usr/sbi
tcp6 0 0 :::443 :::* LISTEN 44528/nginx: master
udp 0 0 127.0.0.53:53 0.0.0.0:* 722/systemd-resolve
udp 0 0 192.168.178.82:68 0.0.0.0:* 720/systemd-network
udp6 0 0 fe80::7aac:c0ff:fea:546 :::* 720/systemd-network
How can I fix this?
RE: Jellyfin doesn't work - TheDreadPirate - 2023-07-20
Code: .....
[20:56:17] [INF] [1] Main: Program data path: /home/supertanno/jellyfin
.....
System.ComponentModel.Win32Exception (2): An error occurred trying to start process 'ffmpeg' with working directory '/home/supertanno'. No such file or directory
Does jellyfin have permission to that directory?
RE: Jellyfin doesn't work - supertanno - 2023-07-20
(2023-07-20, 09:29 PM)TheDreadPirate Wrote: Code: .....
[20:56:17] [INF] [1] Main: Program data path: /home/supertanno/jellyfin
.....
System.ComponentModel.Win32Exception (2): An error occurred trying to start process 'ffmpeg' with working directory '/home/supertanno'. No such file or directory
Does jellyfin have permission to that directory?
I don't think so, I remember this also being an issue when I initially tried to put my media in /home/supertanno since Jellyfin couldn't access that.
How can I fix this? I know that doing a CHMOD 777 on the user directory is not a good idea, but I don't have any other ideas for how to fix it.
RE: Jellyfin doesn't work - TheDreadPirate - 2023-07-20
I can't think of a good reason why you would install an app, or have its data directory, or put your media library in your home directory. The point of a home directory is that the files are accessible to you and you alone (not including root).You would have to add jellyfin to the group ownership of the folder.
Code: chown supertanno:jellyfin /home/supertanno /home/supertanno/jellyfin
chmod 770 /home/supertanno /home/supertanno/jellyfin
This might also work? Slightly more restrictive permissions.
Code: chown supertanno:jellyfin /home/supertanno/jellyfin
chmod 755 /home/supertanno
chmod 770 /home/supertanno/jellyfin
But really, nothing you need to regularly share with other users or processes should be in your home.
RE: Jellyfin doesn't work - supertanno - 2023-07-20
(2023-07-20, 09:46 PM)TheDreadPirate Wrote: I can't think of a good reason why you would install an app, or have its data directory, or put your media library in your home directory. The point of a home directory is that the files are accessible to you and you alone (not including root).You would have to add jellyfin to the group ownership of the folder.
This was moreso because I was still getting to grips with Ubuntu, which doesn't allow root access by default, and so FileZilla was struggling to upload into /media. I'm personally used to CentOS (which should tell you how long it's been since I last used Linux), which doesn't have this issue. I ended up doing a CHMOD 777 for /media and fixed that issue that way. No clue why the data path is in that folder, though, as I never screwed around with that.
Quote:Code: chown supertanno:jellyfin /home/supertanno /home/supertanno/jellyfin
chmod 770 /home/supertanno /home/supertanno/jellyfin
This might also work? Slightly more restrictive permissions.
Code: chown supertanno:jellyfin /home/supertanno/jellyfin
chmod 755 /home/supertanno
chmod 770 /home/supertanno/jellyfin
But really, nothing you need to regularly share with other users or processes should be in your home.
With the above in mind, would there be a way to move the data folder to a more sensible place? If so, which one would you recommend?
RE: Jellyfin doesn't work - TheDreadPirate - 2023-07-20
Did you change the data directory during or after install? The default is /var/lib/jellyfin and that's where jellyfin should live. Since it owns and controls itself and you don't have to open up your home directory.
RE: Jellyfin doesn't work - supertanno - 2023-07-20
Not that I recall, no. How would I go about changing the data directory back to /var/lib/jellyfin?
RE: Jellyfin doesn't work - TheDreadPirate - 2023-07-20
(2023-07-20, 09:52 PM)supertanno Wrote: ....
With the above in mind, would there be a way to move the data folder to a more sensible place? If so, which one would you recommend?
Maybe make a folder in / called "library" or something? Owned by you, group owned by jellyfin, 770. Or 750 if you don't plan to save NFOs or have the jellyscrub plugin.
Move all your media into that folder. If you are using FTP with your credentials, then your FTP client shouldn't have any issues writing in that directory.
(2023-07-20, 09:55 PM)supertanno Wrote: Not that I recall, no. How would I go about changing the data directory back to /var/lib/jellyfin?
Unless someone chimes in, I will have to get back to you when I get home from work in about 4 hours to work out the steps.
RE: Jellyfin doesn't work - supertanno - 2023-07-20
(2023-07-20, 10:06 PM)TheDreadPirate Wrote: Maybe make a folder in / called "library" or something? Owned by you, group owned by jellyfin, 770. Or 750 if you don't plan to save NFOs or have the jellyscrub plugin.
Move all your media into that folder. If you are using FTP with your credentials, then your FTP client shouldn't have any issues writing in that directory.
I don't have my media in the home directory anymore, it's in ./media. /jellyfin is in the home directory, however. Oddly, there's a folder in /var/lib/jellyfin as well:
Code: supertanno@tannoflix:~$ ls /var/lib/jellyfin
data metadata plugins root transcodes
supertanno@tannoflix:~$ ls /home/supertanno/jellyfin
data log metadata plugins root
But, if I use --datadir to point it there, I get the following:
Code: supertanno@tannoflix:~$ jellyfin -d /var/lib/jellyfin
Unhandled Exception
System.UnauthorizedAccessException: Access to the path '/var/lib/jellyfin/log' is denied.
---> System.IO.IOException: Permission denied
--- End of inner exception stack trace ---
at System.IO.FileSystem.CreateDirectory(String fullPath)
at System.IO.Directory.CreateDirectory(String path)
at Jellyfin.Server.Program.CreateApplicationPaths(StartupOptions options)
at Jellyfin.Server.Program.StartApp(StartupOptions options)
at Jellyfin.Server.Program.<Main>(String[] args)
Unhandled exception. System.UnauthorizedAccessException: Access to the path '/var/lib/jellyfin/log' is denied.
---> System.IO.IOException: Permission denied
--- End of inner exception stack trace ---
at System.IO.FileSystem.CreateDirectory(String fullPath)
at System.IO.Directory.CreateDirectory(String path)
at Jellyfin.Server.Program.CreateApplicationPaths(StartupOptions options)
at Jellyfin.Server.Program.StartApp(StartupOptions options)
at Jellyfin.Server.Program.<Main>(String[] args)
Aborted (core dumped)
supertanno@tannoflix:~$ jellyfin -d /var/lib/jellyfin/data
Unhandled Exception
System.UnauthorizedAccessException: Access to the path '/var/lib/jellyfin/data/log' is denied.
---> System.IO.IOException: Permission denied
--- End of inner exception stack trace ---
at System.IO.FileSystem.CreateDirectory(String fullPath)
at System.IO.Directory.CreateDirectory(String path)
at Jellyfin.Server.Program.CreateApplicationPaths(StartupOptions options)
at Jellyfin.Server.Program.StartApp(StartupOptions options)
at Jellyfin.Server.Program.<Main>(String[] args)
Unhandled exception. System.UnauthorizedAccessException: Access to the path '/var/lib/jellyfin/data/log' is denied.
---> System.IO.IOException: Permission denied
--- End of inner exception stack trace ---
at System.IO.FileSystem.CreateDirectory(String fullPath)
at System.IO.Directory.CreateDirectory(String path)
at Jellyfin.Server.Program.CreateApplicationPaths(StartupOptions options)
at Jellyfin.Server.Program.StartApp(StartupOptions options)
at Jellyfin.Server.Program.<Main>(String[] args)
Aborted (core dumped)
So yeah, that's not working, and I am very confused by now.
RE: Jellyfin doesn't work - supertanno - 2023-07-20
Update on the data folder location: I just uninstalled and reinstalled Jellyfin, since I'd barely done anything about my install yet and so nothing of value would be lost.
The new install once again made /home/supertanno/jellyfin the data folder. I am beyond baffled. It does move forward to DLNA setup now, but I'm not yet convinced that it'll actually start working.
|