Found an interesting problem this morning after the IP address of a web server was changed in our DNS. Web browsers could see the site at the new address, the command line of ping server could see the site just fine, but the long-running Java pinger application could not see the server at all. All we received were messages informing us that it could not contact the moved server. After some digging on the internet I quickly found the reason why: networkaddress.cache.ttl (default: -1) Specified in java.security to indicate the caching policy for successful name lookups from the name service.. The value is specified as as integer to indicate the number of seconds to cache the successful lookup. A value of -1 indicates "cache forever". Sourced from: J2SE 1.4.2 Networking Properties This is also mentioned in another post on how to Disable DNS caching . So you need to restart the JVM to pick up recent DNS changes... or you could change the networkaddress.cache.ttl System
eng mgr / leader / full stack / java / agile / tdd / security / aws / go