Jump to content

Manually Download Open Subtitles Not Working (Country Restriction)


Go to solution Solved by Luke,

Recommended Posts

Posted (edited)

Hello,

I've been trying to get OpenSubtitles working for a while, but can't seem to get it to work. Emby seems able to download images and update the tvdb database easily but when using the OpenSubtitle plugin and doing a manually search I get in the logs.

 

I'm running a 64bit Synology system with Emby version 4.5.4.0.

I can see it's getting a Error getting response from https://api.opensubtitles.org/xml-rpc

System.Net.Http.HttpRequestException: System.Net.Http.HttpRequestException: No route to host

2021-04-25 13:10:18.882 Info HttpClient: POST https://api.opensubtitles.org/xml-rpc
2021-04-25 13:10:18.924 Error HttpClient: Error getting response from https://api.opensubtitles.org/xml-rpc
    *** Error Report ***
    Version: 4.5.4.0
    Command line: /volume4/@appstore/EmbyServer/system/EmbyServer.dll -programdata /volume4/Emby -ffdetect /var/packages/EmbyServer/target/bin/ffdetect -ffmpeg /var/packages/EmbyServer/target/bin/ffmpeg -ffprobe /var/packages/EmbyServer/target/bin/ffprobe -nolocalportconfig -ignore_vaapi_enabled_flag -updatepackage emby-server-synology_{version}_x86_64.spk
    Operating system: Linux version 3.10.105 (root@build3) (gcc version 4.9.3 20150311 (prerelease) (crosstool-NG 1.20.0) ) #25556 SMP Thu Mar 18 12:58:52 CST 2021
    Framework: .NET Core 3.1.8
    OS/Process: x64/x64
    Runtime: volume4/@appstore/EmbyServer/system/System.Private.CoreLib.dll
    Processor count: 8
    Data path: /volume4/Emby
    Application path: /volume4/@appstore/EmbyServer/system
    System.Net.Http.HttpRequestException: System.Net.Http.HttpRequestException: No route to host
     ---> System.Net.Sockets.SocketException (113): No route to host
       at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)
       --- End of inner exception stack trace ---
       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.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.Net.Sockets.SocketException: No route to host
    Source: System.Private.CoreLib
    TargetSite: Void Throw()
       at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)
    
2021-04-25 13:10:18.925 Error SubtitleManager: Error downloading subtitles from Open Subtitles
    *** Error Report ***
    Version: 4.5.4.0
    Command line: /volume4/@appstore/EmbyServer/system/EmbyServer.dll -programdata /volume4/Emby -ffdetect /var/packages/EmbyServer/target/bin/ffdetect -ffmpeg /var/packages/EmbyServer/target/bin/ffmpeg -ffprobe /var/packages/EmbyServer/target/bin/ffprobe -nolocalportconfig -ignore_vaapi_enabled_flag -updatepackage emby-server-synology_{version}_x86_64.spk
    Operating system: Linux version 3.10.105 (root@build3) (gcc version 4.9.3 20150311 (prerelease) (crosstool-NG 1.20.0) ) #25556 SMP Thu Mar 18 12:58:52 CST 2021
    Framework: .NET Core 3.1.8
    OS/Process: x64/x64
    Runtime: volume4/@appstore/EmbyServer/system/System.Private.CoreLib.dll
    Processor count: 8
    Data path: /volume4/Emby
    Application path: /volume4/@appstore/EmbyServer/system
    System.Net.Http.HttpRequestException: System.Net.Http.HttpRequestException: No route to host
     ---> System.Net.Sockets.SocketException (113): No route to host
       at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)
       --- 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 OpenSubtitles.OpenSubtitleDownloader.SendRequestAsync(ReadOnlyMemory`1 request, CancellationToken cancellationToken)
       at OpenSubtitles.OpenSubtitleDownloader.Login(CancellationToken cancellationToken)
       at OpenSubtitles.OpenSubtitleDownloader.Search(SubtitleSearchRequest request, CancellationToken cancellationToken)
       at MediaBrowser.Providers.Subtitles.SubtitleManager.<>c__DisplayClass17_0.<<SearchSubtitles>b__3>d.MoveNext()
    Source: System.Net.Http
    TargetSite: Void MoveNext()
    InnerException: System.Net.Sockets.SocketException: No route to host
    Source: System.Private.CoreLib
    TargetSite: Void Throw()
       at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)

 

This error happens when I search for Subtitles Manually when it's playing.

image.png.1229cea32f4ecde94b1922b4140ebe3d.png

 

I can access the endpoint fine, and even logged into the linux terminal logged in as the Emby user and could hit that url. I can't work out why Emby can access all the other end points but fails on https://api.opensubtitles.org/xml-rpc.

 

The version of Open Subtitle installed is 1.0.27.0

image.png.ceb6798acb029e45a57ca3dbf463192e.png

 

I can hit the endpoint fine in a browser.

image.png.24bcb27b8f0804954a8d4794b7ff1acf.png

 

Thanks, if anyone has any guesses.

Edited by access
rbjtech
Posted (edited)

You have done a thorough investigation and eliminated all the obvious issues - so don't beat yourself up ;)

The error message is clearly point to a networking issue - but as proven by your tests, you can get to the URL just fine outside of emby/ the plugin.

Looking at the actual DNS IP resolution of api.opensubtitles.org - 172.67.72.143 is one of the 3 IP's...

Now, I know there has been some other topic on Emby classing any 172 address as 'local and not 'wan' (incorrectly, as the above IP is not an RFC1918 address).

So I'm thinking - if you can add a local host entry for api.opensubtitles.org to resolve to either of the other IP's (104.26.8/9.126) then it may solve the immediate issue.

If this does work - then the Dev team will need to look at this synology build, as it's classing 172.67.72.143 as local perhaps.

It may be totally unrelated of course, but this is ringing alarm bells ...

 

Edited by rbjtech
  • Like 1
  • Solution
Posted

Hi, it looks like something is blocking emby server from accessing that domain. Is OpenSubtitles blocked in your country? I know they are getting banned in many places now.

  • Thanks 1
Posted

Thanks for the feedback.

  • Like 1
rbjtech
Posted

"I can access the endpoint fine, and even logged into the linux terminal logged in as the Emby user and could hit that url. I can't work out why Emby can access all the other end points but fails on https://api.opensubtitles.org/xml-rpc."

Glad this is fixed, but your comment above now doesn't make sense - you said you could get to the site from the synology... if the DNS was blocked, then this should not have worked either .. 

 

 

 

Posted

Probably was tested from a PC not the Synology which had the updated DNS server.  That would be my guess.

  • 4 weeks later...
Posted
On 4/26/2021 at 6:37 PM, rbjtech said:

"I can access the endpoint fine, and even logged into the linux terminal logged in as the Emby user and could hit that url. I can't work out why Emby can access all the other end points but fails on https://api.opensubtitles.org/xml-rpc."

Glad this is fixed, but your comment above now doesn't make sense - you said you could get to the site from the synology... if the DNS was blocked, then this should not have worked either .. 

 

 

 

Yeah the missing piece of the puzzle is I have multiple NIC's in my Server.

The one I ssh on internally, is not the one Emby goes out on.  Only the "primary" one I had set to Google DNS not the one dedicated to Emby traffic.

  • Thanks 1
rbjtech
Posted

Ah that makes sense - thanks for taking the time to explain. 👍

  • 1 year later...
kbaggen
Posted

Thanks, had same issue, and apprently have back in days open PC for DNS 8..8.8.8, but not the Synology........!

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