Clearing Tomcat's DNS cache

To my understanding Tomcat uses separate DNS-cache on Linux. How can I clear it ?

Our Tomcat server is running an app that uses service on another server that got it's IP-address changed. Now I am getting noRouteToHost exceptions even when the service on the another server seems to be accessible using it's DNS name when testing from another computer. Also when pinging the the "new-IP" server from the server that got tomcat installed using its DNS name the ping pings the correct new IP address.


Oracle/Sun Java offers internal cache for it's own name resolution mechanism (it is not specific to Apache Tomcat servlet container).

For now, it seems that easiest solution would be restart whole JVM container. Later, if you want to completely disable internal DNS cache, you can do this by setting networkaddress.cache.ttl and networkaddress.cache.negative.ttl system properties to 0 (more about these Java properties can be found here).