Unable to connect to indexer Error: TrustFailure (Authentication failed, see inner exception.)

Sonarr version (exact version): 3.0.9.1549
Mono version (if Sonarr is not running on Windows): TrueNAS Jail
OS: FreeBSD
Debug logs:
12:23pm SonarrErrorPipeline Invalid request Validation failed: – : Unable to connect to indexer, check the log for more details
12:23pm FileList Unable to connect to indexer: Error: TrustFailure (Authentication failed, see inner exception.): ‘https://filelist.io/api.php?action=latest-torrents&category=21,27
12:23pm X509CertificateValidationService Certificate validation for https://filelist.io/api.php?action=latest-torrents&category=21,27 failed. RemoteCertificateChainErrors
Description of issue:

Trace log sais this:
2023-02-22 19:47:50.2|Debug|Api|[GET] /api/v3/command: 200.OK (1 ms)
2023-02-22 19:47:50.3|Debug|Api|[GET] /api/v3/log/file: 200.OK (2 ms)
2023-02-22 19:47:51.6|Debug|Api|[GET] /api/v3/log?page=1&pageSize=50&sortDirection=descending&sortKey=time: 200.OK (34 ms)
2023-02-22 19:48:22.9|Debug|Api|[GET] /api/v3/indexer: 200.OK (1 ms)
2023-02-22 19:48:22.9|Debug|Api|[GET] /api/v3/config/indexer: 200.OK (2 ms)
2023-02-22 19:48:25.5|Debug|Api|[GET] /api/v3/indexer/schema: 200.OK (7 ms)
2023-02-22 19:48:30.3|Debug|Api|[GET] /api/v3/indexer/schema: 200.OK (9 ms)
2023-02-22 19:48:34.9|Debug|Api|[GET] /api/v3/command: 200.OK (1 ms)
2023-02-22 19:48:35.0|Debug|Api|[GET] /api/v3/command: 200.OK (1 ms)
2023-02-22 19:49:10.6|Debug|FileList|Downloading Feed https://filelist.io/api.php?action=latest-torrents&category=21,27
2023-02-22 19:49:10.7|Error|X509CertificateValidationService|Certificate validation for https://filelist.io/api.php?action=latest-torrents&category=21,27 failed. RemoteCertificateChainErrors
2023-02-22 19:49:10.7|Warn|FileList|Unable to connect to indexer

