Jump to content

Emby fails to make https connections to external servers


Recommended Posts

Posted

After updating from 3.x to 4.0.3.0, my Emby server fails to connect to most of the external servers.

 

Not sure exactly which version started causing this, because I have updated emby several times before noticing this bug. But I am sure it started after 4.0.x

 

update checking, metadata downloading are all broken.

 

When I inspect embyserver log I get the following:

 

2019-12-02 00:26:08.851 Error HttpClient: Connection to https://image.tmdb.org/t/p/original/9YAVIwBcBrLXeukg2dgMGfYB1uu.jpg timed out
2019-12-02 00:26:08.851 Error HttpServer: Error processing request
    *** Error Report ***
    Version: 4.3.0.30
    Command line: C:\Users\Administrator\AppData\Roaming\Emby-Server\system\EmbyServer.dll
    Operating system: Microsoft Windows NT 6.1.7601 Service Pack 1
    64-Bit OS: True
    64-Bit Process: True
    User Interactive: True
    Runtime: file:///C:/Users/Administrator/AppData/Roaming/Emby-Server/system/System.Private.CoreLib.dll
    Processor count: 8
    Program data path: C:\Users\Administrator\AppData\Roaming\Emby-Server\programdata
    Application directory: C:\Users\Administrator\AppData\Roaming\Emby-Server\system
    MediaBrowser.Model.Net.HttpException: MediaBrowser.Model.Net.HttpException: Connection to https://image.tmdb.org/t/p/original/9YAVIwBcBrLXeukg2dgMGfYB1uu.jpg timed out
     ---> System.Threading.Tasks.TaskCanceledException: A task was canceled.
       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.HttpClient.FinishSendAsyncUnbuffered(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 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, CancellationToken cancellationToken)
       at Emby.Drawing.ImageProcessor.ProcessImage(ImageProcessingOptions options, CancellationToken cancellationToken)
       at MediaBrowser.Api.Images.ImageService.GetImage(ImageRequest request, Int64 itemId, BaseItem item, Boolean isHeadRequest)
       at Emby.Server.Implementations.Services.ServiceController.GetTaskResult(Task task)
       at Emby.Server.Implementations.Services.ServiceHandler.ProcessRequestAsync(HttpListenerHost appHost, IRequest httpReq, IResponse httpRes, RestPath restPath, String responseContentType, CancellationToken cancellationToken)
       at Emby.Server.Implementations.HttpServer.HttpListenerHost.RequestHandler(IRequest httpReq, ReadOnlyMemory`1 urlString, ReadOnlyMemory`1 localPath, CancellationToken cancellationToken)
    Source: Emby.Server.Implementations
    TargetSite: Void MoveNext()
    InnerException: System.Threading.Tasks.TaskCanceledException: A task was canceled.
    Source: System.Private.CoreLib
    TargetSite: Void ThrowForNonSuccess(System.Threading.Tasks.Task)
       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.HttpClient.FinishSendAsyncUnbuffered(Task`1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts)
       at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.SendAsyncInternal(HttpRequestOptions options, String httpMethod)

 

If I just visit the link in my browser it works just fine.

Posted

Hi there, can you make sure you don't have anything blocking emby from making those connections, such as firewall, security software, vpn, etc. Thanks.

Posted

Hi there, can you make sure you don't have anything blocking emby from making those connections, such as firewall, security software, vpn, etc. Thanks.

 

Yes, I just checked that the same thing happenes with the firewall completely off.

Posted

Also I noticed that I get

 

 

    *** Error Report ***
    Version: 4.3.0.30
    Command line: C:\Users\Administrator\AppData\Roaming\Emby-Server\system\EmbyServer.dll
    Operating system: Microsoft Windows NT 6.1.7601 Service Pack 1
    64-Bit OS: True
    64-Bit Process: True
    User Interactive: True
    Runtime: file:///C:/Users/Administrator/AppData/Roaming/Emby-Server/system/System.Private.CoreLib.dll
    Processor count: 8
    Program data path: C:\Users\Administrator\AppData\Roaming\Emby-Server\programdata
    Application directory: C:\Users\Administrator\AppData\Roaming\Emby-Server\system
    System.EntryPointNotFoundException: System.EntryPointNotFoundException: Unable to find an entry point named 'CreateDXGIFactory2' in DLL 'dxgi.dll'.
       at SharpDX.DXGI.DXGI.CreateDXGIFactory2(Int32 flags, Guid riid, IntPtr& factoryOut)
       at SharpDX.DXGI.Factory2..ctor(Boolean debug)
       at Emby.Codecs.Dxva.Detection.MainDetectorDX11..ctor(ILogger logger, List`1 codecList)
       at Emby.Codecs.Dxva.Dx11VaCodecProvider.GetCodecList()
    Source: SharpDX.DXGI
    TargetSite: Void CreateDXGIFactory2(Int32, System.Guid, IntPtr ByRef)

 

