500 Internal Server Error when adding custom DNS

This is pretty much a fresh install on a Ubuntu 14.04 LTS server on Digital Ocean. All system checks report ok however when adding a custom DNS entry I am getting a 500 Internal Server Error. This happens regardless of the type of entry and I know the value is correct.

I checked the syslog and this is the result when entering a new DNS entry.

Jul 5 14:04:37 box Exception on /dns/custom/mg3.codenexus.one/A [POST]#012Traceback (most recent call last):#012 File “/usr/lib/python3/dist-packages/flask/app.py”, line 1817, in wsgi_app#012 response = self.full_dispatch_request()#012 File “/usr/lib/python3/dist-packages/flask/app.py”, line 1477, in full_dispatch_request#012 rv = self.handle_user_exception(e)#012 File “/usr/lib/python3/dist-packages/flask/app.py”, line 1381, in handle_user_exception#012 reraise(exc_type, exc_value, tb)#012 File “/usr/lib/python3/dist-packages/flask/_compat.py”, line 33, in reraise#012 raise value#012 File “/usr/lib/python3/dist-packages/flask/app.py”, line 1475, in full_dispatch_request#012 rv = self.dispatch_request()#012 File “/usr/lib/python3/dist-packages/flask/app.py”, line 1461, in dispatch_request#012 return self.view_functionsrule.endpoint#012 File “/usr/local/bin/mailinabox-daemon”, line 51, in newview#012 return viewfunc(*args, **kwargs)#012 File “/usr/local/bin/mailinabox-daemon”, line 310, in dns_set_record#012 return do_dns_update(env) or “Something isn’t right.”#012 File “/root/mailinabox/management/dns_update.py”, line 80, in do_dns_update#012 sign_zone(domain, zonefile, env)#012 File “/root/mailinabox/management/dns_update.py”, line 565, in sign_zone#012 dnssec_keys[“ZSK”],#012 File “/root/mailinabox/management/utils.py”, line 193, in shell#012 ret = getattr(subprocess, method)(cmd_args, **kwargs)#012 File “/usr/lib/python3.4/subprocess.py”, line 561, in check_call#012 raise CalledProcessError(retcode, cmd)#012subprocess.CalledProcessError: Command ‘[’/usr/bin/ldns-signzone’, ‘-e’, ‘20160804’, ‘-n’, ‘/etc/nsd/zones/codenexus.one.txt’, ‘/tmp/Kcodenexus.one.+007+41751’, ‘/tmp/Kcodenexus.one.+007+54632’]’ returned non-zero exit status 1

try to restart the system - i had similar issues and the source was that some system updates make this happen.

easiest way is restart of the system to solve this.

That didn’t work. Not sure exactly what happened… I did a complete reinstall - since I just started configuring it it was the fastest option.