[v3.0.9.1549] System.Net.WebException: Error: TrustFailure (Authentication failed, see inner exception.): ‘https://filelist.io/api.php?action=latest-torrents&category=21,27’ —> System.Net.WebException: Error: TrustFailure (Authentication failed, see inner exception.) —> System.Security.Authentication.AuthenticationException: Authentication failed, see inner exception. —> Mono.Btls.MonoBtlsException: Ssl error:1000007d:SSL routines:OPENSSL_internal:CERTIFICATE_VERIFY_FAILED
at /wrkdirs/usr/ports/lang/mono6.8/work/mono-6.8.0.123/external/boringssl/ssl/handshake_client.c:1132
at Mono.Btls.MonoBtlsContext.ProcessHandshake () [0x00057] in /wrkdirs/usr/ports/lang/mono6.8/work/mono-6.8.0.123/mcs/class/System/Mono.Btls/MonoBtlsContext.cs:226
at Mono.Net.Security.MobileAuthenticatedStream.ProcessHandshake (Mono.Net.Security.AsyncOperationStatus status, System.Boolean renegotiate) [0x000da] in /wrkdirs/usr/ports/lang/mono6.8/work/mono-6.8.0.123/mcs/class/System/Mono.Net.Security/MobileAuthenticatedStream.cs:715
at (wrapper remoting-invoke-with-check) Mono.Net.Security.MobileAuthenticatedStream.ProcessHandshake(Mono.Net.Security.AsyncOperationStatus,bool)
at Mono.Net.Security.AsyncHandshakeRequest.Run (Mono.Net.Security.AsyncOperationStatus status) [0x00000] in /wrkdirs/usr/ports/lang/mono6.8/work/mono-6.8.0.123/mcs/class/System/Mono.Net.Security/AsyncProtocolRequest.cs:289
at Mono.Net.Security.AsyncProtocolRequest.ProcessOperation (System.Threading.CancellationToken cancellationToken) [0x000fc] in /wrkdirs/usr/ports/lang/mono6.8/work/mono-6.8.0.123/mcs/class/System/Mono.Net.Security/AsyncProtocolRequest.cs:223
— End of inner exception stack trace —
at Mono.Net.Security.MobileAuthenticatedStream.ProcessAuthentication (System.Boolean runSynchronously, Mono.Net.Security.MonoSslAuthenticationOptions options, System.Threading.CancellationToken cancellationToken) [0x0025c] in /wrkdirs/usr/ports/lang/mono6.8/work/mono-6.8.0.123/mcs/class/System/Mono.Net.Security/MobileAuthenticatedStream.cs:310
at Mono.Net.Security.MonoTlsStream.CreateStream (System.Net.WebConnectionTunnel tunnel, System.Threading.CancellationToken cancellationToken) [0x0016a] in /wrkdirs/usr/ports/lang/mono6.8/work/mono-6.8.0.123/mcs/class/System/Mono.Net.Security/MonoTlsStream.cs:137
at System.Net.WebConnection.CreateStream (System.Net.WebOperation operation, System.Boolean reused, System.Threading.CancellationToken cancellationToken) [0x00170] in /wrkdirs/usr/ports/lang/mono6.8/work/mono-6.8.0.123/mcs/class/System/System.Net/WebConnection.cs:236
— End of inner exception stack trace —
at System.Net.WebConnection.CreateStream (System.Net.WebOperation operation, System.Boolean reused, System.Threading.CancellationToken cancellationToken) [0x00208] in /wrkdirs/usr/ports/lang/mono6.8/work/mono-6.8.0.123/mcs/class/System/System.Net/WebConnection.cs:248
at System.Net.WebConnection.InitConnection (System.Net.WebOperation operation, System.Threading.CancellationToken cancellationToken) [0x000f7] in /wrkdirs/usr/ports/lang/mono6.8/work/mono-6.8.0.123/mcs/class/System/System.Net/WebConnection.cs:277
at System.Net.WebOperation.Run () [0x00052] in /wrkdirs/usr/ports/lang/mono6.8/work/mono-6.8.0.123/mcs/class/System/System.Net/WebOperation.cs:268
at System.Net.WebCompletionSource1[T].WaitForCompletion () [0x0008e] in /wrkdirs/usr/ports/lang/mono6.8/work/mono-6.8.0.123/mcs/class/System/System.Net/WebCompletionSource.cs:111 at System.Net.HttpWebRequest.RunWithTimeoutWorker[T] (System.Threading.Tasks.Task1[TResult] workerTask, System.Int32 timeout, System.Action abort, System.Func1[TResult] aborted, System.Threading.CancellationTokenSource cts) [0x000e8] in /wrkdirs/usr/ports/lang/mono6.8/work/mono-6.8.0.123/mcs/class/System/System.Net/HttpWebRequest.cs:956 at System.Net.HttpWebRequest.GetResponse () [0x0000f] in /wrkdirs/usr/ports/lang/mono6.8/work/mono-6.8.0.123/mcs/class/System/System.Net/HttpWebRequest.cs:1218 at NzbDrone.Common.Http.Dispatchers.ManagedHttpDispatcher.GetResponse (NzbDrone.Common.Http.HttpRequest request, System.Net.CookieContainer cookies) [0x00123] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Common\Http\Dispatchers\ManagedHttpDispatcher.cs:81 --- End of inner exception stack trace --- at NzbDrone.Common.Http.Dispatchers.ManagedHttpDispatcher.GetResponse (NzbDrone.Common.Http.HttpRequest request, System.Net.CookieContainer cookies) [0x001c0] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Common\Http\Dispatchers\ManagedHttpDispatcher.cs:107 at NzbDrone.Common.Http.HttpClient.ExecuteRequest (NzbDrone.Common.Http.HttpRequest request, System.Net.CookieContainer cookieContainer) [0x00086] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Common\Http\HttpClient.cs:126 at NzbDrone.Common.Http.HttpClient.Execute (NzbDrone.Common.Http.HttpRequest request) [0x00008] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Common\Http\HttpClient.cs:59 at NzbDrone.Core.Indexers.HttpIndexerBase1[TSettings].FetchIndexerResponse (NzbDrone.Core.Indexers.IndexerRequest request) [0x00069] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\Indexers\HttpIndexerBase.cs:323
at NzbDrone.Core.Indexers.HttpIndexerBase1[TSettings].FetchPage (NzbDrone.Core.Indexers.IndexerRequest request, NzbDrone.Core.Indexers.IParseIndexerResponse parser) [0x00000] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\Indexers\HttpIndexerBase.cs:299 at NzbDrone.Core.Indexers.HttpIndexerBase1[TSettings].TestConnection () [0x00044] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\Indexers\HttpIndexerBase.cs:344

