DNS Serving Old Records (rather than the latest)

Discussion in 'General' started by snowweb, Mar 10, 2023.

  1. snowweb

    snowweb Member

    I have updated the DNS of a domain on the server and then queried the server directly from the CLI of the same server and it is serving me the previous record (even several days after it was changed.
    I have tried:
    1. Code:
      systemd-resolved --flush-caches
      but it didn't make any difference.
    2. Code:
      systemctl resart systemd-resolved
    3. Code:
      systemctl restart bind9
    The current serial number displayed in the control panel, where the updated current values are properly displayed is 2023031001 but the record retrieved on the command line is 2020082713.
    This is the command line result:
    upload_2023-3-10_14-51-34.png
    The other records are also affected (TXT, A, etc.). Probably other domains too.
    Please advise what I can do to force bind to retrieve the updated values from the database?
    Thanks!
     
    Last edited: Mar 10, 2023
  2. pyte

    pyte Well-Known Member HowtoForge Supporter

    Check the folder with the zonefiles. I assume there will be a file called: pri.snowweb.net.err which indicates that there is an error within the zonefile.
    You can check why there is an error with:
    Code:
    named-checkzone snowweb.net pri.snowweb.net.err
     
    ahrasis and snowweb like this.
  3. snowweb

    snowweb Member

    Thanks pyte!
    I did as you said and saw that it was complaining that I had removed the 'A' records for the nameservers, which I did, thinking that they were unnecessary, since to find them, you must already know the IP address (or so I thought!).

    I've added them back in and now everything is working beautifully again.
    It would be nice if the control panel checked for the presence of an error file and marked the zone as "in error state", with an option to display the error. :)
     
    pyte likes this.
  4. pyte

    pyte Well-Known Member HowtoForge Supporter

    I have mentioned this in the past and i think there are plans to implement this IIRC. You might be able to find an open issue on the gitlab.
     
    ahrasis and snowweb like this.

Share This Page