TechnitiumSoftware / DnsServer

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

System.NullReferenceException: Object reference not set to an instance of an object. DnsServerCore.DnsWebService.InspectAndFixZonePermissions() #834

Closed kimarketing closed 4 months ago

kimarketing commented 5 months ago

Service wont start. The error is below.

This worked untill today. It just stoped working. I tried uninstalling, retinstalling, restarting the service. It wont start

Error: [2024-01-21 19:46:21 UTC] Logging started. [2024-01-21 19:46:21 UTC] DNS Server auth config file was loaded: C:\Program Files (x86)\Technitium\DNS Server\config\auth.config [2024-01-21 19:46:21 UTC] DNS Server config file was loaded: C:\Program Files (x86)\Technitium\DNS Server\config\dns.config [2024-01-21 19:46:22 UTC] DNS Server successfully loaded zone file: C:\Program Files (x86)\Technitium\DNS Server\config\zones\local.zone [2024-01-21 19:46:22 UTC] Failed to start DNS Server (v11.2.0.0) System.NullReferenceException: Object reference not set to an instance of an object. at DnsServerCore.DnsWebService.InspectAndFixZonePermissions() in Z:\Technitium\Projects\DnsServer\DnsServerCore\DnsWebService.cs:line 958 at DnsServerCore.DnsWebService.StartAsync() in Z:\Technitium\Projects\DnsServer\DnsServerCore\DnsWebService.cs:line 2212

ShreyasZare commented 5 months ago

Thanks for the post. It seems like your auth.config file is corrupt. You need to delete that file from C:\Program Files (x86)\Technitium\DNS Server\config\ folder and start the DNS server again. This will cause the file to be generated with default values and you will need to recreate users/groups that you may have had earlier.

Also, do upgrade the DNS server to latest version.

ShreyasZare commented 4 months ago

Technitium DNS Server v12 is now available which will give more specific error message when auth config file is corrupt.