2023-02-22 19:49:10.7|Warn|SonarrErrorPipeline|Invalid request Validation failed:
– : Unable to connect to indexer, check the log for more details
2023-02-22 19:49:10.7|Debug|Api|[POST] /api/v3/indexer/test: 400.BadRequest (62 ms)
2023-02-22 19:49:24.3|Debug|Api|[GET] /api/v3/series: 200.OK (2 ms)
2023-02-22 19:49:24.3|Debug|Api|[GET] /api/v3/tag: 200.OK (1 ms)
2023-02-22 19:49:24.3|Debug|Api|[GET] /api/v3/languageprofile: 200.OK (1 ms)

Debug logs:
2023-02-22 19:53:48.4|Debug|Api|[GET] /api/v3/tag/detail: 200.OK (5 ms)
2023-02-22 19:53:48.4|Debug|FileList|Downloading Feed https://filelist.io/api.php?action=latest-torrents&category=21,27
2023-02-22 19:53:49.3|Error|X509CertificateValidationService|Certificate validation for https://filelist.io/api.php?action=latest-torrents&category=21,27 failed. RemoteCertificateChainErrors
2023-02-22 19:53:49.3|Warn|FileList|Unable to connect to indexer

[v3.0.9.1549] System.Net.WebException: Error: TrustFailure (Authentication failed, see inner exception.): ‘https://filelist.io/api.php?action=latest-torrents&category=21,27’ —> System.Net.WebException: Error: TrustFailure (Authentication failed, see inner exception.) —> System.Security.Authentication.AuthenticationException: Authentication failed, see inner exception. —> Mono.Btls.MonoBtlsException: Ssl error:1000007d:SSL routines:OPENSSL_internal:CERTIFICATE_VERIFY_FAILED
at /wrkdirs/usr/ports/lang/mono6.8/work/mono-6.8.0.123/external/boringssl/ssl/handshake_client.c:1132
at Mono.Btls.MonoBtlsContext.ProcessHandshake () [0x00057] in /wrkdirs/usr/ports/lang/mono6.8/work/mono-6.8.0.123/mcs/class/System/Mono.Btls/MonoBtlsContext.cs:226
at Mono.Net.Security.MobileAuthenticatedStream.ProcessHandshake (Mono.Net.Security.AsyncOperationStatus status, System.Boolean renegotiate) [0x000da] in /wrkdirs/usr/ports/lang/mono6.8/work/mono-6.8.0.123/mcs/class/System/Mono.Net.Security/MobileAuthenticatedStream.cs:715
at (wrapper remoting-invoke-with-check) Mono.Net.Security.MobileAuthenticatedStream.ProcessHandshake(Mono.Net.Security.AsyncOperationStatus,bool)
at Mono.Net.Security.AsyncHandshakeRequest.Run (Mono.Net.Security.AsyncOperationStatus status) [0x00000] in /wrkdirs/usr/ports/lang/mono6.8/work/mono-6.8.0.123/mcs/class/System/Mono.Net.Security/AsyncProtocolRequest.cs:289
at Mono.Net.Security.AsyncProtocolRequest.ProcessOperation (System.Threading.CancellationToken cancellationToken) [0x000fc] in /wrkdirs/usr/ports/lang/mono6.8/work/mono-6.8.0.123/mcs/class/System/Mono.Net.Security/AsyncProtocolRequest.cs:223
— End of inner exception stack trace —
at Mono.Net.Security.MobileAuthenticatedStream.ProcessAuthentication (System.Boolean runSynchronously, Mono.Net.Security.MonoSslAuthenticationOptions options, System.Threading.CancellationToken cancellationToken) [0x0025c] in /wrkdirs/usr/ports/lang/mono6.8/work/mono-6.8.0.123/mcs/class/System/Mono.Net.Security/MobileAuthenticatedStream.cs:310
at Mono.Net.Security.MonoTlsStream.CreateStream (System.Net.WebConnectionTunnel tunnel, System.Threading.CancellationToken cancellationToken) [0x0016a] in /wrkdirs/usr/ports/lang/mono6.8/work/mono-6.8.0.123/mcs/class/System/Mono.Net.Security/MonoTlsStream.cs:137
at System.Net.WebConnection.CreateStream (System.Net.WebOperation operation, System.Boolean reused, System.Threading.CancellationToken cancellationToken) [0x00170] in /wrkdirs/usr/ports/lang/mono6.8/work/mono-6.8.0.123/mcs/class/System/System.Net/WebConnection.cs:236
— End of inner exception stack trace —
at System.Net.WebConnection.CreateStream (System.Net.WebOperation operation, System.Boolean reused, System.Threading.CancellationToken cancellationToken) [0x00208] in /wrkdirs/usr/ports/lang/mono6.8/work/mono-6.8.0.123/mcs/class/System/System.Net/WebConnection.cs:248
at System.Net.WebConnection.InitConnection (System.Net.WebOperation operation, System.Threading.CancellationToken cancellationToken) [0x000f7] in /wrkdirs/usr/ports/lang/mono6.8/work/mono-6.8.0.123/mcs/class/System/System.Net/WebConnection.cs:277
at System.Net.WebOperation.Run () [0x00052] in /wrkdirs/usr/ports/lang/mono6.8/work/mono-6.8.0.123/mcs/class/System/System.Net/WebOperation.cs:268
at System.Net.WebCompletionSource1[T].WaitForCompletion () [0x0008e] in /wrkdirs/usr/ports/lang/mono6.8/work/mono-6.8.0.123/mcs/class/System/System.Net/WebCompletionSource.cs:111 at System.Net.HttpWebRequest.RunWithTimeoutWorker[T] (System.Threading.Tasks.Task1[TResult] workerTask, System.Int32 timeout, System.Action abort, System.Func1[TResult] aborted, System.Threading.CancellationTokenSource cts) [0x000e8] in /wrkdirs/usr/ports/lang/mono6.8/work/mono-6.8.0.123/mcs/class/System/System.Net/HttpWebRequest.cs:956 at System.Net.HttpWebRequest.GetResponse () [0x0000f] in /wrkdirs/usr/ports/lang/mono6.8/work/mono-6.8.0.123/mcs/class/System/System.Net/HttpWebRequest.cs:1218 at NzbDrone.Common.Http.Dispatchers.ManagedHttpDispatcher.GetResponse (NzbDrone.Common.Http.HttpRequest request, System.Net.CookieContainer cookies) [0x00123] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Common\Http\Dispatchers\ManagedHttpDispatcher.cs:81 --- End of inner exception stack trace --- at NzbDrone.Common.Http.Dispatchers.ManagedHttpDispatcher.GetResponse (NzbDrone.Common.Http.HttpRequest request, System.Net.CookieContainer cookies) [0x001c0] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Common\Http\Dispatchers\ManagedHttpDispatcher.cs:107 at NzbDrone.Common.Http.HttpClient.ExecuteRequest (NzbDrone.Common.Http.HttpRequest request, System.Net.CookieContainer cookieContainer) [0x00086] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Common\Http\HttpClient.cs:126 at NzbDrone.Common.Http.HttpClient.Execute (NzbDrone.Common.Http.HttpRequest request) [0x00008] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Common\Http\HttpClient.cs:59 at NzbDrone.Core.Indexers.HttpIndexerBase1[TSettings].FetchIndexerResponse (NzbDrone.Core.Indexers.IndexerRequest request) [0x00069] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\Indexers\HttpIndexerBase.cs:323
at NzbDrone.Core.Indexers.HttpIndexerBase1[TSettings].FetchPage (NzbDrone.Core.Indexers.IndexerRequest request, NzbDrone.Core.Indexers.IParseIndexerResponse parser) [0x00000] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\Indexers\HttpIndexerBase.cs:299 at NzbDrone.Core.Indexers.HttpIndexerBase1[TSettings].TestConnection () [0x00044] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\Indexers\HttpIndexerBase.cs:344

