DNS won't get updated

Hi,

I’m just migrating some stuff from my old production server to a new machine. So far everything runs nicely, and I managed to migrate a dozen WordPress sites from various domains to the new machine without too much downtime.

One domain is giving me headaches though. Here’s the updated zone file for microlinux.fr (simplified for readability):

; /var/named/zone.microlinux.fr
$TTL 86400
$ORIGIN microlinux.fr.
@ IN SOA ns.microlinux.fr. hostmaster.microlinux.fr. (
   2024010606   ; sn
        10800   ; refresh (3 hours)
          600   ; retry (10 minutes)
      1814400   ; expiry (3 weeks)
        10800 ) ; minimum (3 hours)
        IN          NS      ns.microlinux.fr.
        IN          NS      nssec.online.net.
        IN          MX      10 mail.microlinux.fr.
microlinux.fr.      A       51.159.21.129
ns      IN          A       51.159.21.129
mail    IN          A       51.159.21.129
@       IN          TXT     "v=spf1 mx ~all"
01._domainkey   IN  TXT     ( "v=DKIM1; k=rsa; "
  ... ----- DKIM key 01 for microlinux.fr
_dmarc  IN          TXT     "v=DMARC1; p=none; sp=quarantine"
cloud   CNAME               microlinux.fr.
docs    CNAME               microlinux.fr.
formation-linux CNAME       microlinux.fr.

; New prod server
blog        IN      A       163.172.82.215
bsco        IN      A       163.172.82.215
compta      IN      A       163.172.82.215
archives    IN      A       163.172.82.215
www         IN      A       163.172.82.215

I seem to have a problem with blog.microlinux.fr.

When I do this on the DNS server itself, I get the expected result:

# host blog.microlinux.fr
blog.microlinux.fr has address 163.172.82.215

But on any other machine, I still get the old (stale) record:

# host blog.microlinux.fr
blog.microlinux.fr is an alias for microlinux.fr.
microlinux.fr has address 51.159.21.129
microlinux.fr mail is handled by 10 mail.microlinux.fr.

Of course, I did think to increment the serial number in the zone file and reloaded BIND’s configuration.

Curiously enough, all other subdomain migrations went instantly and without a hiccup. Only this one keeps stuck.

Any suggestions ?

DNS can be cached on the machines in question. I have this sometimes, I just turn the adapter off and back on again, be it wifi or ethernet.

Although, most likely there is a way you can flush the cache. I’ve no idea if it’s due to dnsmasq or some systemd process or something with Network Manager itself.

The DNS eventually will clear from the cache on that system. Alternatively a quick reboot should help too. Also check/verify it is actually using the correct DNS server just in case as you may be querying the wrong server on that system.

1 Like

Thanks for the clarification. Just out of curiosity: what do you get when you type ?

$ host blog.microlinux.fr

I get this:

dig +short blog.microlinux.fr
163.172.82.215

and for NS servers:

dig +short microlinux.fr ns
nssec.online.net.
ns.microlinux.fr.

both of those servers also give same result for the blog entry.

1 Like

One other thing, nssec.online.net has a TTL of 86400 which is 24 hours. Which could also affect your replies, since every edit, will not be active until 24 hours have passed.

EDIT: although that said, your ns.microlinux.fr server also has 86400 for the blog.microlinux.fr entry. And even if it didn’t, if you cannot change the TTL on the nssec.online.net one, then you will have a mixmatch of entries up until 24 hours have passed. For example, if you set TTL to 300 on your DNS server, then your entries will refresh in 5 mins and give the correct value across the entire world. However, the second server if it cannot be changed, and has 24 hours, means that you’ll end up with that one being out of sync. At least until 24 hours has passed.

1 Like

Thanks again ! Looks like the problem will be automagically solved tomorrow at the same time.

1 Like