You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
systemd-resolved negative caching for extended period of time #5552
If a DNS lookup returns SERVFAIL, systemd-resolved seems to cache the result for very long (infinity?). I have to restart systemd-resolved to have the negative caching purged.
After SERVFAIL DNS server issue has been resolved, chromium/firefox still returns DNS error despite host can correctly resolve the name.
changed the title [-]systemd-resolved negative caching for extended period of time Edit[/-][+]systemd-resolved negative caching for extended period of time[/+]on Mar 7, 2017
It's happening to me at this very moment: systemd 237-3ubuntu10 installed on ubuntu bionic.
The hostname was first resolved before it was added to the local DNS, then even after it was added systemd-resolve fails to resolve it even after few minutes.
Please default to no-negative. Caching is useful but in general SOA records are set to 15 min by default which can be long for dynamically changing cloud apps.
Disabling negative caching is crucial when using consul or other service discovery that work on dns, would be sad having to disable caching completely.
Activity
[-]systemd-resolved negative caching for extended period of time Edit[/-][+]systemd-resolved negative caching for extended period of time[/+]poettering commentedon Mar 29, 2017
We cache SERVFAIL for 30s now. Are you saying it is cached longer for you?
See 201d995
zerkms commentedon Jun 26, 2018
It's happening to me at this very moment:
systemd 237-3ubuntu10installed on ubuntu bionic.The hostname was first resolved before it was added to the local DNS, then even after it was added
systemd-resolvefails to resolve it even after few minutes.The systemd-resolve config:
and my current observations:
zerkms commentedon Jun 26, 2018
While researching it I emitted
getent hosts hostname.tld.redactedand it presumably cleared the cache.So the negative cache entry was there for at least an hour.
voggur commentedon Feb 6, 2019
Is it possible to disable negative caching in resolved.conf ?
xnox commentedon Feb 9, 2019
One can flush caches, using
And one can disable all caching in
/etc/systemd/resolved.confby settingCache=no, if the key is listed there.Not sure if we need to change Cache to a tri-state to allow "no, no-negative, yes" values.
Spenser309 commentedon Apr 11, 2019
Please default to no-negative. Caching is useful but in general SOA records are set to 15 min by default which can be long for dynamically changing cloud apps.
rhamon commentedon Jun 6, 2019
Disabling negative caching is crucial when using consul or other service discovery that work on dns, would be sad having to disable caching completely.
resolved: switch cache option to a tri-state option (systemd#5552).
niedbalski commentedon Jul 16, 2019
I've submitted a proposal PR for addressing the tri-state cache option. Please check #13047
1 remaining item
resolved: lower SERVFAIL cache timeout from 30s to 10s
resolved: lower SERVFAIL cache timeout from 30s to 10s
resolved: lower SERVFAIL cache timeout from 30s to 10s