PowerDNS is a very good DNS nameserver, but debugging is sometimes very hard. I just add some records to my zone and zone stops working: server doesn’t respond to DNS queries.
Here is error from syslog:
2018-03-28T23:59:14+02:00 my [err] [pdns] Exception building answer packet for hostname.sk/MX (All data was not consumed) sending out servfail 2018-03-28T23:59:30+02:00 my [err] [pdns] Backend reported permanent error which prevented lookup (GSQLBackend lookup query:Attempt to bind more parameters than query has: SELECT content,ttl,prio,type,domain_id,disabled,name,auth FROM records WHERE disabled=0 and name=? and domain_id=?), aborting
Tracing of pdns told me the following exception:
$ strace -s 4096 -f -e send,recv,read,write,sendmsg -p `pidof /usr/sbin/pdns_server-instance` [pid 12801] send(3, "<27>Mar 29 01:09:08 pdns[12791]: Exception building answer packet for zcvisioncare.sk/A (All data was not consumed) sending out servfail\0", 137, MSG_NOSIGNAL) = 137
After few hours of googling, debugging, removing records etc. I have found:
$ pdnsutil check-zone hostname.sk [Error] Following record had a problem: "hostname.sk IN SOA ns.hostname.sk hostmaster.hostname.sk 2018032808 21600 7200 1209600 3600 " [Error] Error was: All data was not consumed Checked 14 records of 'hostname.sk', 1 errors, 0 warnings.
Did you notice extra space at the end of record? After removing extra space problem get solved.
I have added the following crontab job to prevent problems in the feature:
@daily pdnsutil check-all-zones | grep Error