Skip to content
Permalink
Browse files
Add comment about the use of sun.net.inetaddr.ttl system property
  • Loading branch information
tbouron committed May 30, 2018
1 parent 2962a16 commit 62d4275766b7854ebf518013897be60c5adcfe5e
Showing 1 changed file with 3 additions and 0 deletions.
@@ -90,6 +90,9 @@ export EXTRA_JAVA_OPTS="-Dbrooklyn.location.localhost.address=127.0.0.1 ${EXTRA_
export EXTRA_JAVA_OPTS="-XX:SoftRefLRUPolicyMSPerMB=1 ${EXTRA_JAVA_OPTS}"

# Set the DNS TTL for the JVM
# By default, java does not refresh DNS records, ever. This is due to the default value of networkaddress.cache.ttl set to -1, i.e. cache forever.
# However, networkaddress.cache.ttl is not a system property, but a security property. It cannot be updated through from the JVM.
# But, using the old system property sun.net.inetaddr.ttl has the desirable effect (see: https://stackoverflow.com/a/17219327)
export EXTRA_JAVA_OPTS="-Dsun.net.inetaddr.ttl=${DNS_TTL} ${EXTRA_JAVA_OPTS}"

# Set the TLS protocol versions

0 comments on commit 62d4275

Please sign in to comment.