Jellyfin Forum
SOLVED: Sync Progress Stuck at 0% - 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: Sync Progress Stuck at 0% (/t-solved-sync-progress-stuck-at-0)



Sync Progress Stuck at 0% - Maoam - 2024-04-18

System Information:
Operating System: Ubuntu
Installation Type: Baremetal


Problem Description:
Two days ago, I attempted to directly connect my NFS-linked local folders in Jellyfin by adding the path
nfsConfused-face/{IP}.
When I tried to save this, the interface prompted me to enter a valid path. Thinking that it was looking for the NFS folder path, I appended a
'/' to the end and saved the changes.
However, when I initiated a library sync, the progress remained stuck at 0%. This issue persists across all scanning attempts, even after deleting every library entry. Currently, with no libraries configured, the sync still halts at 0%, prompting me to stop the Jellyfin server temporarily.


Log Error Messages:
Code:
[color=#cccccc][2024-04-17 06:09:04.560 +00:00] [ERR] Error in Directory watcher for: [color=#ce9178]"/"[/color]
System.UnauthorizedAccessException: Access to the path [color=#ce9178]'/home/myuser'[/color] is denied.
 ---> System.IO.IOException: Permission denied
   --- End of inner exception stack trace ---
[2024-04-17 06:09:18.642 +00:00] [ERR] Error watching path: [color=#ce9178]"/"[/color]
System.UnauthorizedAccessException: Access to the path [color=#ce9178]'/proc/1/task/1/fdinfo'[/color] is denied.
 ---> System.IO.IOException: Permission denied
   --- End of inner exception stack trace ---
   at System.IO.Enumeration.FileSystemEnumerator`1.CreateDirectoryHandle(String path, Boolean ignoreNotFound)
   at System.IO.Enumeration.FileSystemEnumerator`1.Init()
   at System.IO.Enumeration.FileSystemEnumerableFactory.UserDirectories(String directory, String expression, EnumerationOptions options)
   at System.IO.Directory.InternalEnumeratePaths(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options)
   at System.IO.FileSystemWatcher.RunningInstance.AddDirectoryWatchUnlocked(WatchedDirectory parent, String directoryName)
   at System.IO.FileSystemWatcher.RunningInstance.AddDirectoryWatchUnlocked(WatchedDirectory parent, String directoryName)
   at System.IO.FileSystemWatcher.RunningInstance.AddDirectoryWatchUnlocked(WatchedDirectory parent, String directoryName)
   at System.IO.FileSystemWatcher.RunningInstance.AddDirectoryWatchUnlocked(WatchedDirectory parent, String directoryName)
   at System.IO.FileSystemWatcher.RunningInstance.AddDirectoryWatchUnlocked(WatchedDirectory parent, String directoryName)
   at System.IO.FileSystemWatcher.RunningInstance.AddDirectoryWatchUnlocked(WatchedDirectory parent, String directoryName)
   at System.IO.FileSystemWatcher.RunningInstance..ctor(FileSystemWatcher watcher, SafeFileHandle inotifyHandle, String directoryPath, Boolean includeSubdirectories, NotifyFilters notifyFilters, CancellationToken cancellationToken)
   at System.IO.FileSystemWatcher.StartRaisingEvents()
   at System.IO.FileSystemWatcher.StartRaisingEventsIfNotDisposed()
   at System.IO.FileSystemWatcher.set_EnableRaisingEvents(Boolean value)
   at Emby.Server.Implementations.IO.LibraryMonitor.<>c__DisplayClass19_0.<StartWatchingPath>b__0()[/color]


Steps Taken:
  • Attempted to add NFS path in Jellyfin.
  • Modified path by adding '/' at the end.
  • Deleted all library entries in an attempt to resolve the issue.

Current Status:
  • No libraries are configured, yet sync progress is consistently stuck at 0%.
  • Jellyfin server has been stopped temporarily due to this issue.


Any assistance would be greatly appreciated. Thank you!


RE: Sync Progress Stuck at 0% - paulc - 2024-04-18

It says, UnauthorizedAccessException "permission denied." Do you have the correct user permissions set for Jellyfin to access the folder? It also looks like the directory watcher is /. That don't seem right. Open your nfs folder in in your file browser, and if you have access, try to use that path.


RE: Sync Progress Stuck at 0% - Maoam - 2024-04-18

(2024-04-18, 08:25 AM)paulc Wrote: It says, UnauthorizedAccessException "permission denied." Do you have the correct user permissions set for Jellyfin to access the folder? It also looks like the directory watcher is /. That don't seem right.

Thank you very much for your reply.
The correct nfs path ist actually /mnt/nfs/... while in the logs it say's /home/myuser so. I guess your right and jellyfin doesn't have the permission for the user home directory. My thought is that when I saved the '/' path it saved the user homedirectory to the Library and since the first scan kicked in it keeps looping every time when a scan starts, which fails every time duo to the directory permission issue. The question is why does it still want to access over and over again, even tough I did remove every single library.

(2024-04-18, 08:25 AM)paulc Wrote: Open your nfs folder in in your file browser, and if you have access, try to use that path.
Accessing the actual nfs directory mnt/nfs/ and it's files works without any issue via ssh.


I guess one thing I could try is granting jellyfin the homedir permission and see if the issue resolves it self, which I will try as soon as I am at home again.

In the meantime, I welcome any other potential solutions.


RE: Sync Progress Stuck at 0% - TheDreadPirate - 2024-04-18

(2024-04-18, 09:25 AM)Maoam Wrote: My thought is that when I saved the '/' path it saved the user homedirectory to the Library and since the first scan kicked in it keeps looping every time when a scan starts, which fails every time duo to the directory permission issue. The question is why does it still want to access over and over again, even tough I did remove every single library.

"/" is stuck somewhere in jellyfin's database and all the config files that define your libraries probably no longer have it. Another user had this issue. I recall they opted to just start from scratch. 

(2024-04-18, 09:25 AM)Maoam Wrote: I guess one thing I could try is granting jellyfin the homedir permission and see if the issue resolves it self, which I will try as soon as I am at home again.


Never do this.  If you have files that a service user frequently needs access to you should relocate the files.  Your home is YOUR home and has sensitive files in it that NO ONE should have access to.


RE: Sync Progress Stuck at 0% - Maoam - 2024-04-18

(2024-04-18, 09:25 AM)Maoam Wrote:
(2024-04-18, 08:25 AM)paulc Wrote: It says, UnauthorizedAccessException "permission denied." Do you have the correct user permissions set for Jellyfin to access the folder? It also looks like the directory watcher is /. That don't seem right.

Thank you very much for your reply.
The correct nfs path ist actually /mnt/nfs/... while in the logs it say's /home/myuser so. I guess your right and jellyfin doesn't have the permission for the user home directory. My thought is that when I saved the '/' path it saved the user homedirectory to the Library and since the first scan kicked in it keeps looping every time when a scan starts, which fails every time duo to the directory permission issue. The question is why does it still want to access over and over again, even tough I did remove every single library.

(2024-04-18, 08:25 AM)paulc Wrote: Open your nfs folder in in your file browser, and if you have access, try to use that path.
Accessing the actual nfs directory mnt/nfs/ and it's files works without any issue via ssh.


I guess one thing I could try is granting jellyfin the homedir permission and see if the issue resolves it self, which I will try as soon as I am at home again.

In the meantime, I welcome any other potential solutions.

Thanks for your advice!
I’ve decided to reset my Jellyfin setup based on your suggestions, rather than tampering with dangerous permissions.

I really appreciate your help!