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


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

Ok, reporting back:
- Moving the files back did not help
- I saw errors from ffmpeg with one Anime. I deleted the entire directory to make sure it doesn't fail due to some corrupt media
- I deleted the Jellyfin deployment
- I chown'ed all files to 568 and chmod'ed to 777

Still getting stuck at 96% (after 40 minutes of scanning). I'm baffled. I'll reboot in debug mode and post another update soon.


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

This is a debug log where I
1. Changed the default log level to "Debug"
2. Started Jellyfin
3. Hit "Scan"

https://1drv.ms/u/s!ApaEvpbrsNFbng7heqOK_0gGNOX0?e=go7iqS

This is a completely fresh installation.
All old directories were deleted.
Media library is still the same.


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

Which version of Truenas are you running? Core or Scale?

If Scale, how are you installing Jellyfin?
IX-Systems? TrueCharts? Or pulling Jellyfin directly from Docker hub?

Why not use the built-in GUI to add permission for your datasets? Make sure to recursively change the permissions.


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

As I stated previously, I run TrueNAS-SCALE-23.10.1.1.
I use the TrueCharts deplyoment.
Except the storage paths, no additional configuration.
I'll try to set permissions via GUI recursively in a moment...


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

Have you tried removing the Jellyfin user (or changing it to be run as root) to rule out a permissions issue?

Try changing the user & group to both be 0 for root.

I think Truecharts forces you to select a user/group, but if you pull the Jellyfin image straight from Docker hub using Scale's option to pull Docker images, it won't force you to select a user & group. If you don't specify a user/group here, it will also run Jellyfin as root.


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

Can confirm user root doesn't change anything. Will do further testing tomorrow


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

after all that there's few options left ...

maybe piece it together a little at a time; move the last few files it scans in the log out of the library path?
seems possible it's trying to scan a broken file

less likely (but not completely impossible); a weird recursion issue where there's a symlink or mount causing it to loop the scan
(yes i know this sounds ridiculous but i cannot completely rule it out without being at the pc)


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

I just had a breakthrough.
I didn't see your comment (don't receive any emails from this forum for some reason) though.
I started moving the newest files from the Anime library into a temporary directory outside Jellyfin. Suddenly, the scan completed.
I will try to narrow it down tomorrow by moving chunk by chunk back.
When I finally figure out, which file it was, can I submit a bug report?
It's totally expected to get errors with corrupted files, but there should be some indication, error or task completion, even if there is a problem with one specific file.
In my opinion, this could be improved on.

I'd like to thank everyone who helped investigating on this thread. Appreciate your time and help.

I'll mark this as the solution but may post further updates when I finally find the culprit.

Cheers 👋


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

(2024-01-18, 10:12 PM)tmsrxzar Wrote: maybe piece it together a little at a time; move the last few files it scans in the log out of the library path?
I second this, but in reverse.

Make a new dataset/folder location and copy one or two shows/movies into it. Then make a new blank config location for Jellyfin.
Set up Jellyfin to use the new blank config folder and the new small media location only.
See if this new installation works. Basically, you'll be seeing if a brand-new Jellyfin install will scan to 100%.

If this does work, then it's a process of elimination of which dataset/folder or file is causing the issue.

I was also thinking it might be a plugin you have installed. The new Jellyfin install shouldn't have any plugin installed, but you could add them back one-by-one to see if this is also the issue.


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

(2024-01-18, 10:28 PM)manicraft1001 Wrote: It's totally expected to get errors with corrupted files, but there should be some indication, error or task completion, even if there is a problem with one specific file.
In my opinion, this could be improved on.
If you open the logs for Jellyfin, you can actually see what's happening in real time.

If you open them through Jellyfin's dashboard, just reload (F5) the page constantly to see the real-time updates.
On Truenas Scale's GUI, the log view window should be updating in real-time for a bit.

On the first set of logs you posted, I do remember seeing a mention of some path to an anime library. You edited out most of the path to a bunch of 'X' characters, but that could be the folder/file that's giving you issues.