Jellyfin Forum
SOLVED: Media scan stuck at 96% - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+---- Forum: Media Scanning & Identification (https://forum.jellyfin.org/f-media-scanning-identification)
+---- Thread: SOLVED: Media scan stuck at 96% (/t-solved-media-scan-stuck-at-96)

Pages: 1 2 3 4


Media scan stuck at 96% - manicraft1001 - 2024-01-16

Hello,
I have been having problems with the media scan on my library.
These problems are occuring after I moved files in the following order:
- Uploaded movie to library A
- Scanned library 
- Moved movies from library A to B

After this, the media library scan never completed since.
When I start it manually (or it is being started automatically), it runs and finds new files. At 96% it just gets stuck forever and doesn't move.
This is a huge problem because I cannot abort the scan - I have to restart the pod, scan and watch my content. Whenever I want to watch new files, I need to restart again.

I use ZFS and have fast read & write - so huge data amounts shouldn't be a problem. I run using TrueNas and the media files are owned by the correct user. This setup has worked flawlessly before.

I asked on Matrix, but didn't receive any further troubleshooting steps that I could take.

I did look through the log and saw this. Not sure how this is related.

Emby.Server.Implementations.ScheduledTasks.TaskManager: Error
System.InvalidOperationException: Cannot update refresh progress of item 'Folder' (9474e2b32824af15d414264da77cee3a) because a refresh for this item is not running



Running Jellyfin 10.8.13. Plugins: Ani-Sync, AniDB (disabled), AudioDB, Cover Art (disabled), Jellyscrub, Musicbrainz, OMDb, SkinManager, Studio Image, TMDb, TMDb trailers, Webhooks.


RE: Media scan stuck at 96% - tmsrxzar - 2024-01-16

may or may not be helpful but if i were in your situation i would probably just delete the library entry and rebuild to save the hassle

a complete log posted to a paste site might aid people trying to help you though


RE: Media scan stuck at 96% - manicraft1001 - 2024-01-16

(2024-01-16, 03:34 PM)tmsrxzar Wrote: may or may not be helpful but if i were in your situation i would probably just delete the library entry and rebuild to save the hassle

a complete log posted to a paste site might aid people trying to help you though

Hi, thanks for the reply. I deleted the libraries (only in Jellyfin, not on the filesystem) and waited for it to fully update.
As soon as all libraries were gone, I re-added my main library again.
It started scanning (quite fast) but then got stuck again at 96%.
Here's the log of my Jellyfin instance: https://file.io/VDLUnJmDPxu7


RE: Media scan stuck at 96% - TheDreadPirate - 2024-01-16

The log was deleted at that link.


RE: Media scan stuck at 96% - manicraft1001 - 2024-01-16

My bad, not sure why / how it was deleted. Uploaded same file to OneDrive: https://1drv.ms/u/s!ApaEvpbrsNFbnguwempfOvEU_L_S?e=bvx5ku .
I had to upload externally, because it exceeds the limit of the forum.


RE: Media scan stuck at 96% - TheDreadPirate - 2024-01-16

How big is your library and do you have chapter image extraction enabled? It looks like it is just taking a while. No obvious reason why from the log. I just see the ffprobe messages on and on.


RE: Media scan stuck at 96% - manicraft1001 - 2024-01-17

Since my first reply here (9 hours), it hasn't moved from 96%.
Main library is about 11K files, 2.7TB.
Chapter image extraction is disabled on the new library.


RE: Media scan stuck at 96% - manicraft1001 - 2024-01-17

Just had to make a full system restart due to OS update. Still the same issue where it gets stuck at 96%


RE: Media scan stuck at 96% - Efficient_Good_5784 - 2024-01-17

From what I could see in the logs, it looks like a permissions issue.

I looked through it and saw things like Jellyscrub failing to make the BIF files, the screen grabber failing to get access to a library, and so on.

Are you running Jellyfin with Truenas Scale? You stated that you moved video files around and rescanned. Make sure that the user you set Jellyfin to run as has access to those locations and files.
Make sure that the Jellyfin user also has access to all folder/datasets that lead into the video files themselves.

You can also choose to set Jellyfin to run as root (making the user and group both set to 0) to make it have access to all folders on the server.

Also as a note since you have Jellyscrub installed, keep in mind that the process of creating these BIF files will be slow depending on your CPU and how you configured Jellyscrub (HWA enabled or not for it).


RE: Media scan stuck at 96% - manicraft1001 - 2024-01-17

(2024-01-17, 02:38 PM)Efficient_Good_5784 Wrote: From what I could see in the logs, it looks like a permissions issue.

I looked through it and saw things like Jellyscrub failing to make the BIF files, the screen grabber failing to get access to a library, and so on.

Are you running Jellyfin with Truenas Scale? You stated that you moved video files around and rescanned. Make sure that the user you set Jellyfin to run as has access to those locations and files.
Make sure that the Jellyfin user also has access to all folder/datasets that lead into the video files themselves.

You can also choose to set Jellyfin to run as root (making the user and group both set to 0) to make it have access to all folders on the server.

Also as a note since you have Jellyscrub installed, keep in mind that the process of creating these BIF files will be slow depending on your CPU and how you configured Jellyscrub (HWA enabled or not for it).

Thanks for the reply. Container is run using user "apps" (ID 568 for both user and group).
Owner of the files on the file system is 568. To verify that permissions on the media files shouldn't be a problem, I set the permissions to 777 recursively.
Still the same result with that.

   
   

To add to my previous message, I use hardware acceleration for playback and Jellyscrub.
I use my integrated graphics for that, because that is fast enough for me and I don't want the additional power consumption.
Additionally, I double checked that read-only is deactivated for the host path in TrueNAS.