Jump to content

Docker: TVDB / TheMovieDB API issues


blei

Recommended Posts

i tried manually inputting https://thetvdb.com/series/the-legend-of-korra (251085)

 

2020-09-27 05:09:07.983 Error HttpClient: Connection to https://api.themoviedb.org/3/find/251085?api_key=f6bd687ffa63cd282b6ff2c6877f2669&external_source=tvdb_id timed out
2020-09-27 05:09:07.990 Error ProviderManager: Error searching
        *** Error Report ***
        Version: 4.5.0.50
        Command line: /system/EmbyServer.dll -programdata /config -ffdetect /bin/ffdetect -ffmpeg /bin/ffmpeg -ffprobe /bin/ffprobe -restartexitcode 3
        Operating system: Linux version 3.10.0-1127.18.2.el7.x86_64 (mockbuild@kbuilder.bsys.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC) ) #1 SMP Sun Jul 2
        Framework: .NET Core 3.1.7
        OS/Process: x64/x64
        Runtime: system/System.Private.CoreLib.dll
        Processor count: 4
        Data path: /config
        Application path: /system
        MediaBrowser.Model.Net.HttpException: MediaBrowser.Model.Net.HttpException: Connection to https://api.themoviedb.org/3/find/251085?api_key=f6bd687ffa63cd282b6ff2c6877f2669&external_source=tvdb_id timed out
         ---> System.Threading.Tasks.TaskCanceledException: The operation was canceled.
           at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)
           at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean allowHttp2, CancellationToken cancellationToken)
           at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken)
           at System.Net.Http.HttpConnectionPool.GetHttpConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken)
           at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean doRequestAuth, CancellationToken cancellationToken)
           at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
           at System.Net.Http.DecompressionHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
           at System.Net.Http.DiagnosticsHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
           at System.Net.Http.HttpClient.FinishSendAsyncBuffered(Task`1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts)
           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.MovieDbProvider.GetMovieDbResponse(HttpRequestOptions options)
           at MovieDb.MovieDbSeriesProvider.FindByExternalId(String id, String externalSource, String providerIdKey, CancellationToken cancellationToken)
           at MovieDb.MovieDbSeriesProvider.GetSearchResults(SeriesInfo searchInfo, CancellationToken cancellationToken)
           at MediaBrowser.Providers.Manager.ProviderManager.GetSearchResults[TLookupType](IRemoteSearchProvider`1 provider, TLookupType searchInfo, CancellationToken cancellationToken)
           at MediaBrowser.Providers.Manager.ProviderManager.GetRemoteSearchResults[TItemType,TLookupType](RemoteSearchQuery`1 searchInfo, BaseItem referenceItem, CancellationToken cancellationToken)
        Source: Emby.Server.Implementations
        TargetSite: Void MoveNext()
        InnerException: System.Threading.Tasks.TaskCanceledException: The operation was canceled.
        Source: System.Private.CoreLib
        TargetSite: Void Throw()
           at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)
           at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean allowHttp2, CancellationToken cancellationToken)
           at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken)
           at System.Net.Http.HttpConnectionPool.GetHttpConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken)
           at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean doRequestAuth, CancellationToken cancellationToken)
           at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
           at System.Net.Http.DecompressionHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
           at System.Net.Http.DiagnosticsHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
           at System.Net.Http.HttpClient.FinishSendAsyncBuffered(Task`1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts)
           at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.SendAsyncInternal(HttpRequestOptions options, String httpMethod)

