how to ensure changes is the /etc/hosts file are picked up by the gatewat

Document ID : KB000108732
Last Modified Date : 31/07/2018
Show Technical Document Details
How to ensure, that the changes in the /etc/hosts file and DNS are picked up by the gateway?
The Backend servers sometimes change IP-address. Some of these changes are done within the DNS other are set via the /etc/hosts file of the gateway.
The machine itself, will pick up the changes directly. But the gateway service runs as a java process and this java process needs to pick up the changed values.

To ensure this there are 2 options:
1) restart the gateway service on the node.
2) The refresh of the cache in java is configured by the value of "networkaddress.cache.ttl" in the file (/opt/SecureSpan/JDK/jre/lib/security/
The JVM uses this to configure TTL for the DNS cache.  If the "networkaddress.cache.ttl" option is set to zero, the java process would never cache DNS lookups.
At that time the OS DNS caching policy would be determining what is done as beyond that the underlying OS would handle resolution. It would also depend on how long you have set the TTL for the records in your environment.