Newznab Indexer Error - Error: SecureChannelFailure (Object reference not set to an instance of an object) ---> System.NullReferenceException: Object reference not set to an instance of an object


#1

Sonarr version 2.0.0.4753:
Mono version 5.0.0:
OS: CentOS 7.3:

I started noticing this error with Radarr today and then I had a thought to check with Sonarr. It was still working but when I restarted the Sonarr service (CentOS 7.3), it too stopped working. I recalled that a recent yum update included an upgrade to mono. First tried rebooting my OS hoping it would resolve something (library dependency or such) but no luck. Then I started digging for the mono update in yum history and rolled it back. Success, Radarr and Sonarr working again…

Debug log (sonarr.txt) when clicking on “Test” for a specific NZB index, but two different sites I use are failing so I knew it had to be a local issue. I think it may be related TLS versioning support, maybe this version no longer supports TLS v1.0? I did some googling to find other examples of this SecureChannelFailure messages but not many developers seem to use mono…

17-5-17 10:34:49.6|Warn|Newznab|Unable to connect to indexer

[v2.0.0.4753] System.Net.WebException: Error: SecureChannelFailure (Object reference not set to an instance of an object) —> System.NullReferenceException: Object reference not set to an instance of an object
at (wrapper managed-to-native) Mono.Btls.MonoBtlsSslCtx:mono_btls_ssl_ctx_new ()
at Mono.Btls.MonoBtlsSslCtx…ctor () [0x00000] in <443b64479cca4b0cb2d2b62eaf14a230>:0
at Mono.Btls.MonoBtlsContext.InitializeConnection () [0x00000] in <443b64479cca4b0cb2d2b62eaf14a230>:0
at Mono.Btls.MonoBtlsContext.StartHandshake () [0x00000] in <443b64479cca4b0cb2d2b62eaf14a230>:0
at Mono.Net.Security.MobileAuthenticatedStream.ProcessHandshake (Mono.Net.Security.AsyncProtocolRequest asyncRequest, Mono.Net.Security.AsyncOperationStatus status) [0x00004] in <443b64479cca4b0cb2d2b62eaf14a230>:0
at Mono.Net.Security.AsyncProtocolRequest.ProcessOperation (Mono.Net.Security.AsyncOperationStatus status) [0x0006b] in <443b64479cca4b0cb2d2b62eaf14a230>:0
at Mono.Net.Security.AsyncProtocolRequest.ProcessOperation () [0x0000d] in <443b64479cca4b0cb2d2b62eaf14a230>:0
at Mono.Net.Security.AsyncProtocolRequest.StartOperation () [0x0003c] in <443b64479cca4b0cb2d2b62eaf14a230>:0
at Mono.Net.Security.AsyncProtocolRequest.StartOperation (Mono.Net.Security.AsyncOperation operation) [0x00024] in <443b64479cca4b0cb2d2b62eaf14a230>:0
at Mono.Net.Security.MobileAuthenticatedStream.ProcessAuthentication (System.Net.LazyAsyncResult lazyResult) [0x00057] in <443b64479cca4b0cb2d2b62eaf14a230>:0
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <8e4c7b80ba0942cb8aa6c8f9f3e5b12d>:0
at Mono.Net.Security.MobileAuthenticatedStream.ProcessAuthentication (System.Net.LazyAsyncResult lazyResult) [0x00078] in <443b64479cca4b0cb2d2b62eaf14a230>:0
at Mono.Net.Security.MobileAuthenticatedStream.AuthenticateAsClient (System.String targetHost, System.Security.Cryptography.X509Certificates.X509CertificateCollection clientCertificates, System.Security.Authentication.SslProtocols enabledSslProtocols, System.Boolean checkCertificateRevocation) [0x0000c] in <443b64479cca4b0cb2d2b62eaf14a230>:0
at Mono.Net.Security.Private.MonoSslStreamWrapper.AuthenticateAsClient (System.String targetHost, System.Security.Cryptography.X509Certificates.X509CertificateCollection clientCertificates, System.Security.Authentication.SslProtocols enabledSslProtocols, System.Boolean checkCertificateRevocation) [0x00006] in <443b64479cca4b0cb2d2b62eaf14a230>:0
at Mono.Net.Security.MonoTlsStream.CreateStream (System.Byte[] buffer) [0x0007b] in <443b64479cca4b0cb2d2b62eaf14a230>:0
at System.Net.WebConnection.CreateStream (System.Net.HttpWebRequest request) [0x00073] in <443b64479cca4b0cb2d2b62eaf14a230>:0
— End of inner exception stack trace —
at System.Net.HttpWebRequest.EndGetResponse (System.IAsyncResult asyncResult) [0x00058] in <443b64479cca4b0cb2d2b62eaf14a230>:0
at System.Net.HttpWebRequest.GetResponse () [0x0000e] in <443b64479cca4b0cb2d2b62eaf14a230>:0
at NzbDrone.Common.Http.Dispatchers.ManagedHttpDispatcher.GetResponse (NzbDrone.Common.Http.HttpRequest request, System.Net.CookieContainer cookies) [0x0012d] in :0
at NzbDrone.Common.Http.Dispatchers.FallbackHttpDispatcher.GetResponse (NzbDrone.Common.Http.HttpRequest request, System.Net.CookieContainer cookies) [0x0009d] in :0
at NzbDrone.Common.Http.HttpClient.Execute (NzbDrone.Common.Http.HttpRequest request) [0x0007e] in :0
at NzbDrone.Common.Http.HttpClient.Get (NzbDrone.Common.Http.HttpRequest request) [0x00007] in :0
at NzbDrone.Core.Indexers.Newznab.NewznabCapabilitiesProvider.FetchCapabilities (NzbDrone.Core.Indexers.Newznab.NewznabSettings indexerSettings) [0x00084] in :0
at NzbDrone.Core.Indexers.Newznab.NewznabCapabilitiesProvider+<>c__DisplayClass4_0.b__0 () [0x00000] in :0
at NzbDrone.Common.Cache.Cached1[T].Get (System.String key, System.Func1[TResult] function, System.Nullable1[T] lifeTime) [0x0006a] in <d1810f3a0e9846e3acb4cd1cb9652384>:0 at NzbDrone.Core.Indexers.Newznab.NewznabCapabilitiesProvider.GetCapabilities (NzbDrone.Core.Indexers.Newznab.NewznabSettings indexerSettings) [0x00046] in <e875ff1e5e15495891c97fce19751838>:0 at NzbDrone.Core.Indexers.Newznab.Newznab.get_PageSize () [0x0000c] in <e875ff1e5e15495891c97fce19751838>:0 at NzbDrone.Core.Indexers.Newznab.Newznab.GetRequestGenerator () [0x0000b] in <e875ff1e5e15495891c97fce19751838>:0 at NzbDrone.Core.Indexers.HttpIndexerBase1[TSettings].TestConnection () [0x00007] in :0