2020-09-27 05:09:07.991 Info HttpServer: HTTP Response 200 to 192.168.1.84. Time: 20041ms. http://192.168.1.128:18096/emby/Items/RemoteSearch/Series?X-Emby-Client=Emby Theater&X-Emby-Device-Name=DESKTOP-V4Q60JL&X-Emby-Device-Id=DESKTOP-V4Q60JL&X-Emby-Client-Version=3.0.11. ConnectionId: 0HM32K991OJG5
2020-09-27 05:09:25.023 Info HttpServer: HTTP POST http://192.168.1.128:18096/emby/Items/RemoteSearch/Apply/25313?ReplaceAllImages=true&X-Emby-Client=Emby Theater&X-Emby-Device-Name=DESKTOP-V4Q60JL&X-Emby-Device-Id=DESKTOP-V4Q60JL&X-Emby-Client-Version=3.0.11. UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) EmbyTheater/3.0.11 Chrome/80.0.3987.137 Electron/8.1.0 Safari/537.36
2020-09-27 05:09:25.026 Info App: Setting provider id's to item 25313-The Legend of Korra: {"Tvdb":"251085","Imdb":"tt1695360","Zap2It":"EP01547041"}
2020-09-27 05:09:25.045 Error App: Error in TheMovieDb
        *** Error Report ***
        Version: 4.5.0.50
        Command line: /system/EmbyServer.dll -programdata /config -ffdetect /bin/ffdetect -ffmpeg /bin/ffmpeg -ffprobe /bin/ffprobe -restartexitcode 3
        Operating system: Linux version 3.10.0-1127.18.2.el7.x86_64 (mockbuild@kbuilder.bsys.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC) ) #1 SMP Sun Jul 2
        Framework: .NET Core 3.1.7
        OS/Process: x64/x64
        Runtime: system/System.Private.CoreLib.dll
        Processor count: 4
        Data path: /config
        Application path: /system
        MediaBrowser.Model.Net.HttpException: MediaBrowser.Model.Net.HttpException: Cancelling connection to https://api.themoviedb.org/3/find/tt1695360?api_key=f6bd687ffa63cd282b6ff2c6877f2669&external_source=imdb_id 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.MovieDbProvider.GetMovieDbResponse(HttpRequestOptions options)
           at MovieDb.MovieDbSeriesProvider.FindByExternalId(String id, String externalSource, String providerIdKey, CancellationToken cancellationToken)
           at MovieDb.MovieDbSeriesProvider.GetMetadata(SeriesInfo info, CancellationToken cancellationToken)
           at MediaBrowser.Providers.Manager.MetadataService`2.ExecuteRemoteProviders(MetadataResult`1 temp, String logName, TIdType id, IEnumerable`1 providers, CancellationToken cancellationToken)
        Source: Emby.Server.Implementations
        TargetSite: Void MoveNext()

2020-09-27 05:09:25.344 Error App: Error in TheMovieDb
        *** Error Report ***
        Version: 4.5.0.50
        Command line: /system/EmbyServer.dll -programdata /config -ffdetect /bin/ffdetect -ffmpeg /bin/ffmpeg -ffprobe /bin/ffprobe -restartexitcode 3
        Operating system: Linux version 3.10.0-1127.18.2.el7.x86_64 (mockbuild@kbuilder.bsys.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC) ) #1 SMP Sun Jul 2
        Framework: .NET Core 3.1.7
        OS/Process: x64/x64
        Runtime: system/System.Private.CoreLib.dll
        Processor count: 4
        Data path: /config
        Application path: /system
        MediaBrowser.Model.Net.HttpException: MediaBrowser.Model.Net.HttpException: Cancelling connection to https://api.themoviedb.org/3/find/tt1695360?api_key=f6bd687ffa63cd282b6ff2c6877f2669&external_source=imdb_id 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.MovieDbProvider.GetMovieDbResponse(HttpRequestOptions options)
           at MovieDb.MovieDbSeriesProvider.FindByExternalId(String id, String externalSource, String providerIdKey, CancellationToken cancellationToken)
           at MovieDb.MovieDbSeriesProvider.GetMetadata(SeriesInfo info, CancellationToken cancellationToken)
           at MediaBrowser.Providers.Manager.MetadataService`2.ExecuteRemoteProviders(MetadataResult`1 temp, String logName, TIdType id, IEnumerable`1 providers, CancellationToken cancellationToken)
        Source: Emby.Server.Implementations
        TargetSite: Void MoveNext()

tvdb id.JPG

identify.JPG

 

is this a bug? or a known issue? i've even tried uninstall OMDB/MovieDB/TVDB plugins + reinstalling and no luck.

i do want to mention that it does seem to properly get the images/info of the show, but it's a bit worrying seeing the above exceptions

Edited by blei
Link to comment
Share on other sites

Hi, it looks like the requests are timing out and failing. No this is not a known issue. Are you using a vpn or anything else that might be blocking your connection to those domains?

Link to comment
Share on other sites

I am not using a VPN. I can also manually curl the moviedb URL from the logs.

 

Edit: I've noticed this with other shows and can confirm that I can also successfully retreive contents of URLs via wget within the container as well.

Edit 2: It probably doesn't make a big difference in mentioning this, but my Plex server seems to be able to load up images/etc just fine without any noticable exceptions.

