Background
The DNS cache is a temporary storage of DNS records of resolved domain names
A Time to Live (TTL) field controls how long each record is valid
- on Unix-like systems there is no OS-level DNS cache
- on Windows systems there is an OS-level DNS cache with a TTL of 1 day or less.
- on RunMyJobs On-Premise the DNS cache TTL is infinite by default
- on RunMyJobs SaaS the DNS cache TTL is 30 seconds by default
Instructions
To flush the DNS cache
- on Windows systems issue ipconfig /flushdns (or Clear-DnsClientCache in powershell)
- on RunMyJobs On-Premise restart the RMJ environment
To configure the DNS cache TTL as 60 seconds
- on RunMyJobs On-Premise edit java.security (ie /etc/java-17-openjdk/security/java.security) and change
#networkaddress.cache.ttl=-1
into
networkaddress.cache.ttl=60
To verify settings issue following in Scripting > Shell
import java.net.InetAddress;
{
InetAddress address = InetAddress.getByName("<host>");
jcsOut.println(address.getHostAddress());
jcsOut.println(address.getHostName());
jcsOut.println(java.security.Security.getProperty("networkaddress.cache.ttl"));
}
Comments
2 comments
How do you clear the Redwood DNS cache?
I have reworked the article to make instructions a bit clearer.
For clearing the DNS cache of RunMyJobs On-Premise you need to restart the environment
Please sign in to leave a comment.