TechnitiumSoftware / DnsServer

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

Multipe errors in log #949

Closed drbobnz closed 2 months ago

drbobnz commented 5 months ago

Hi

I'll create another issue for the reboot error, but thought I would log two problems, both were there before and with version 12.2.1:

(The array error is gone with the 12.2.1 release, thanks)

I've edited MAC addresses.

1) Logs full of the same DHCP Server offer, over and over again (100s of requests), but no 'DHCP Server leased' message: [2024-06-17 08:16:16 UTC] [0.0.0.0:68] DHCP Server offered IP address [192.168.20.75] to Hub?? [AA-BB-CC-DD-EE-FF] for scope: VLAN20 [2024-06-17 08:16:16 UTC] [0.0.0.0:68] DHCP Server offered IP address [192.168.20.75] to Hub?? [AA-BB-CC-DD-EE-FF] for scope: VLAN20 [2024-06-17 08:16:21 UTC] [0.0.0.0:68] DHCP Server offered IP address [192.168.20.75] to Hub?? [AA-BB-CC-DD-EE-FF] for scope: VLAN20

2) Repeated messages (100s) for one of three AppleTVs, and frequently an error too: [2024-06-17 05:11:08 UTC] [0.0.0.0:68] DHCP Server leased IP address [192.168.1.68] to LoungeAppleTV [AA-BB-CC-DD-EE-FF] for scope: Home_LAN [2024-06-17 05:11:08 UTC] [0.0.0.0:68] DHCP Server leased IP address [192.168.1.68] to LoungeAppleTV [AA-BB-CC-DD-EE-FF] for scope: Home_LAN [2024-06-17 05:11:08 UTC] DHCP Server updated DNS A record 'loungeappletv.local' with IP address [192.168.1.68]. [2024-06-17 05:11:08 UTC] DHCP Server updated DNS A record 'loungeappletv.local' with IP address [192.168.1.68]. [2024-06-17 05:11:08 UTC] DHCP Server updated DNS PTR record '68.1.168.192.in-addr.arpa' with domain name 'loungeappletv.local'. [2024-06-17 05:11:08 UTC] DHCP Server updated DNS PTR record '68.1.168.192.in-addr.arpa' with domain name 'loungeappletv.local'. [2024-06-17 05:11:08 UTC] DHCP Server successfully saved scope file: /etc/dns/scopes/Home_LAN.scope

The error message: [2024-06-17 07:54:20 UTC] [0.0.0.0:68] DHCP Server leased IP address [192.168.1.68] to LoungeAppleTV [AA-BB-CC-DD-EE-FF] for scope: Home_LAN [2024-06-17 07:54:20 UTC] [0.0.0.0:68] DHCP Server leased IP address [192.168.1.68] to LoungeAppleTV [AA-BB-CC-DD-EE-FF] for scope: Home_LAN [2024-06-17 07:54:20 UTC] DnsServerCore.Dns.DnsServerException: Failed to set records. Please try again. at DnsServerCore.Dns.Zones.PrimarySubDomainZone.SetRecords(DnsResourceRecordType type, IReadOnlyList`1 records) in Z:\Technitium\Projects\DnsServer\DnsServerCore\Dns\Zones\PrimarySubDomainZone.cs:line 97 at DnsServerCore.Dhcp.DhcpServer.UpdateDnsAuthZone(Boolean add, Scope scope, String domain, IPAddress address, Boolean isReservedLease) in Z:\Technitium\Projects\DnsServer\DnsServerCore\Dhcp\DhcpServer.cs:line 707 [2024-06-17 07:54:20 UTC] DHCP Server updated DNS A record 'loungeappletv.local' with IP address [192.168.1.68]. [2024-06-17 07:54:20 UTC] DHCP Server updated DNS PTR record '68.1.168.192.in-addr.arpa' with domain name 'loungeappletv.local'. [2024-06-17 07:54:22 UTC] DHCP Server successfully saved scope file: /etc/dns/scopes/Home_LAN.scope

Any help appreciated!

ShreyasZare commented 5 months ago

Thanks for the feedback.

You can safely ignore the Failed to set records. Please try again. error log in there. The reason for this is that there are parallel attempts to set the record value at the same instance so one of them succeeds and thus the other one fails. But since both the parallel attempts are trying to set the same value, the error from the other attempt can be ignored.

The main issue of repeated attempts for address allocation is not clear here from the logs. Initially in #944 issue, it was thought that the ArgumentException was causing it to fail to allocate the address but it seems to be not the case.

To understand this issue, I will need to get a packet capture on the server. To do that, you need to login to the server and run tcpdump -i any -w dhcp.pcap and wait few seconds for the clients to attempt to get DHCP lease. After a few seconds, you can stop the command and then email the dhcp.pcap file to support@technitium.com. This pcap file will allow to replay the exact DHCP request and test the code to see what is causing the issue.

drbobnz commented 5 months ago

Cheers - I'll drop the file over later today. At the moment, the hub device has successfully leased an address (10 messages in the log) after 12694 messages about an offer.... but it will break today for sure! The AppleTV is still doing its request every 10-15 seconds still....

Thanks!!