Jellyfin removed 2/3 libraries. #1172

Closed
opened 2026-02-06 20:35:13 +03:00 by OVERLORD · 6 comments
Owner

Originally created by @p82590037723122 on GitHub (Dec 31, 2019).

Today I went to use jellyfin and saw that I only had 1 of 3 added libraries. It appears jellyfin had an issue and removed the other two then purged all metadata related to those libraries.

I have them mounted as read only in the container so I do not know if this error would have deleted the actual data or not.

[2019-12-30 16:00:49.776 +00:00] [ERR] Error refreshing owned items for "/config/data/playlists"
System.IO.DirectoryNotFoundException: Could not find a part of the path '/config/data/playlists'.
   at System.IO.Enumeration.FileSystemEnumerator`1.CreateDirectoryHandle(String path, Boolean ignoreNotFound)
   at System.IO.Enumeration.FileSystemEnumerator`1..ctor(String directory, EnumerationOptions options)
   at System.IO.Enumeration.FileSystemEnumerable`1..ctor(String directory, FindTransform transform, EnumerationOptions options)
   at System.IO.Enumeration.FileSystemEnumerableFactory.DirectoryInfos(String directory, String expression, EnumerationOptions options)
   at System.IO.DirectoryInfo.InternalEnumerateInfos(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options)
   at Emby.Server.Implementations.IO.ManagedFileSystem.GetFileSystemEntries(String path, Boolean recursive)
   at MediaBrowser.Controller.Providers.DirectoryService.GetFileSystemEntries(String path)
   at MediaBrowser.Controller.Entities.BaseItem.RefreshMetadata(MetadataRefreshOptions options, CancellationToken cancellationToken)
[2019-12-30 16:00:49.796 +00:00] [INF] Deleting item, Type: "CollectionFolder", Name: "Music", Path: "/config/root/default/Music", Id: 7e64e319-657a-9516-ec78-490da03edccb
[2019-12-30 16:00:49.803 +00:00] [INF] Deleting item, Type: "CollectionFolder", Name: "TV-Anime", Path: "/config/root/default/TV-Anime", Id: e64a0833-bef8-1cbc-1788-2727d30e8b01
[2019-12-30 16:00:53.368 +00:00] [ERR] Error retrieving children folder
System.IO.DirectoryNotFoundException: Could not find a part of the path '/config/data/playlists'.
   at System.IO.Enumeration.FileSystemEnumerator`1.CreateDirectoryHandle(String path, Boolean ignoreNotFound)
   at System.IO.Enumeration.FileSystemEnumerator`1..ctor(String directory, EnumerationOptions options)
   at System.IO.Enumeration.FileSystemEnumerable`1..ctor(String directory, FindTransform transform, EnumerationOptions options)
   at System.IO.Enumeration.FileSystemEnumerableFactory.DirectoryInfos(String directory, String expression, EnumerationOptions options)
   at System.IO.DirectoryInfo.InternalEnumerateInfos(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options)
   at Emby.Server.Implementations.IO.ManagedFileSystem.GetFileSystemEntries(String path, Boolean recursive)
   at MediaBrowser.Controller.Providers.DirectoryService.GetFileSystemEntries(String path)
   at MediaBrowser.Controller.Entities.Folder.GetNonCachedChildren(IDirectoryService directoryService)
   at MediaBrowser.Controller.Entities.Folder.ValidateChildrenInternal2(IProgress`1 progress, CancellationToken cancellationToken, Boolean recursive, Boolean refreshChildMetadata, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService)
[2019-12-30 16:01:00.052 +00:00] [ERR] Error refreshing owned items for "/config/data/playlists"
System.IO.DirectoryNotFoundException: Could not find a part of the path '/config/data/playlists'.
   at System.IO.Enumeration.FileSystemEnumerator`1.CreateDirectoryHandle(String path, Boolean ignoreNotFound)
   at System.IO.Enumeration.FileSystemEnumerator`1..ctor(String directory, EnumerationOptions options)
   at System.IO.Enumeration.FileSystemEnumerable`1..ctor(String directory, FindTransform transform, EnumerationOptions options)
   at System.IO.Enumeration.FileSystemEnumerableFactory.DirectoryInfos(String directory, String expression, EnumerationOptions options)
   at System.IO.DirectoryInfo.InternalEnumerateInfos(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options)
   at Emby.Server.Implementations.IO.ManagedFileSystem.GetFileSystemEntries(String path, Boolean recursive)
   at MediaBrowser.Controller.Providers.DirectoryService.GetFileSystemEntries(String path)
   at MediaBrowser.Controller.Entities.BaseItem.RefreshMetadata(MetadataRefreshOptions options, CancellationToken cancellationToken)

Looking at my folders I do not have a /config/data/playlists I have a /config and a /data the /data does have a playlist folder but it is empty.

Screenshot_20191230_213347
root docker folder:
Screenshot_20191230_214552

System (please complete the following information):

  • OS: Docker
  • Browser: Firefox
  • Jellyfin Version: 10.4.3
  • Installed Plugins: playback reporting
  • Reverse proxy: traefik

My docker-compose file:

jellyfin:
   image: docker.io/jellyfin/jellyfin:latest
   restart: always
   volumes:
     - /data/jellyfin:/cache
     - /data/jellyfin:/config
     - /data/jellyfin:/media
     - /data/Movies:/Movies:ro
     - /data/Music:/Music:ro
     - /data/TV-Anime:/TV-Anime:ro
   networks:
     - web
   labels:
     - "traefik.enable=true"
     - "traefik.http.routers.jellyfin-http.rule=Host(`<URL>`)"
     - "traefik.http.routers.jellyfin-http.entrypoints=web" 
     - "traefik.http.routers.jellyfin-http.middlewares=redirect@file" 
     - "traefik.http.routers.jellyfin-https.rule=Host(`<URL>`)" 
     - "traefik.http.routers.jellyfin-https.entrypoints=web-secure"
     - "traefik.http.routers.jellyfin-https.tls.certresolver=mytlschallenge"
Originally created by @p82590037723122 on GitHub (Dec 31, 2019). Today I went to use jellyfin and saw that I only had 1 of 3 added libraries. It appears jellyfin had an issue and removed the other two then purged all metadata related to those libraries. I have them mounted as read only in the container so I do not know if this error would have deleted the actual data or not. ``` [2019-12-30 16:00:49.776 +00:00] [ERR] Error refreshing owned items for "/config/data/playlists" System.IO.DirectoryNotFoundException: Could not find a part of the path '/config/data/playlists'. at System.IO.Enumeration.FileSystemEnumerator`1.CreateDirectoryHandle(String path, Boolean ignoreNotFound) at System.IO.Enumeration.FileSystemEnumerator`1..ctor(String directory, EnumerationOptions options) at System.IO.Enumeration.FileSystemEnumerable`1..ctor(String directory, FindTransform transform, EnumerationOptions options) at System.IO.Enumeration.FileSystemEnumerableFactory.DirectoryInfos(String directory, String expression, EnumerationOptions options) at System.IO.DirectoryInfo.InternalEnumerateInfos(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options) at Emby.Server.Implementations.IO.ManagedFileSystem.GetFileSystemEntries(String path, Boolean recursive) at MediaBrowser.Controller.Providers.DirectoryService.GetFileSystemEntries(String path) at MediaBrowser.Controller.Entities.BaseItem.RefreshMetadata(MetadataRefreshOptions options, CancellationToken cancellationToken) [2019-12-30 16:00:49.796 +00:00] [INF] Deleting item, Type: "CollectionFolder", Name: "Music", Path: "/config/root/default/Music", Id: 7e64e319-657a-9516-ec78-490da03edccb [2019-12-30 16:00:49.803 +00:00] [INF] Deleting item, Type: "CollectionFolder", Name: "TV-Anime", Path: "/config/root/default/TV-Anime", Id: e64a0833-bef8-1cbc-1788-2727d30e8b01 [2019-12-30 16:00:53.368 +00:00] [ERR] Error retrieving children folder System.IO.DirectoryNotFoundException: Could not find a part of the path '/config/data/playlists'. at System.IO.Enumeration.FileSystemEnumerator`1.CreateDirectoryHandle(String path, Boolean ignoreNotFound) at System.IO.Enumeration.FileSystemEnumerator`1..ctor(String directory, EnumerationOptions options) at System.IO.Enumeration.FileSystemEnumerable`1..ctor(String directory, FindTransform transform, EnumerationOptions options) at System.IO.Enumeration.FileSystemEnumerableFactory.DirectoryInfos(String directory, String expression, EnumerationOptions options) at System.IO.DirectoryInfo.InternalEnumerateInfos(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options) at Emby.Server.Implementations.IO.ManagedFileSystem.GetFileSystemEntries(String path, Boolean recursive) at MediaBrowser.Controller.Providers.DirectoryService.GetFileSystemEntries(String path) at MediaBrowser.Controller.Entities.Folder.GetNonCachedChildren(IDirectoryService directoryService) at MediaBrowser.Controller.Entities.Folder.ValidateChildrenInternal2(IProgress`1 progress, CancellationToken cancellationToken, Boolean recursive, Boolean refreshChildMetadata, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService) [2019-12-30 16:01:00.052 +00:00] [ERR] Error refreshing owned items for "/config/data/playlists" System.IO.DirectoryNotFoundException: Could not find a part of the path '/config/data/playlists'. at System.IO.Enumeration.FileSystemEnumerator`1.CreateDirectoryHandle(String path, Boolean ignoreNotFound) at System.IO.Enumeration.FileSystemEnumerator`1..ctor(String directory, EnumerationOptions options) at System.IO.Enumeration.FileSystemEnumerable`1..ctor(String directory, FindTransform transform, EnumerationOptions options) at System.IO.Enumeration.FileSystemEnumerableFactory.DirectoryInfos(String directory, String expression, EnumerationOptions options) at System.IO.DirectoryInfo.InternalEnumerateInfos(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options) at Emby.Server.Implementations.IO.ManagedFileSystem.GetFileSystemEntries(String path, Boolean recursive) at MediaBrowser.Controller.Providers.DirectoryService.GetFileSystemEntries(String path) at MediaBrowser.Controller.Entities.BaseItem.RefreshMetadata(MetadataRefreshOptions options, CancellationToken cancellationToken) ``` Looking at my folders I do not have a /config/data/playlists I have a /config and a /data the /data does have a playlist folder but it is empty. ![Screenshot_20191230_213347](https://user-images.githubusercontent.com/37315608/71609281-ca507200-2b4c-11ea-8e00-0781fa00c504.png) root docker folder: ![Screenshot_20191230_214552](https://user-images.githubusercontent.com/37315608/71609440-19e36d80-2b4e-11ea-8644-ce58796cd741.png) **System (please complete the following information):** - OS: Docker - Browser: Firefox - Jellyfin Version: 10.4.3 - Installed Plugins: playback reporting - Reverse proxy: traefik My docker-compose file: ``` jellyfin: image: docker.io/jellyfin/jellyfin:latest restart: always volumes: - /data/jellyfin:/cache - /data/jellyfin:/config - /data/jellyfin:/media - /data/Movies:/Movies:ro - /data/Music:/Music:ro - /data/TV-Anime:/TV-Anime:ro networks: - web labels: - "traefik.enable=true" - "traefik.http.routers.jellyfin-http.rule=Host(`<URL>`)" - "traefik.http.routers.jellyfin-http.entrypoints=web" - "traefik.http.routers.jellyfin-http.middlewares=redirect@file" - "traefik.http.routers.jellyfin-https.rule=Host(`<URL>`)" - "traefik.http.routers.jellyfin-https.entrypoints=web-secure" - "traefik.http.routers.jellyfin-https.tls.certresolver=mytlschallenge" ```
OVERLORD added the bug label 2026-02-06 20:35:13 +03:00
Author
Owner

@MasterCATZ commented on GitHub (Dec 31, 2019):

Version: 10.5.0
rolled back to a daily backup significant file size difference ( best thing about ZFS and BTRFS )
and then it re-corrupted it again ? same bit for bit as the last corrupted db

database disk image is malformed at SQLitePCL.pretty.SQLiteException.CheckOk(sqlite3 db, Int32 rc) at SQLitePCL.pretty.StatementImpl.MoveNext() at
Emby.Server.Implementations.Data.SqliteExtensions.ExecuteQuery(IStatement This)+MoveNext() at
Emby.Server.Implementations.Data.SqliteItemRepository.GetItemList(InternalItemsQuery query) at
MediaBrowser.Controller.Entities.Folder.GetCachedChildren() at
MediaBrowser.Controller.Entities.Folder.LoadChildren() at
MediaBrowser.Controller.Entities.Folder.get_Children() at
MediaBrowser.Controller.Entities.Folder.GetActualChildrenDictionary() at
MediaBrowser.Controller.Entities.Folder.ValidateChildrenInternal2(IProgress'1 progress, CancellationToken cancellationToken, Boolean recursive, Boolean refreshChildMetadata, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService) at
MediaBrowser.Controller.Entities.Folder.ValidateChildrenInternal(IProgress'1 progress, CancellationToken cancellationToken, Boolean recursive, Boolean refreshChildMetadata, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService) at
MediaBrowser.Controller.Entities.Folder.ValidateSubFolders(IList'1 children, IDirectoryService directoryService, IProgress'1 progress, CancellationToken cancellationToken) at
MediaBrowser.Controller.Entities.Folder.ValidateChildrenInternal2(IProgress'1 progress, CancellationToken cancellationToken, Boolean recursive, Boolean refreshChildMetadata, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService) at
MediaBrowser.Controller.Entities.Folder.ValidateChildrenInternal(IProgress'1 progress, CancellationToken cancellationToken, Boolean recursive, Boolean refreshChildMetadata, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService) at
MediaBrowser.Controller.Entities.Folder.ValidateSubFolders(IList'1 children, IDirectoryService directoryService, IProgress'1 progress, CancellationToken cancellationToken) at
MediaBrowser.Controller.Entities.Folder.ValidateChildrenInternal2(IProgress'1 progress, CancellationToken cancellationToken, Boolean recursive, Boolean refreshChildMetadata, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService) at
MediaBrowser.Controller.Entities.Folder.ValidateChildrenInternal(IProgress'1 progress, CancellationToken cancellationToken, Boolean recursive, Boolean refreshChildMetadata, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService) at
MediaBrowser.Controller.Entities.AggregateFolder.ValidateChildrenInternal(IProgress'1 progress, CancellationToken cancellationToken, Boolean recursive, Boolean refreshChildMetadata, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService) 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)
@MasterCATZ commented on GitHub (Dec 31, 2019): Version: 10.5.0 rolled back to a daily backup significant file size difference ( best thing about ZFS and BTRFS ) and then it re-corrupted it again ? same bit for bit as the last corrupted db ```cs database disk image is malformed at SQLitePCL.pretty.SQLiteException.CheckOk(sqlite3 db, Int32 rc) at SQLitePCL.pretty.StatementImpl.MoveNext() at Emby.Server.Implementations.Data.SqliteExtensions.ExecuteQuery(IStatement This)+MoveNext() at Emby.Server.Implementations.Data.SqliteItemRepository.GetItemList(InternalItemsQuery query) at MediaBrowser.Controller.Entities.Folder.GetCachedChildren() at MediaBrowser.Controller.Entities.Folder.LoadChildren() at MediaBrowser.Controller.Entities.Folder.get_Children() at MediaBrowser.Controller.Entities.Folder.GetActualChildrenDictionary() at MediaBrowser.Controller.Entities.Folder.ValidateChildrenInternal2(IProgress'1 progress, CancellationToken cancellationToken, Boolean recursive, Boolean refreshChildMetadata, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService) at MediaBrowser.Controller.Entities.Folder.ValidateChildrenInternal(IProgress'1 progress, CancellationToken cancellationToken, Boolean recursive, Boolean refreshChildMetadata, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService) at MediaBrowser.Controller.Entities.Folder.ValidateSubFolders(IList'1 children, IDirectoryService directoryService, IProgress'1 progress, CancellationToken cancellationToken) at MediaBrowser.Controller.Entities.Folder.ValidateChildrenInternal2(IProgress'1 progress, CancellationToken cancellationToken, Boolean recursive, Boolean refreshChildMetadata, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService) at MediaBrowser.Controller.Entities.Folder.ValidateChildrenInternal(IProgress'1 progress, CancellationToken cancellationToken, Boolean recursive, Boolean refreshChildMetadata, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService) at MediaBrowser.Controller.Entities.Folder.ValidateSubFolders(IList'1 children, IDirectoryService directoryService, IProgress'1 progress, CancellationToken cancellationToken) at MediaBrowser.Controller.Entities.Folder.ValidateChildrenInternal2(IProgress'1 progress, CancellationToken cancellationToken, Boolean recursive, Boolean refreshChildMetadata, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService) at MediaBrowser.Controller.Entities.Folder.ValidateChildrenInternal(IProgress'1 progress, CancellationToken cancellationToken, Boolean recursive, Boolean refreshChildMetadata, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService) at MediaBrowser.Controller.Entities.AggregateFolder.ValidateChildrenInternal(IProgress'1 progress, CancellationToken cancellationToken, Boolean recursive, Boolean refreshChildMetadata, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService) 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) ```
Author
Owner

@anthonylavado commented on GitHub (Jan 10, 2020):

@Urworstnit3m3r If the media was inaccessible for any reason (like a share that got temporarily disconnected), and then Jellyfin went to perform a library scan, it would remove the library entries. It doesn't delete the files, just takes them out of the library.

@anthonylavado commented on GitHub (Jan 10, 2020): @Urworstnit3m3r If the media was inaccessible for any reason (like a share that got temporarily disconnected), and then Jellyfin went to perform a library scan, it would remove the library entries. It doesn't delete the files, just takes them out of the library.
Author
Owner

@p82590037723122 commented on GitHub (Jan 11, 2020):

@anthonylavado Do you know if it also removes the watched data when this happens? I have just been trying out Jellyfin so I didn't really have anything watched to see if it did.

@p82590037723122 commented on GitHub (Jan 11, 2020): @anthonylavado Do you know if it also removes the watched data when this happens? I have just been trying out Jellyfin so I didn't really have anything watched to see if it did.
Author
Owner

@anthonylavado commented on GitHub (Jan 11, 2020):

@Urworstnit3m3r Yes, as it turns out, the watch data is kept in the database, which gets cleared if the library is removed.

If you think that it might be a drive disconnect, you can turn off the automatic library updates and scheduled scans. That way if the disconnect happens again, it won’t “check”, and hopefully that’ll be enough time for it to reconnect. The downside is scanning manually when something new is added.

Another thought is to sync with Trakt to save your watch status. Then if the library is removed, add it again, and the status will sync back over.

@anthonylavado commented on GitHub (Jan 11, 2020): @Urworstnit3m3r Yes, as it turns out, the watch data is kept in the database, which gets cleared if the library is removed. If you think that it might be a drive disconnect, you can turn off the automatic library updates and scheduled scans. That way if the disconnect happens again, it won’t “check”, and hopefully that’ll be enough time for it to reconnect. The downside is scanning manually when something new is added. Another thought is to sync with Trakt to save your watch status. Then if the library is removed, add it again, and the status will sync back over.
Author
Owner

@p82590037723122 commented on GitHub (Jan 11, 2020):

Closing issue. I must have had a temp network blip that caused nfs to lose connection and an automatic scan got triggered. I'll just turn off the auto scan and preform them manually.

@p82590037723122 commented on GitHub (Jan 11, 2020): Closing issue. I must have had a temp network blip that caused nfs to lose connection and an automatic scan got triggered. I'll just turn off the auto scan and preform them manually.
Author
Owner

@anthonylavado commented on GitHub (Jan 12, 2020):

You maybe interested in following https://github.com/jellyfin/jellyfin/issues/1714

@anthonylavado commented on GitHub (Jan 12, 2020): You maybe interested in following https://github.com/jellyfin/jellyfin/issues/1714
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#1172