TechnitiumSoftware / DnsServer

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

Zone refresh for secondary zone failed after upgrade to v13.1 #1091

Closed perditavojo closed 2 weeks ago

perditavojo commented 4 weeks ago

I have 2 DNS server which are used v13.0.1, one is the main DNS server (A) and the other is used as secondary zone (B), and everything are fine.

The OS of these server are:

When I update the main DNS server (A) to v13.1, it goes well.

But when I update the server which used as secondary zone sever (B) to v13.1, I got the exception log below:

[2024-10-29 10:47:57 Local] DNS Server has started zone refresh for Secondary zone: x.x.x.x
[2024-10-29 10:47:57 Local] DNS Server failed to refresh 'x.x.x.x' Secondary zone from: ns1.x.x.x (192.168.1.1)
System.Net.Sockets.SocketException (10042): 在 getsockopt 或 setsockopt 呼叫中指定了一個不明的,不正確的,或不受支援的參數或等級。
   at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, Boolean disconnectOnFailure, String callerName)
   at System.Net.Sockets.Socket.UpdateStatusAfterSocketOptionErrorAndThrowException(SocketError error, String callerName)
   at System.Net.Sockets.Socket.SetSocketOption(SocketOptionLevel optionLevel, SocketOptionName optionName, Int32 optionValue)
   at TechnitiumLibrary.Net.Dns.ClientConnection.TcpClientConnection.GetConnectionAsync(CancellationToken cancellationToken) in Z:\Technitium\Projects\TechnitiumLibrary\TechnitiumLibrary.Net\Dns\ClientConnection\TcpClientConnection.cs:line 193
   at TechnitiumLibrary.Net.Dns.ClientConnection.TcpClientConnection.SendDnsDatagramAsync(DnsDatagram request, Int32 timeout, Transaction transaction, CancellationToken cancellationToken) in Z:\Technitium\Projects\TechnitiumLibrary\TechnitiumLibrary.Net\Dns\ClientConnection\TcpClientConnection.cs:line 257
   at TechnitiumLibrary.Net.Dns.ClientConnection.TcpClientConnection.QueryAsync(DnsDatagram request, Int32 timeout, Int32 retries, CancellationToken cancellationToken) in Z:\Technitium\Projects\TechnitiumLibrary\TechnitiumLibrary.Net\Dns\ClientConnection\TcpClientConnection.cs:line 317
   at TechnitiumLibrary.Net.Dns.DnsClient.<>c__DisplayClass93_0.<<InternalResolveAsync>g__DoResolveAsync|1>d.MoveNext() in Z:\Technitium\Projects\TechnitiumLibrary\TechnitiumLibrary.Net\Dns\DnsClient.cs:line 4512
--- End of stack trace from previous location ---
   at TechnitiumLibrary.Net.Dns.DnsClient.<>c__DisplayClass93_0.<<InternalResolveAsync>g__DoResolveAsync|1>d.MoveNext() in Z:\Technitium\Projects\TechnitiumLibrary\TechnitiumLibrary.Net\Dns\DnsClient.cs:line 4728
--- End of stack trace from previous location ---
   at TechnitiumLibrary.Net.Dns.DnsClient.<>c__DisplayClass93_0.<<InternalResolveAsync>g__DoResolveAsync|1>d.MoveNext() in Z:\Technitium\Projects\TechnitiumLibrary\TechnitiumLibrary.Net\Dns\DnsClient.cs:line 4429
--- End of stack trace from previous location ---
   at TechnitiumLibrary.Net.Dns.DnsClient.InternalResolveAsync(DnsDatagram request, Func`3 getValidatedResponseAsync, Boolean doNotReorderNameServers, CancellationToken cancellationToken) in Z:\Technitium\Projects\TechnitiumLibrary\TechnitiumLibrary.Net\Dns\DnsClient.cs:line 4865
   at TechnitiumLibrary.Net.Dns.DnsClient.TsigResolveAsync(DnsDatagram request, TsigKey key, UInt16 fudge, CancellationToken cancellationToken) in Z:\Technitium\Projects\TechnitiumLibrary\TechnitiumLibrary.Net\Dns\DnsClient.cs:line 5158
   at DnsServerCore.Dns.Zones.SecondaryZone.RefreshZoneAsync(IReadOnlyList`1 primaryNameServers, DnsTransportProtocol zoneTransferProtocol, TsigKey key, Boolean validateZone) in Z:\Technitium\Projects\DnsServer\DnsServerCore\Dns\Zones\SecondaryZone.cs:line 384

Got an SocketException on (B) when I trying to refresh secondary zones from the main DNS server (A), which is using v13.1.

I have no idea why, and I had tested with the DNS client bundled in the Technitium on (B), and found that there is an issue (SocketException (10042)) on query over the TCP.

I had try downgrade the issue server (B) to v13.0.2 and everything just fined again.

Not sure where is the root cause of the problem I faced, hope there will a good news on this.

ShreyasZare commented 4 weeks ago

Thanks for the feedback. It seems that the the socket option enabled in the new update is not supported on Win 2016. Will get this issue fixed soon and let you know.

ShreyasZare commented 2 weeks ago

Technitium DNS Server v13.1.1 is now available which fixes this issue. Do update and let me know your feedback.

perditavojo commented 2 weeks ago

Already confirmed, the issue was solved with the new release (v13.1.1). Thank you for the new version release!

ShreyasZare commented 2 weeks ago

Thanks for confirming!