Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scheduled task "Scan Media Library" with Jellyfin 10.6.4 results in a fail #4289

Closed
napcae opened this issue Oct 6, 2020 · 6 comments
Closed
Labels
bug Something isn't working stale Stale and will be closed if no activity occurs

Comments

@napcae
Copy link

napcae commented Oct 6, 2020

Describe the bug

Scheduled task "Scan Media Library" with Jellyfin 10.6.4 results in a fail.

System (please complete the following information):

  • OS: Debian, Windows
  • Virtualization: Docker
  • Clients: [Browser, Android, Fire Stick, etc.]
  • Browser: [e.g. Firefox 72, Chrome 80, Safari 13]
  • Jellyfin Version: 10.6.4
  • Playback: [Direct Play, Remux, Direct Stream, Transcode]
  • Installed Plugins: none
  • Reverse Proxy: nginx
  • Base URL: /
  • Networking: Docker Bridge
  • Storage: local
    To Reproduce
  1. Go to Scheduled Tasks
  2. Click on Scan Media Library
  3. See error

Expected behavior

A clean library scan.

Logs

MediaBrowser.Model.Net.HttpException: Origin Connection Time-out
   at Emby.Server.Implementations.HttpClientManager.HttpClientManager.EnsureSuccessStatusCode(HttpResponseMessage response, HttpRequestOptions options)
   at Emby.Server.Implementations.HttpClientManager.HttpClientManager.SendAsyncInternal(HttpRequestOptions options, HttpMethod httpMethod)
   at Emby.Server.Implementations.HttpClientManager.HttpClientManager.SendAsync(HttpRequestOptions options, HttpMethod httpMethod)
   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.UpdateImages(BaseItem item, Boolean forceUpdate)
   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)
[2020-10-06 21:18:42.240 +00:00] [INF] [27] Emby.Server.Implementations.ScheduledTasks.TaskManager: "Scan Media Library" Failed after 0 minute(s) and 24 seconds
Line 121089: [2020-10-06 21:18:26.612 +00:00] [DBG] [27] Emby.Server.Implementations.Library.LibraryManager: ConvertImageToLocal item 2ba82dee-e2e6-f001-25e8-2c7c522974e1 - image url: "http://media.theaudiodb.com/images/media/album/thumb/xswpqw1479855978.jpg"
root@d77627fc0832:/# curl -L http://media.theaudiodb.com/images/media/album/thumb/xswpqw1479855978.jpg
<html>
<head><title>522 Origin Connection Time-out</title></head>
<body bgcolor="white">
<center><h1>522 Origin Connection Time-out</h1></center>
<hr><center>cloudflare-nginx</center>
</body>
</html>

Screenshots

Additional context

@napcae napcae added the bug Something isn't working label Oct 6, 2020
@napcae
Copy link
Author

napcae commented Oct 6, 2020

After checking with @cvium on Matrix, and enabling debug logging we've found the offender for this error: theaudiodb.com.
A temporary solution is to stop the current jellyfin instance and update entries manually in data/library.db with update typedbaseitems set Images = null where Images like "%http://media.theaudiodb.com/images/media/%";. This will remove all theaudiodb.com entries. After that disabling the provider in Libraries/Manage Libraries is necessary.

@cvium
Copy link
Member

cvium commented Oct 9, 2020

@napcae How old is your metadata? I checked and it seems that http://media.theaudiodb.com isn't used anymore.

@napcae
Copy link
Author

napcae commented Oct 9, 2020

How can I check this? This Jellyfin instance is running for a few years now, I remember switching to Jellyfin when it was forked from Emby.

@cvium
Copy link
Member

cvium commented Oct 9, 2020

Well, when did you add the albums that caused the issues?

@napcae
Copy link
Author

napcae commented Oct 9, 2020