Edited by blei
Link to comment
Share on other sites

The other possibility is that something is blocking the emby server process from sending those outgoing requests. Since you're on CentOS, would you mind trying our native package for that and seeing how it compares?

Link to comment
Share on other sites

I'd prefer to keep Emby in a container so that it'd be more easy to manage.

 

I've even tried disabling firewalld and the issue is still present, so I don't think that's the problem. I've even added my docker0 interface as a trusted network (restarted docker every time I made a firewalld change) but no dice.

 

 

Link to comment
Share on other sites

I tried to install it, but it failed to even start (permission issues with /var/log/emby/ even though I manually created the dir + chown'd it to emby:emby).

Could you perhaps configure a higher timeout for requests? Since again my server is able to eventually fetch the resource, it just seems like Emby's timeout is too short.

Edit also noticed this exception:

 

2020-09-28 06:42:34.275 Info HttpClient: GET https://assets.fanart.tv/fanart/tv/161511/tvthumb/shameless-us-5dc825d043b19.jpg
2020-09-28 06:42:34.793 Error HttpClient: Error getting response from https://assets.fanart.tv/fanart/tv/161511/tvthumb/shameless-us-5dc825d043b19.jpg
        *** Error Report ***
        Version: 4.5.0.50
        Command line: /system/EmbyServer.dll -programdata /config -ffdetect /bin/ffdetect -ffmpeg /bin/ffmpeg -ffprobe /bin/ffprobe -restartexitcode 3
        Operating system: Linux version 3.10.0-1127.19.1.el7.x86_64 (mockbuild@kbuilder.bsys.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC) ) #1 SMP Tue Aug 2
        Framework: .NET Core 3.1.7
        OS/Process: x64/x64
        Runtime: system/System.Private.CoreLib.dll
        Processor count: 4
        Data path: /config
        Application path: /system
        System.Net.Http.HttpRequestException: System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception.
         ---> System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure.
           at System.Net.Security.SslStream.StartSendAuthResetSignal(ProtocolToken message, AsyncProtocolRequest asyncRequest, ExceptionDispatchInfo exception)
           at System.Net.Security.SslStream.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
           at System.Net.Security.SslStream.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
           at System.Net.Security.SslStream.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)
           at System.Net.Security.SslStream.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
           at System.Net.Security.SslStream.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
           at System.Net.Security.SslStream.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
           at System.Net.Security.SslStream.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
           at System.Net.Security.SslStream.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)
           at System.Net.Security.SslStream.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
           at System.Net.Security.SslStream.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
           at System.Net.Security.SslStream.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
           at System.Net.Security.SslStream.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
           at System.Net.Security.SslStream.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)
           at System.Net.Security.SslStream.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
           at System.Net.Security.SslStream.PartialFrameCallback(AsyncProtocolRequest asyncRequest)
        --- End of stack trace from previous location where exception was thrown ---
           at System.Net.Security.SslStream.ThrowIfExceptional()
           at System.Net.Security.SslStream.InternalEndProcessAuthentication(LazyAsyncResult lazyResult)
           at System.Net.Security.SslStream.EndProcessAuthentication(IAsyncResult result)
           at System.Net.Security.SslStream.EndAuthenticateAsClient(IAsyncResult asyncResult)
           at System.Net.Security.SslStream.<>c.<AuthenticateAsClientAsync>b__65_1(IAsyncResult iar)
           at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
        --- End of stack trace from previous location where exception was thrown ---
           at System.Net.Http.ConnectHelper.EstablishSslConnectionAsyncCore(Stream stream, SslClientAuthenticationOptions sslOptions, CancellationToken cancellationToken)
           --- End of inner exception stack trace ---
           at System.Net.Http.ConnectHelper.EstablishSslConnectionAsyncCore(Stream stream, SslClientAuthenticationOptions sslOptions, CancellationToken cancellationToken)
           at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean allowHttp2, CancellationToken cancellationToken)
           at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken)
           at System.Net.Http.HttpConnectionPool.GetHttpConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken)
           at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean doRequestAuth, CancellationToken cancellationToken)
           at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
           at System.Net.Http.DecompressionHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
           at System.Net.Http.DiagnosticsHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
           at System.Net.Http.HttpClient.FinishSendAsyncUnbuffered(Task`1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts)
           at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.SendAsyncInternal(HttpRequestOptions options, String httpMethod)
        Source: System.Net.Http
        TargetSite: Void MoveNext()
        InnerException: System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure.
        Source: System.Private.CoreLib
        TargetSite: Void Throw()
           at System.Net.Security.SslStream.StartSendAuthResetSignal(ProtocolToken message, AsyncProtocolRequest asyncRequest, ExceptionDispatchInfo exception)
           at System.Net.Security.SslStream.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
           at System.Net.Security.SslStream.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
           at System.Net.Security.SslStream.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)
           at System.Net.Security.SslStream.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
           at System.Net.Security.SslStream.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
           at System.Net.Security.SslStream.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
           at System.Net.Security.SslStream.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
           at System.Net.Security.SslStream.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)
           at System.Net.Security.SslStream.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
           at System.Net.Security.SslStream.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
           at System.Net.Security.SslStream.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
           at System.Net.Security.SslStream.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
           at System.Net.Security.SslStream.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)
           at System.Net.Security.SslStream.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
           at System.Net.Security.SslStream.PartialFrameCallback(AsyncProtocolRequest asyncRequest)
        --- End of stack trace from previous location where exception was thrown ---
           at System.Net.Security.SslStream.ThrowIfExceptional()
           at System.Net.Security.SslStream.InternalEndProcessAuthentication(LazyAsyncResult lazyResult)
           at System.Net.Security.SslStream.EndProcessAuthentication(IAsyncResult result)
           at System.Net.Security.SslStream.EndAuthenticateAsClient(IAsyncResult asyncResult)
           at System.Net.Security.SslStream.<>c.<AuthenticateAsClientAsync>b__65_1(IAsyncResult iar)
           at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
        --- End of stack trace from previous location where exception was thrown ---
           at System.Net.Http.ConnectHelper.EstablishSslConnectionAsyncCore(Stream stream, SslClientAuthenticationOptions sslOptions, CancellationToken cancellationToken)

 

Edited by blei
Link to comment
Share on other sites

  emby:
    container_name: emby
    image: emby/embyserver:latest
    restart: always
    network_mode: host
    devices:
      - /dev/dri:/dev/dri
    environment:
      UID: 1001
      GID: 1001
      GIDLIST: 39
    volumes:
      - /home/<user>/.emby:/config
      - /home/<user>/data:/mnt/share:ro

 

Link to comment
Share on other sites

Ok to give an update:

I think the issue was with my ISP/router, but not sure how/why. I restarted it and then retried refreshing metadata/images and did not observe any issues (and it was able to finally successfully fetch the images and stuff).

 

Some additional info:

I use ATT router 5268AC, which I was able to eventually find https://github.com/metekamil/ATT-Uverse-Automated-Router-Rebooter from some other post that basically states that this specific router is faulty (network lag slowly increases).

 

So I guess technically, increasing the timeout would be a short term solution, but may still get worse overtime.

Edited by blei
adding more info from my investigations
Link to comment
Share on other sites

btw i have excatly the same issue but using docker (official emby container) on debian.

I can ping from inside the docker container to www.google.de so dns and internet is working. I Also restarted the router but this is not helping.

 

Link to comment
Share on other sites

37 minutes ago, Amtho said:

btw i have excatly the same issue but using docker (official emby container) on debian.

I can ping from inside the docker container to www.google.de so dns and internet is working. I Also restarted the router but this is not helping.

 

Hi there, please attach the emby server log. Thanks.

Link to comment
Share on other sites

On 10/2/2020 at 5:02 PM, Amtho said:

already done: 

 

 

Yes resolved your issue in your own topic, which turned out to be related to your Docker container configuration and not related to what's happening here. Thanks !

Link to comment
Share on other sites

On 9/30/2020 at 3:55 AM, blei said:

Ok to give an update:

I think the issue was with my ISP/router, but not sure how/why. I restarted it and then retried refreshing metadata/images and did not observe any issues (and it was able to finally successfully fetch the images and stuff).

 

Some additional info:

I use ATT router 5268AC, which I was able to eventually find https://github.com/metekamil/ATT-Uverse-Automated-Router-Rebooter from some other post that basically states that this specific router is faulty (network lag slowly increases).

 

So I guess technically, increasing the timeout would be a short term solution, but may still get worse overtime.

@blei yes this is possible but are you saying you don't think the current 20 seconds is sufficient?

Link to comment
Share on other sites

  • 3 weeks later...

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...