Sample Header Ad - 728x90

DNS and long running process (resolver)

1 vote
0 answers
243 views
I've come across an issue where a Java (1.8) application is continuing to use the DNS servers configured when the process started rather than the current configuration. This persisted for a week before the Java application was restarted. Specifically this is running on Centos 6 (yes, I know) with nscd (600s TTL for host caching). One of the 2 DNS servers was retired and a new one added at a different IP address. This was added to resolv.conf (i.e. 2 working DNS servers) and nscd restarted. However Java appears to continue using the retired DNS server / did not switch to the surviving DNS server / did not attempt to use the new DNS server. Are there rules / expectations over how the resolver should behave in such a scenario? - Should it periodically check the configuration? - Should it try another DNS server when one times out? Pointers to specifications (Posix?) would be appreciated
Asked by symcbean (6301 rep)
Sep 14, 2022, 10:56 AM