sqlite> .mode column                                                                                                                                                                                      
sqlite> .headers on
sqlite> select * from TypedBaseItems where Images like "%xswpqw1479855978.jpg%";
guid             type                                               data        ParentId     Path                                 StartDate   EndDate     ChannelId   IsMovie     IsSports    IsKids      CommunityRating  CustomRating  IndexNumber  IsLocked    Name           OfficialRating  MediaType   Overview    ParentIndexNumber  PremiereDate                  ProductionYear  Genres      SortName       RunTimeTicks  OfficialRatingDescription  HomePageUrl  VoteCount   DisplayMediaType  DateCreated           DateModified          ForcedSortName  LocationType  IsSeries    IsLive      IsNews      IsPremiere  EpisodeTitle  IsRepeat    PreferredMetadataLanguage  PreferredMetadataCountryCode  IsHD        ExternalEtag  DateLastRefreshed             DateLastSaved                 IsInMixedFolder  LockedFields  Studios     Audio       ExternalServiceId  Tags        IsFolder    InheritedParentalRatingValue  UnratedType  TopParentId                       IsItemByName  SourceType  TrailerTypes  CriticRating  CriticRatingSummary  InheritedTags  CleanName      PresentationUniqueKey             SlugName    OriginalTitle  PrimaryVersionId  DateLastMediaAdded  Album       IsVirtualItem  SeriesName  UserDataKey                                                              SeasonName  SeasonId    SeriesId    SeriesSortName  ExternalSeriesId  Tagline     Keywords    ProviderIds                                                                                                         Images                                                                                   ProductionLocations  ThemeSongIds  ThemeVideoIds  TotalBitrate  ExtraType   Artists     AlbumArtists  ExternalId  SeriesPresentationUniqueKey  ShowId      OwnerId     ExtraIds    Width       Height      TopParentIdGuid  TopParentIdInt  SeasonIdInt  SeriesIdInt  ParentIdInt  OwnerIdInt  IdInt       Size
---------------  -------------------------------------------------  ----------  -----------  -----------------------------------  ----------  ----------  ----------  ----------  ----------  ----------  ---------------  ------------  -----------  ----------  -------------  --------------  ----------  ----------  -----------------  ----------------------------  --------------  ----------  -------------  ------------  -------------------------  -----------  ----------  ----------------  --------------------  --------------------  --------------  ------------  ----------  ----------  ----------  ----------  ------------  ----------  -------------------------  ----------------------------  ----------  ------------  ----------------------------  ----------------------------  ---------------  ------------  ----------  ----------  -----------------  ----------  ----------  ----------------------------  -----------  --------------------------------  ------------  ----------  ------------  ------------  -------------------  -------------  -------------  --------------------------------  ----------  -------------  ----------------  ------------------  ----------  -------------  ----------  -----------------------------------------------------------------------  ----------  ----------  ----------  --------------  ----------------  ----------  ----------  ------------------------------------------------------------------------------------------------------------------  ---------------------------------------------------------------------------------------  -------------------  ------------  -------------  ------------  ----------  ----------  ------------  ----------  ---------------------------  ----------  ----------  ----------  ----------  ----------  ---------------  --------------  -----------  -----------  -----------  ----------  ----------  ----------
�-�+���%�,|R)t�  MediaBrowser.Controller.Entities.Audio.MusicAlbum              �]�Խ���[�{G��s�  /media/Music/Fabolous/Street Dreams                                                                                                                      0           Street Dreams                                                             9999-12-31 23:59:59.9999999Z  2003            Rap         street dreams  2743901952                                                                          2017-04-18 14:06:53Z  0001-01-01 00:00:00Z                                                                                                                                                                                             2020-09-25 03:23:25.9604769Z  2020-09-25 03:23:25.9605134Z  0                                                                                     1           0                             Music        e39f9aab6ddebd2843db37eeb6505fe0                                                                                            street dreams  2ba82deee2e6f00125e82c7c522974e1                                                                               0                          MusicAlbum-MusicBrainzReleaseGroup-0b9a3f21-74a9-3d04-b50e-6cad0299692c                                                                                                MusicBrainzAlbum=da29895c-7f44-4656-b519-9c3cb9aa04d3|MusicBrainzReleaseGroup=0b9a3f21-74a9-3d04-b50e-6cad0299692c  http://media.theaudiodb.com/images/media/album/thumb/xswpqw1479855978.jpg*0*Primary*0*0                                                                              Fabolous    Fabolous                          

This is one example, seems to be added on 2017-04-18 14:06:53Z. I've only encountered this issue with Jellyfin 10.6.4 though. When I still was on 10.5.5 there were no issues with library scanning - didn't add new items since then.

@stale
Copy link

stale bot commented Feb 7, 2021

This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments.
If you're the original submitter of this issue, please comment confirming if this issue still affects you in the latest release or nightlies, or close the issue if it has been fixed. If you're another user also affected by this bug, please comment confirming so. Either action will remove the stale label.
This bot exists to prevent issues from becoming stale and forgotten. Jellyfin is always moving forward, and bugs are often fixed as side effects of other changes. We therefore ask that bug report authors remain vigilant about their issues to ensure they are closed if fixed, or re-confirmed - perhaps with fresh logs or reproduction examples - regularly. If you have any questions you can reach us on Matrix or Social Media.

@stale stale bot added the stale Stale and will be closed if no activity occurs label Feb 7, 2021
@stale stale bot closed this as completed Mar 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale Stale and will be closed if no activity occurs
Projects
None yet
Development

No branches or pull requests

2 participants