Jump to content

http client error when fetching metadata


Recommended Posts

Posted

I'm running emby server 4.9.0.1 on Debian linux and notice there are errors when fetching metadata for entries. This has been happening for a few releases; sometimes manually adding the IMDB or TMDB identifier helps, but other times there is no metadata downloaded.

Please see the example log entry; I'm attaching my server log to this post, also. Any help is greatly appreciated!

2024-06-05 07:43:59.721 Error HttpClient: Connection to https://api.themoviedb.org/3/configuration/primary_translations?api_key=f6bd687ffa63cd282b6ff2c6877f2669 timed out
2024-06-05 07:43:59.742 Error App: Error in TheMovieDb
        *** Error Report ***
        Version: 4.9.0.1
        Command line: /opt/emby-server/system/EmbyServer.dll -programdata /var/lib/emby -ffdetect /opt/emby-server/bin/ffdetect -ffmpeg /opt/emby-server/bin/ffmpeg -ffprobe /opt/emby-server/bin/ffprobe -restartexitcode 3 -updatepackage emby-server-deb_{version}_amd64.deb
        Operating system: Linux version 6.1.0-17-amd64 (debian-kernel@lists.debian.org) (gcc-12 (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP PREEMPT
        Framework: .NET 6.0.25
        OS/Process: x64/x64
        Runtime: opt/emby-server/system/System.Private.CoreLib.dll
        Processor count: 4
        Data path: /var/lib/emby
        Application path: /opt/emby-server/system
        MediaBrowser.Model.Net.HttpException: MediaBrowser.Model.Net.HttpException: Connection to https://api.themoviedb.org/3/configuration/primary_translations?api_key=f6bd687ffa63cd282b6ff2c6877f2669 timed out
         ---> System.Threading.Tasks.TaskCanceledException: The request was canceled due to the configured HttpClient.Timeout of 20 seconds elapsing.
         ---> System.TimeoutException: A task was canceled.
         ---> System.Threading.Tasks.TaskCanceledException: A task was canceled.
           at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
           at System.Net.Http.HttpConnectionPool.GetHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
           at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
           at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
           at System.Net.Http.DecompressionHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
           at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
           --- End of inner exception stack trace ---
           --- End of inner exception stack trace ---
           at System.Net.Http.HttpClient.HandleFailure(Exception e, Boolean telemetryStarted, HttpResponseMessage response, CancellationTokenSource cts, CancellationToken cancellationToken, CancellationTokenSource pendingRequestsCts)
           at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
           at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.SendAsyncInternal(HttpRequestOptions options, String httpMethod)
           --- End of inner exception stack trace ---
           at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.SendAsyncInternal(HttpRequestOptions options, String httpMethod)
           at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.SendAsync(HttpRequestOptions options, String httpMethod)
           at MovieDb.MovieDbProviderBase.GetMovieDbResponse(HttpRequestOptions options)
           at MovieDb.MovieDbProviderBase.GetTmdbLanguages(CancellationToken cancellationToken)
           at MovieDb.GenericMovieDbInfo`1.GetMetadata(ItemLookupInfo searchInfo, CancellationToken cancellationToken)
           at Emby.Providers.Manager.MetadataService`2.ExecuteRemoteProviders(MetadataResult`1 temp, LibraryOptions libraryOptions, String logName, TIdType id, IRemoteMetadataProvider`2[] providers, MetadataRefreshOptions options, CancellationToken cancellationToken)
        Source: Emby.Server.Implementations
        TargetSite: Void MoveNext()
        InnerException: System.Threading.Tasks.TaskCanceledException: The request was canceled due to the configured HttpClient.Timeout of 20 seconds elapsing.
        Source: System.Net.Http
        TargetSite: Void HandleFailure(System.Exception, Boolean, System.Net.Http.HttpResponseMessage, System.Threading.CancellationTokenSource, System.Threading.CancellationToken, System.Threading.CancellationTokenSource)
           at System.Net.Http.HttpClient.HandleFailure(Exception e, Boolean telemetryStarted, HttpResponseMessage response, CancellationTokenSource cts, CancellationToken cancellationToken, CancellationTokenSource pendingRequestsCts)
           at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
           at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.SendAsyncInternal(HttpRequestOptions options, String httpMethod)
        InnerException: System.TimeoutException: A task was canceled.
        Source: 
        TargetSite: 
        InnerException: System.Threading.Tasks.TaskCanceledException: A task was canceled.
        Source: System.Private.CoreLib
        TargetSite: Void ThrowForNonSuccess(System.Threading.Tasks.Task)
           at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
           at System.Net.Http.HttpConnectionPool.GetHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
           at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
           at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
           at System.Net.Http.DecompressionHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
           at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)

 

embyserver.txt

Happy2Play
Posted

Appears to be only an issue with TMDB api, do you use a VPN?

Is there a reason you are using outdated beta 4.9.0.1 and not current new 4.9.0.23?

Happy2Play
Posted
1 minute ago, hrvxla said:

No VPN in use.

I didn't see the recent version at https://emby.media/linux-server.html ; is there a different location one can track for beta releases?

 

Since .23 was just release sometimes the download pages are a little behind as builds are created.  But the page shows .22 which is a lot newer then .01.

Releases · MediaBrowser/Emby.Releases (github.com)

Posted

Upgraded to 4.9.0.23 and the same issue occurs.

ts,releases,images,keywords,trailers
2024-06-05 13:11:54.229 Error ProviderManager: MovieDbImageProvider failed in GetImageInfos for type Movie
	*** Error Report ***
	Version: 4.9.0.23
	Command line: /opt/emby-server/system/EmbyServer.dll -programdata /var/lib/emby -ffdetect /opt/emby-server/bin/ffdetect -ffmpeg /opt/emby-server/bin/ffmpeg -ffprobe /opt/emby-server/bin/ffprobe -restartexitcode 3 -updatepackage emby-server-deb_{version}_amd64.deb
	Operating system: Linux version 6.1.0-17-amd64 (debian-kernel@lists.debian.org) (gcc-12 (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP PREEMPT
	OS/Process: x64/x64
	Framework: .NET 8.0.5
	Runtime: opt/emby-server/system/System.Private.CoreLib.dll
	Processor count: 4
	Data path: /var/lib/emby
	Application path: /opt/emby-server/system
	MediaBrowser.Model.Net.HttpException: MediaBrowser.Model.Net.HttpException: Cancelling connection to https://api.themoviedb.org/3/movie/365620-ferrari?api_key=‌f6bd687ffa63cd282b6ff2c6877f2669‌&append_to_response=alternative_titles,reviews,casts,releases,images,keywords,trailers due to a previous timeout.
	   at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.SendAsyncInternal(HttpRequestOptions options, String httpMethod)
	   at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.SendAsync(HttpRequestOptions options, String httpMethod)
	   at MovieDb.MovieDbProviderBase.GetMovieDbResponse(HttpRequestOptions options)
	   at MovieDb.MovieDbProvider.FetchMainResult(String id, Boolean isTmdbId, String language, CancellationToken cancellationToken)
	   at MovieDb.MovieDbProvider.DownloadMovieInfo(String id, String preferredMetadataLanguage, String dataFilePath, CancellationToken cancellationToken)
	   at MovieDb.MovieDbImageProvider.GetMovieInfo(BaseItem item, String language, IJsonSerializer jsonSerializer, CancellationToken cancellationToken)
	   at MovieDb.MovieDbImageProvider.GetImages(RemoteImageFetchOptions options, CancellationToken cancellationToken)
	   at Emby.Providers.Manager.ProviderManager.GetImages(RemoteImageFetchOptions options, CancellationToken cancellationToken, IRemoteImageProvider provider, Int32 providerIndex)
	Source: Emby.Server.Implementations
	TargetSite: Void MoveNext()

 

Posted

Connections are timing out. Typical causes are firewall, security software or vpn. Can you look into those and let us know what you find?

Posted

As stated, I have no VPN and no issues with connectivity. Nothing is being blocked on any upstream devices.

Is there any way to debug the process further?

Happy2Play
Posted

In the end something specific to your setup TMDB does not like and is failing.

Is TMDB the only provider enabled on your library?  Would be interested to see if TVDB and OMDB fail also?

Posted (edited)

How does one add OMDB as a source? I've got the OMDB plugin installed but can't find any options to enable it.

Whoops, found the option. I'll enable OMDB and move it up above TMDB. Do I need an API key for general queries?

Edited by hrvxla
Happy2Play
Posted
5 minutes ago, hrvxla said:

Whoops, found the option. I'll enable OMDB and move it up above TMDB. Do I need an API key for general queries?

No Emby has its own api keys.

Limitations of OMDB are primarily limited returned cast.

adminExitium
Posted (edited)

You may also want to check into IPv4 & IPv6 connectivity in case one of those is being blocked or dropped and the browser is automatically preferring the other one but Emby is not.

Edited by adminExitium
  • Like 1
Posted

Switching to OMDB worked. The calls to TMDB just appear broken.

Posted
1 hour ago, hrvxla said:

Switching to OMDB worked. The calls to TMDB just appear broken.

From your log it looks like something is blocking your requests to tmdb. The typical causes are the ones I mentioned earlier.

Posted

Nothing is blocked. But thanks for the help anyway.

Posted

Let us know if you find anything. Thanks.

Happy2Play
Posted

Something environmental or location per your system TMDB does not like as this is specific to your location or setup.  All we can do is guess on per previous users issues.

Could be DNS/IPv6/Firewall/VPN/Security Software but there is no way for us to know exact issues just log that api does not like something via a TimeOut.

But a network guru would have to provide better troubleshoot steps or tips.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...