MyDNS blank TXT record causes @ record to stop resolving

MediaServe

Well-Known Member
PartnerNOC
Apr 9, 2004
138
2
168
Nashville, TN USA
cPanel Access Level
DataCenter Provider
Twitter
We've been having some bind issues lately, so decided to switch to MyDNS. Conversion was pretty simple, but this morning we had a couple clients so far report websites down. This turned out to be a problem with MyDNS resolving the @ or base domain record, and after looking closely at the zones I discovered that the affected zones have blank TXT records. I'm not sure how those blank TXT records got created, but they break MyDNS causing the root domain record to not resolve, and since the www, ftp, etc. records are CNAMES they fail as well.

The records are there in the rr table, but the present of the blank TXT record (i.e. nothing in the data column in the database, nothing in the bind zone file in /var/named either) causes the problem. Editing the zone in WHM and removing the blank TXT records clears the problem right up.
 

MediaServe

Well-Known Member
PartnerNOC
Apr 9, 2004
138
2
168
Nashville, TN USA
cPanel Access Level
DataCenter Provider
Twitter
My solution (You will have to actually type <CTRL-V><CTRL-I> as the forum won't allow me to enter/save it properly, and you'll need to replace <hostname> with the hostname (without the domain) of the server per the mydns database naming convention):

cd /var/named;
sed -i '/TXT<CTRL-V><CTRL-I>\"\"/d' *.db
sed -i '/TXT \"\"/d' *.db
mysql mydns_<hostname>
delete * from rr where type = 'TXT' and data = '';
quit
service mydns restart

You'll have to do that on all servers, including non-DNS servers, to fix all the zones, leaving off everything from the line starting with mysql down if the server isn't running dns.

Only other option would be to edit the zones by hand on their origin servers, which would be a pain.

FYI I found that in the zone files, some TXT records had a TAB character between the TXT and the "", and some simply had a space, hence the need for the two sed commands.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
Feel free to open a support ticket using the link in my signature to report this issue. You can post the ticket number here so we can update this thread with the outcome.

Thank you.