2023-02-22 19:53:49.3|Warn|SonarrErrorPipeline|Invalid request Validation failed:
– : Unable to connect to indexer, check the log for more details
2023-02-22 19:53:49.3|Debug|Api|[POST] /api/v3/indexer/test: 400.BadRequest (948 ms)
2023-02-22 19:54:27.3|Debug|Api|[GET] /api/v3/health: 200.OK (1 ms)
2023-02-22 19:54:27.3|Debug|Api|[GET] /api/v3/diskspace: 200.OK (1 ms)
2023-02-22 19:54:27.3|Debug|Api|[GET] /api/v3/system/status: 200.OK (1 ms)
2023-02-22 19:54:29.2|Debug|Api|[GET] /api/v3/log?page=1&pageSize=50&sortDirection=descending&sortKey=time: 200.OK (2 ms)
2023-02-22 19:54:35.2|Debug|Api|[GET] /api/v3/command: 200.OK (1 ms)

when I add the indexer, the api comes pre-populated like in the attached screenshot:

Unable to connect to indexer: Error: TrustFailure (Authentication failed, see inner exception.): ‘https://filelist.io/api.php?action=latest-torrents&category=21,27

Not sure if this is the same as the LE cert changes, but looks like something with SSL validation is broken in your setup.

managed to fix it by following this:

wget -O - https://curl.haxx.se/ca/cacert.pem | cert-sync --user /dev/stdin

and then this:

cp -R /mnt/<zpool name>/iocage/jails/sonarr/root/root/.config/.mono/ /mnt/<zpool name>/iocage/releases/12.2-RELEASE/root/usr/share/.mono

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