JVM and OS DNS Caching

前端 未结 3 644
你的背包
你的背包 2021-02-07 20:16

I am facing a problem with JVM and DNS.

Everything I\'m reading (including the docs and this) says that I can disable JVM DNS caching using networkaddress.cache.tt

3条回答
  •  滥情空心
    2021-02-07 21:03

    From here it seems you should set sun.net.inetaddr.ttl. This worked for me.

    Example from link:

    java -Dsun.net.inetaddr.ttl=1 test
    Enter the hostname
    rrr
    Output isrrr/129.145.146.100
    Enter the hostname
    rrr
    Output isrrr/129.147.146.100
    

提交回复
热议问题