Can't connect to OZnzb anymore

Sonarr version (exact version): 2.0.0.5338
Mono version (if Sonarr is not running on Windows):
OS: Windows 10 64-bit
Debug logs:
Description of issue: Sometime in the last few weeks Sonarr has stopped connecting to OZnzb. It worked fine for months – years, actually – but now seems to have broken. Here’s the relevant error message:

Message: Unable to connect to indexer: Failed to read complete http response

Exception:

System.Net.WebException: Failed to read complete http response ---> System.IO.IOException: Received an unexpected EOF or 0 bytes from the transport stream.
   at System.Net.ConnectStream.Read(Byte[] buffer, Int32 offset, Int32 size)
   at NzbDrone.Common.Extensions.StreamExtensions.ToBytes(Stream input) in M:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Common\Extensions\StreamExtensions.cs:line 13
   at NzbDrone.Common.Http.Dispatchers.ManagedHttpDispatcher.GetResponse(HttpRequest request, CookieContainer cookies) in M:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Common\Http\Dispatchers\ManagedHttpDispatcher.cs:line 130
   --- End of inner exception stack trace ---
   at NzbDrone.Common.Http.Dispatchers.ManagedHttpDispatcher.GetResponse(HttpRequest request, CookieContainer cookies) in M:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Common\Http\Dispatchers\ManagedHttpDispatcher.cs:line 147
   at NzbDrone.Common.Http.Dispatchers.FallbackHttpDispatcher.GetResponse(HttpRequest request, CookieContainer cookies) in M:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Common\Http\Dispatchers\FallbackHttpDispatcher.cs:line 53
   at NzbDrone.Common.Http.HttpClient.ExecuteRequest(HttpRequest request, CookieContainer cookieContainer) in M:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Common\Http\HttpClient.cs:line 121
   at NzbDrone.Common.Http.HttpClient.Execute(HttpRequest request) in M:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Common\Http\HttpClient.cs:line 57
   at NzbDrone.Core.Indexers.HttpIndexerBase`1.FetchIndexerResponse(IndexerRequest request) in M:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Core\Indexers\HttpIndexerBase.cs:line 321
   at NzbDrone.Core.Indexers.HttpIndexerBase`1.FetchPage(IndexerRequest request, IParseIndexerResponse parser) in M:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Core\Indexers\HttpIndexerBase.cs:line 298
   at NzbDrone.Core.Indexers.HttpIndexerBase`1.TestConnection() in M:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Core\Indexers\HttpIndexerBase.cs:line 334
1 Like

I too have had issues. I logged into my OZnzb account and noticed a change in the API URL from my original. The new API URL is https://legendapi.oznzb.com (I’m a “Legend” member). I made sure that my key was correct. I again tested my connection and it ends with an error. I look at my logs and see the following error: System.Xml.XmlException: There is an unclosed literal string. Line 2144, position 14. I’ve tested it several times and each time, the line number and position are different, but it is essentially the same error.

Same for me.

System.Net.WebException: Failed to read complete http response ---> System.IO.IOException: Received an unexpected EOF or 0 bytes from the transport stream.
   at System.Net.ConnectStream.Read(Byte[] buffer, Int32 offset, Int32 size)
   at NzbDrone.Common.Extensions.StreamExtensions.ToBytes(Stream input) in M:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Common\Extensions\StreamExtensions.cs:line 13
   at NzbDrone.Common.Http.Dispatchers.ManagedHttpDispatcher.GetResponse(HttpRequest request, CookieContainer cookies) in M:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Common\Http\Dispatchers\ManagedHttpDispatcher.cs:line 130
   --- End of inner exception stack trace ---
   at NzbDrone.Common.Http.Dispatchers.ManagedHttpDispatcher.GetResponse(HttpRequest request, CookieContainer cookies) in M:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Common\Http\Dispatchers\ManagedHttpDispatcher.cs:line 147
   at NzbDrone.Common.Http.Dispatchers.FallbackHttpDispatcher.GetResponse(HttpRequest request, CookieContainer cookies) in M:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Common\Http\Dispatchers\FallbackHttpDispatcher.cs:line 53
   at NzbDrone.Common.Http.HttpClient.ExecuteRequest(HttpRequest request, CookieContainer cookieContainer) in M:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Common\Http\HttpClient.cs:line 121
   at NzbDrone.Common.Http.HttpClient.Execute(HttpRequest request) in M:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Common\Http\HttpClient.cs:line 57
   at NzbDrone.Common.Http.HttpClient.Get(HttpRequest request) in M:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Common\Http\HttpClient.cs:line 264
   at NzbDrone.Core.Indexers.Newznab.NewznabCapabilitiesProvider.FetchCapabilities(NewznabSettings indexerSettings) in M:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Core\Indexers\Newznab\NewznabCapabilitiesProvider.cs:line 62
   at NzbDrone.Core.Indexers.Newznab.NewznabCapabilitiesProvider.<>c__DisplayClass4_0.<GetCapabilities>b__0() in M:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Core\Indexers\Newznab\NewznabCapabilitiesProvider.cs:line 35
   at NzbDrone.Common.Cache.Cached`1.Get(String key, Func`1 function, Nullable`1 lifeTime) in M:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Common\Cache\Cached.cs:line 81
   at NzbDrone.Core.Indexers.Newznab.NewznabCapabilitiesProvider.GetCapabilities(NewznabSettings indexerSettings) in M:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Core\Indexers\Newznab\NewznabCapabilitiesProvider.cs:line 35
   at NzbDrone.Core.Indexers.Newznab.Newznab.get_PageSize() in M:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Core\Indexers\Newznab\Newznab.cs:line 23
   at NzbDrone.Core.Indexers.Newznab.Newznab.GetRequestGenerator() in M:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Core\Indexers\Newznab\Newznab.cs:line 27
   at NzbDrone.Core.Indexers.HttpIndexerBase`1.TestConnection() in M:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Core\Indexers\HttpIndexerBase.cs:line 334

Same for me.

System.Net.WebException: Failed to read complete http response ---> System.Net.WebException: Remote prematurely closed connection. ---> System.IO.IOException: Remote prematurely closed connection.
  at Mono.Net.Security.AsyncProtocolRequest.ProcessOperation (System.Threading.CancellationToken cancellationToken) [0x000e7] in /spksrc/native/mono/work-native/mono-5.18.0.240/mcs/class/System/Mono.Net.Security/AsyncProtocolRequest.cs:210 
  at Mono.Net.Security.AsyncProtocolRequest.StartOperation (System.Threading.CancellationToken cancellationToken) [0x00046] in /spksrc/native/mono/work-native/mono-5.18.0.240/mcs/class/System/Mono.Net.Security/AsyncProtocolRequest.cs:187 
  at Mono.Net.Security.MobileAuthenticatedStream.StartOperation (Mono.Net.Security.MobileAuthenticatedStream+OperationType type, Mono.Net.Security.AsyncProtocolRequest asyncRequest, System.Threading.CancellationToken cancellationToken) [0x00245] in /spksrc/native/mono/work-native/mono-5.18.0.240/mcs/class/System/Mono.Net.Security/MobileAuthenticatedStream.cs:525 
  at System.Net.BufferedReadStream.ProcessReadAsync (System.Byte[] buffer, System.Int32 offset, System.Int32 size, System.Threading.CancellationToken cancellationToken) [0x00107] in /spksrc/native/mono/work-native/mono-5.18.0.240/mcs/class/System/System.Net/BufferedReadStream.cs:64 
  at System.Net.WebReadStream.ReadAsync (System.Byte[] buffer, System.Int32 offset, System.Int32 size, System.Threading.CancellationToken cancellationToken) [0x0018c] in /spksrc/native/mono/work-native/mono-5.18.0.240/mcs/class/System/System.Net/WebReadStream.cs:186 
  at System.Net.MonoChunkStream.ProcessReadAsync (System.Byte[] buffer, System.Int32 offset, System.Int32 size, System.Threading.CancellationToken cancellationToken) [0x000d4] in /spksrc/native/mono/work-native/mono-5.18.0.240/mcs/class/System/System.Net/MonoChunkStream.cs:73 
  at System.Net.WebReadStream.ReadAsync (System.Byte[] buffer, System.Int32 offset, System.Int32 size, System.Threading.CancellationToken cancellationToken) [0x0018c] in /spksrc/native/mono/work-native/mono-5.18.0.240/mcs/class/System/System.Net/WebReadStream.cs:186 
   --- End of inner exception stack trace ---
  at System.Net.HttpWebRequest.RunWithTimeoutWorker[T] (System.Threading.Tasks.Task`1[TResult] workerTask, System.Int32 timeout, System.Action abort, System.Func`1[TResult] aborted, System.Threading.CancellationTokenSource cts) [0x000e8] in /spksrc/native/mono/work-native/mono-5.18.0.240/mcs/class/System/System.Net/HttpWebRequest.cs:956 
  at System.Net.WebConnectionStream.Read (System.Byte[] buffer, System.Int32 offset, System.Int32 count) [0x00070] in /spksrc/native/mono/work-native/mono-5.18.0.240/mcs/class/System/System.Net/WebConnectionStream.cs:131 
  at NzbDrone.Common.Extensions.StreamExtensions.ToBytes (System.IO.Stream input) [0x0001c] in M:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Common\Extensions\StreamExtensions.cs:13 
  at NzbDrone.Common.Http.Dispatchers.ManagedHttpDispatcher.GetResponse (NzbDrone.Common.Http.HttpRequest request, System.Net.CookieContainer cookies) [0x00218] in M:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Common\Http\Dispatchers\ManagedHttpDispatcher.cs:130 
   --- End of inner exception stack trace ---
  at NzbDrone.Common.Http.Dispatchers.ManagedHttpDispatcher.GetResponse (NzbDrone.Common.Http.HttpRequest request, System.Net.CookieContainer cookies) [0x002a1] in M:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Common\Http\Dispatchers\ManagedHttpDispatcher.cs:147 
  at NzbDrone.Common.Http.Dispatchers.FallbackHttpDispatcher.GetResponse (NzbDrone.Common.Http.HttpRequest request, System.Net.CookieContainer cookies) [0x0003c] in M:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Common\Http\Dispatchers\FallbackHttpDispatcher.cs:35 
  at NzbDrone.Common.Http.HttpClient.ExecuteRequest (NzbDrone.Common.Http.HttpRequest request, System.Net.CookieContainer cookieContainer) [0x0007e] in M:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Common\Http\HttpClient.cs:121 
  at NzbDrone.Common.Http.HttpClient.Execute (NzbDrone.Common.Http.HttpRequest request) [0x00008] in M:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Common\Http\HttpClient.cs:57 
  at NzbDrone.Core.Indexers.HttpIndexerBase`1[TSettings].FetchIndexerResponse (NzbDrone.Core.Indexers.IndexerRequest request) [0x0004b] in M:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Core\Indexers\HttpIndexerBase.cs:321 
  at NzbDrone.Core.Indexers.HttpIndexerBase`1[TSettings].FetchPage (NzbDrone.Core.Indexers.IndexerRequest request, NzbDrone.Core.Indexers.IParseIndexerResponse parser) [0x00000] in M:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Core\Indexers\HttpIndexerBase.cs:298 
  at NzbDrone.Core.Indexers.HttpIndexerBase`1[TSettings].TestConnection () [0x0000e] in M:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Core\Indexers\HttpIndexerBase.cs:335

This is not an issue with Sonarr, but with OzNZB, their API is having issues on and off.

1 Like

Good to know. I’ll direct my efforts elsewhere.
Having said that, other programs using the same OZnzb API (Couch Potato, for example) still work just fine. Apparently it broke one client but not the other?

It’s sporadically working and if it’s failing more often than it’s working Sonarr will disable it for up to 24 hours.

Sure enough, OZnzb seems to have fixed its problems and now Sonarr is working again.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.