Jellyfin Forum
Library scan keeps failing - 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: Library scan keeps failing (/t-library-scan-keeps-failing)



Library scan keeps failing - mattmattn - 2023-09-11

Hey all, I'm having issues with scanning remotely mounted libraries. The logs show the following right as the job fails:

Code:
[2023-09-12 00:05:24.620 +02:00] [ERR] Error
System.NullReferenceException: Object reference not set to an instance of an object.
  at MediaBrowser.Providers.Manager.ProviderManager.SaveImage(BaseItem item, String url, ImageType type, Nullable`1 imageIndex, CancellationToken cancellationToken)
  at Emby.Server.Implementations.Library.LibraryManager.ConvertImageToLocal(BaseItem item, ItemImageInfo image, Int32 imageIndex)
  at Emby.Server.Implementations.Library.LibraryManager.UpdateImagesAsync(BaseItem item, Boolean forceUpdate)
  at Emby.Server.Implementations.Library.LibraryManager.RunMetadataSavers(BaseItem item, ItemUpdateType updateReason)
  at Emby.Server.Implementations.Library.LibraryManager.SavePeopleMetadataAsync(IEnumerable`1 people, CancellationToken cancellationToken)
  at Emby.Server.Implementations.Library.LibraryManager.UpdatePeopleAsync(BaseItem item, List`1 people, CancellationToken cancellationToken)
  at MediaBrowser.Providers.Manager.MetadataService`2.SaveItemAsync(MetadataResult`1 result, ItemUpdateType reason, CancellationToken cancellationToken)
  at MediaBrowser.Providers.Manager.MetadataService`2.RefreshMetadata(BaseItem item, MetadataRefreshOptions refreshOptions, CancellationToken cancellationToken)
  at MediaBrowser.Controller.Entities.BaseItem.RefreshMetadata(MetadataRefreshOptions options, CancellationToken cancellationToken)
  at MediaBrowser.Controller.Entities.Folder.<>c__DisplayClass68_0.<<RefreshChildMetadata>b__0>d.MoveNext()--- End of stack trace from previous location ---
  at MediaBrowser.Providers.Manager.ProviderManager.RunMetadataRefresh(Func`1 action, CancellationToken cancellationToken)
  at MediaBrowser.Controller.Entities.Folder.RefreshChildMetadata(BaseItem child, MetadataRefreshOptions refreshOptions, Boolean recursive, IProgress`1 progress, CancellationToken cancellationToken)
  at MediaBrowser.Controller.Entities.Folder.<>c__DisplayClass70_0`1.<<RunTasks>b__1>d.MoveNext()
--- End of stack trace from previous location ---
  at MediaBrowser.Controller.Entities.Folder.RunTasks[T](Func`3 task, IList`1 children, IProgress`1 progress, CancellationToken cancellationToken)
  at MediaBrowser.Controller.Entities.Folder.RefreshChildMetadata(BaseItem child, MetadataRefreshOptions refreshOptions, Boolean recursive, IProgress`1 progress, CancellationToken cancellationToken)
  at MediaBrowser.Controller.Entities.Folder.<>c__DisplayClass70_0`1.<<RunTasks>b__1>d.MoveNext()
--- End of stack trace from previous location ---
  at MediaBrowser.Controller.Entities.Folder.RunTasks[T](Func`3 task, IList`1 children, IProgress`1 progress, CancellationToken cancellationToken)
  at MediaBrowser.Controller.Entities.Folder.ValidateChildrenInternal2(IProgress`1 progress, Boolean recursive, Boolean refreshChildMetadata, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService, CancellationToken cancellationToken)
  at MediaBrowser.Controller.Entities.Folder.ValidateChildrenInternal(IProgress`1 progress, Boolean recursive, Boolean refreshChildMetadata, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService, CancellationToken cancellationToken)
  at MediaBrowser.Controller.Entities.AggregateFolder.ValidateChildrenInternal(IProgress`1 progress, Boolean recursive, Boolean refreshChildMetadata, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService, CancellationToken cancellationToken)
  at Emby.Server.Implementations.Library.LibraryManager.PerformLibraryValidation(IProgress`1 progress, CancellationToken cancellationToken)
  at Emby.Server.Implementations.Library.LibraryManager.ValidateMediaLibraryInternal(IProgress`1 progress, CancellationToken cancellationToken)
  at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal(TaskOptions options)
[2023-09-12 00:05:24.625 +02:00] [INF] "Scan Media Library" Failed after 2 minute(s) and 59 seconds

The system is Ubuntu 20.04.6 LTS, with an Intel i7-7700 CPU and 64GB RAM. Jellyfin version is 10.8.10. System load is normal, plenty of disk space (NVMe) and health is OK. The remote storage is a Ceph cluster and is pretty snappy. Has anyone seen this kind of thing before?


RE: Library scan keeps failing - Reluctant1373 - 2023-10-29

Same issue here, except it's not on network storage.
Did you find a solution to this Problem?


RE: Library scan keeps failing - Reluctant1373 - 2023-10-29

Actually might have fixed it myself, for me the problem seems to have been, that i deleted collections from Metadata Manager.
After adding a collection all the old Collections were still there, so after i deleted each of them individually (don't use them anymore) Library Scan are working again.
I don't know how or if it wasn't related and just luck but that worked for me.