The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

MyDNS blank TXT record causes @ record to stop resolving

Discussion in 'Bind / DNS / Nameserver Issues' started by MediaServe, Dec 9, 2013.

  1. MediaServe

    MediaServe Well-Known Member
    PartnerNOC

    Joined:
    Apr 9, 2004
    Messages:
    126
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    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.
     
  2. MediaServe

    MediaServe Well-Known Member
    PartnerNOC

    Joined:
    Apr 9, 2004
    Messages:
    126
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    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.
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
Loading...

Share This Page