The mono dependencies:

Resolving Dependencies
–> Running transaction check
—> Package libmonosgen-2_0-1.x86_64 0:4.8.1.0-0.xamarin.1 will be a downgrade
—> Package libmonosgen-2_0-1.x86_64 0:5.0.0.100-0.xamarin.1.epel7 will be erased
—> Package mono-core.x86_64 0:4.8.1.0-0.xamarin.1 will be a downgrade
—> Package mono-core.x86_64 0:5.0.0.100-0.xamarin.1.epel7 will be erased
—> Package mono-data.x86_64 0:4.8.1.0-0.xamarin.1 will be a downgrade
—> Package mono-data.x86_64 0:5.0.0.100-0.xamarin.1.epel7 will be erased
—> Package mono-data-oracle.x86_64 0:4.8.1.0-0.xamarin.1 will be a downgrade
—> Package mono-data-oracle.x86_64 0:5.0.0.100-0.xamarin.1.epel7 will be erased
—> Package mono-data-sqlite.x86_64 0:4.8.1.0-0.xamarin.1 will be a downgrade
—> Package mono-data-sqlite.x86_64 0:5.0.0.100-0.xamarin.1.epel7 will be erased
—> Package mono-devel.x86_64 0:4.8.1.0-0.xamarin.1 will be a downgrade
—> Package mono-devel.x86_64 0:5.0.0.100-0.xamarin.1.epel7 will be erased
—> Package mono-extras.x86_64 0:4.8.1.0-0.xamarin.1 will be a downgrade
—> Package mono-extras.x86_64 0:5.0.0.100-0.xamarin.1.epel7 will be erased
—> Package mono-locale-extras.x86_64 0:4.8.1.0-0.xamarin.1 will be a downgrade
—> Package mono-locale-extras.x86_64 0:5.0.0.100-0.xamarin.1.epel7 will be erased
—> Package mono-mvc.x86_64 0:4.8.1.0-0.xamarin.1 will be a downgrade
—> Package mono-mvc.x86_64 0:5.0.0.100-0.xamarin.1.epel7 will be erased
—> Package mono-wcf.x86_64 0:4.8.1.0-0.xamarin.1 will be a downgrade
—> Package mono-wcf.x86_64 0:5.0.0.100-0.xamarin.1.epel7 will be erased
—> Package mono-web.x86_64 0:4.8.1.0-0.xamarin.1 will be a downgrade
—> Package mono-web.x86_64 0:5.0.0.100-0.xamarin.1.epel7 will be erased
—> Package mono-winforms.x86_64 0:4.8.1.0-0.xamarin.1 will be a downgrade
—> Package mono-winforms.x86_64 0:5.0.0.100-0.xamarin.1.epel7 will be erased
—> Package mono-winfxcore.x86_64 0:4.8.1.0-0.xamarin.1 will be a downgrade
—> Package mono-winfxcore.x86_64 0:5.0.0.100-0.xamarin.1.epel7 will be erased
–> Finished Dependency Resolution


All indexers are unavailable due to failures
#2

Likely related to:

It seems to crash on Arch and fail on CentOS from what we’ve seen.


#3

I got here by googling. Oddly enough, I do not have this problem with Sonarr, only Radarr. I am also using CentOS 7.3.

Sonarr was install in April. Radarr was installed May 20. The Radarr web page worked but I could not add any movies. So I fixed this today by adding the line:
"Environment=MONO_TLS_PROVIDER=legacy"
under [Service] in my /etc/systemd/system/multi-user.target.wants/radarr.service file as suggested in issue 1928 (the one mentioned by markus101). Thanks!

I restarted Sonarr at least once since Radarr was installed. I have not had any problems with it.


#4

Any possible solution here ?

I am having issues on Centos 7.3


#5

@xed Did you manage to find a fix ? I have the exact same issue on centos and im not clear on next steps to fix this


#8

A post was split to a new topic: SecureChannelFailure (The authentication or decryption has failed.) - nzbhydra


#9

My workaround was to add the following environment variable to my unit file:
Environment=MONO_TLS_PROVIDER=legacy

You could also export MONO_TLS_PROVIDER=legacy if not using systemd.


#10

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