While starting the server.

Posted

Yes, I just checked that the same thing happenes with the firewall completely off.

 

Do you have any security software or a VPN? I can only tell you what I am seeing. I can't tell you why this is happening as that is specific to your local environment, but I can help you with common reasons why it might occur.

Posted (edited)

A network 'time out' suggests a routing issue.

 

Cut and paste those https links into your browser - if they do not work, then that is why emby is not working either.

 

ie

 

https://image.tmdb.org/t/p/original/9YAVIwBcBrLXeukg2dgMGfYB1uu.jpg

 

To note - the above works fine for me - so I think you have network issues.

Edited by rbjtech
Posted

Yes that's a good thing to try, and if it does work, then it suggests you have something blocking emby server from making those connections, such as firewall, security software, or vpn. Thanks !

Posted

If I just visit the link in my browser it works just fine.

 

I already stated that other connections from the same computer is confirmed working...

 

I am a bit too occupied at the moment, but anyway I will try reverting to previous version and update the post.

Posted

then it suggests you have something blocking emby server from making those connections, such as firewall, security software, or vpn.

Posted

then it suggests you have something blocking emby server from making those connections, such as firewall, security software, or vpn.

 

 

I've done some tests. I kept uninstalling and reinstalling until I found a working version. I can confirm that it is Emby problem.

 

Last working version is 4.1.1.0.

 

The bug starts with 4.2.0.40

 

 

I am using Windows Server 2008 R2 as host.

Posted

Are you behind a vpn?

Posted

Are you behind a vpn?

 

No, it is safe to assume that all network related possibilities have been ruled out.

Happy2Play
Posted

So are you saying all requests are timing out or just some?  But I know I don't see any of the image time outs from TMDB, but don't use Windows 7 either if that is relevant.  WHS 2011 and Windows 10

Posted

So are you saying all requests are timing out or just some?  But I know I don't see any of the image time outs from TMDB, but don't use Windows 7 either if that is relevant.  WHS 2011 and Windows 10

 

All requests seem to be timing out.

Posted

I disabled IPv6 from all installed ethernet adapters, but it did not work...

 

I'm really thinking that has to be the issue because I saw it on one machine as well.  As soon as I disabled IPv6 on the server's adapter, the problem went away.  Are you sure you got that disabled on the server?  Did you try restarting after that?

Posted

I'm really thinking that has to be the issue because I saw it on one machine as well.  As soon as I disabled IPv6 on the server's adapter, the problem went away.  Are you sure you got that disabled on the server?  Did you try restarting after that?

 

Still same after a reboot

Posted

I fired up Wireshark to see what is happening,

 

It seems that Emby doesn't even send any packets to the server.

EmbyServer queries DNS for server ip address, then it doesn't start any sort of connection to the server, waits about a minute then fails with timeout error.

Posted

So does it get a DNS response ?

Posted

So does it get a DNS response ?

 

Yes it does get a DNS response

Posted

Yes it does get a DNS response

 

ok.   Have you tried a fresh install ideally on another machine - or even the same machine if using the portable version (obviously setup to use a different port) ?

 

This must be a machine/infrastructure specific problem or there would be 1000's of issues being reported...

Posted (edited)

ok.   Have you tried a fresh install ideally on another machine - or even the same machine if using the portable version (obviously setup to use a different port) ?

 

This must be a machine/infrastructure specific problem or there would be 1000's of issues being reported...

 

I already stated that I've tested many different versions:

 

versions before 4.1.1.0 work flawlessly

versions after 4.2.0.40 have this problem

even the initial setup takes a long time because it waits for a response from Emby update server (which eventually times out).

Edited by manatails
Posted

I already stated that I've tested many different versions:

 

versions before 4.1.1.0 work flawlessly

versions after 4.2.0.40 have this problem

even the initial setup takes a long time because it waits for a response from Emby update server (which eventually times out).

 

This points to it being related to .net upgrades within our product.  So, be sure you have the latest .Net installed.

 

I know the IPv6 problem is likely a .Net issue introduced in one of their upgrades.

Posted

Try disabling ipv6 in your router.

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