TechnitiumSoftware / DnsServer

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

Value cannot be null. (Parameter 'key') #784

Closed Artucuno closed 7 months ago

Artucuno commented 7 months ago

Hey there,

I'm trying to install Technitium DNS in a Docker Container on a Raspberry Pi Model B but I'm getting this error:

System.ArgumentNullException: Value cannot be null. (Parameter 'key')
   at System.ThrowHelper.ThrowArgumentNullException(String name)
   at System.ThrowHelper.ThrowKeyNullException()
   at System.Collections.Concurrent.ConcurrentDictionary`2.set_Item(TKey key, TValue value)
   at DnsServerCore.Auth.Permission.SetPermission(Group group, PermissionFlag flags) in Z:\Technitium\Projects\DnsServer\DnsServerCore\Auth\Permission.cs:line 180
   at DnsServerCore.Auth.Permission.SetSubItemPermission(String subItemName, Group group, PermissionFlag flags) in Z:\Technitium\Projects\DnsServer\DnsServerCore\Auth\Permission.cs:line 199
   at DnsServerCore.Auth.AuthManager.SetPermission(PermissionSection section, String subItemName, Group group, PermissionFlag flags) in Z:\Technitium\Projects\DnsServer\DnsServerCore\Auth\AuthManager.cs:line 744
   at DnsServerCore.DnsWebService.CreateForwarderZoneToDisableDnssecForNTP() in Z:\Technitium\Projects\DnsServer\DnsServerCore\DnsWebService.cs:line 1021
   at DnsServerCore.DnsWebService.LoadConfigFile() in Z:\Technitium\Projects\DnsServer\DnsServerCore\DnsWebService.cs:line 888
   at DnsServerCore.DnsWebService.StartAsync() in Z:\Technitium\Projects\DnsServer\DnsServerCore\DnsWebService.cs:line 2498
   at TechnitiumLibrary.TaskExtensions.Sync(Task task) in Z:\Technitium\Projects\TechnitiumLibrary\TechnitiumLibrary\TaskExtensions.cs:line 56
   at DnsServerCore.DnsWebService.Start() in Z:\Technitium\Projects\DnsServer\DnsServerCore\DnsWebService.cs:line 2626
   at DnsServerApp.Program.Main(String[] args) in Z:\Technitium\Projects\DnsServer\DnsServerApp\Program.cs:line 55

Technitium DNS Server is stopping...
Technitium DNS Server was stopped successfully.

uname: Linux raspberrypi 6.1.0-rpi6-rpi-v8 #1 SMP PREEMPT Debian 1:6.1.58-1+rpt2 (2023-10-27) aarch64 GNU/Linux

Thanks

ShreyasZare commented 7 months ago

Thanks for the post and error log details. The error is being generated when the DNS server starts and is trying to load the config.

It seems that your auth.config file is corrupt which is causing this issue. You need to stop the DNS server and delete the auth.config file and start the DNS server back. The DNS server will auto generate a default file and you will need to configure your users and passwords again. You should find that file in /etc/dns/ folder.

Artucuno commented 7 months ago

That worked, thanks!