TechnitiumSoftware / DnsServer

Technitium DNS Server
https://technitium.com/dns/
GNU General Public License v3.0
4.32k stars 422 forks source link

`System.IO.IOException: The decryption operation failed, see inner exception` #449

Closed ZzZombo closed 2 years ago

ZzZombo commented 2 years ago

Suddenly I started to get a lot of these errors after my PC restart.

Details ``` [2022-08-12 23:21:43 Local] DNS Server failed to resolve the request with QNAME: i.redd.it; QTYPE: A; QCLASS: IN; Forwarders: https://127.0.0.1:3000/dns-query; System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.IO.IOException: The decryption operation failed, see inner exception. ---> System.ComponentModel.Win32Exception (0x80090330): Указанные данные не могут быть расшифрованы. --- End of inner exception stack trace --- at System.Net.Security.SslStream.ReadAsyncInternal[TIOAdapter](TIOAdapter adapter, Memory`1 buffer) at System.Net.Http.HttpConnection.InitialFillAsync(Boolean async) at System.Net.Http.HttpConnection.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) --- End of inner exception stack trace --- at System.Net.Http.HttpConnection.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken) at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpClient.g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken) at TechnitiumLibrary.Net.Dns.ClientConnection.HttpsClientConnection.QueryAsync(DnsDatagram request, Int32 timeout, Int32 retries, CancellationToken cancellationToken) in Z:\Technitium\Projects\TechnitiumLibrary\TechnitiumLibrary.Net\Dns\ClientConnection\HttpsClientConnection.cs:line 157 at TechnitiumLibrary.Net.Dns.DnsClient.<>c__DisplayClass64_0.<g__DoResolveAsync|1>d.MoveNext() in Z:\Technitium\Projects\TechnitiumLibrary\TechnitiumLibrary.Net\Dns\DnsClient.cs:line 3832 --- End of stack trace from previous location --- at TechnitiumLibrary.Net.Dns.DnsClient.<>c__DisplayClass64_0.<g__DoResolveAsync|1>d.MoveNext() in Z:\Technitium\Projects\TechnitiumLibrary\TechnitiumLibrary.Net\Dns\DnsClient.cs:line 3782 --- End of stack trace from previous location --- at TechnitiumLibrary.Net.Dns.DnsClient.InternalResolveAsync(DnsDatagram request, CancellationToken cancellationToken) in Z:\Technitium\Projects\TechnitiumLibrary\TechnitiumLibrary.Net\Dns\DnsClient.cs:line 4061 at TechnitiumLibrary.Net.Dns.DnsClient.InternalDnssecResolveAsync(DnsQuestionRecord question, CancellationToken cancellationToken) in Z:\Technitium\Projects\TechnitiumLibrary\TechnitiumLibrary.Net\Dns\DnsClient.cs:line 4110 at TechnitiumLibrary.Net.Dns.DnsClient.<>c__DisplayClass68_0.<b__0>d.MoveNext() in Z:\Technitium\Projects\TechnitiumLibrary\TechnitiumLibrary.Net\Dns\DnsClient.cs:line 4222 --- End of stack trace from previous location --- at TechnitiumLibrary.Net.Dns.DnsClient.ResolveQueryAsync(DnsQuestionRecord question, Func`2 resolveAsync) in Z:\Technitium\Projects\TechnitiumLibrary\TechnitiumLibrary.Net\Dns\DnsClient.cs:line 3614 at TechnitiumLibrary.Net.Dns.DnsClient.InternalCachedResolveQueryAsync(DnsQuestionRecord question, CancellationToken cancellationToken) in Z:\Technitium\Projects\TechnitiumLibrary\TechnitiumLibrary.Net\Dns\DnsClient.cs:line 4223 at DnsServerCore.Dns.DnsServer.RecursiveResolveAsync(DnsQuestionRecord question, IReadOnlyList`1 conditionalForwarders, Boolean dnssecValidation, Boolean cachePrefetchOperation, Boolean cacheRefreshOperation, TaskCompletionSource`1 taskCompletionSource) in Z:\Technitium\Projects\DnsServer\DnsServerCore\Dns\DnsServer.cs:line 2256 ```
ShreyasZare commented 2 years ago

Thanks for the post. It seems to be some kind of network issue causing these errors. Try switching to another DoH provider and see if that works.

ZzZombo commented 2 years ago

It appears that my ISP in line with the governmental policy of establishing a firm Internet censorship a'la the Great Chinese Firewall has again messed with HTTPS inspection/filtering (they have done so in the past at least 3 times in the last 2 months already each time causing visible, major disruptions in their service), since only non-private SSL/TLS connections were affected, the issue was temporary (I hope so!) and nothing has changed on my side to induce or fix the problem.

The problems were random and intermittent, one moment a connection would establish correctly and a second later the same host became unreachable. Sad times all around. Hope to leave this shit hole ASAP! Sorry for blaming your software!

ShreyasZare commented 2 years ago

Ya, they may be blocking known DoH services so you can try some other that are not well known. Check out this list here and see if any of them works.