Skip to content
This repository has been archived by the owner on Nov 7, 2018. It is now read-only.

Disable Java DNS (for-ever-)Cache, which prevents discovery of moving masters #65

Open
rudibatt opened this issue Oct 31, 2018 · 0 comments

Comments

@rudibatt
Copy link

The base image doesn't change the default Java DNS cache setting, which is set to "cache for ever". This is not the desired behaviour in a kubernetes setup, where the IP adresses of the pods can change because of rescheduling, draining etc.
Unfortunately it's not realy possible (just with a deprecated option) to overwrite that behaviour with java startup parameters.
See https://stackoverflow.com/a/17219327/1460924

I'd suggest that either during image creation or at the docker-entrypoint.sh (at the base image) the "networkaddress.cache.ttl" setting is set to a value >= 0, for example:

sed -i 's/.*networkaddress.cache.ttl.*/networkaddress.cache.ttl=60' \
/usr/lib/jvm/default-jvm/jre/lib/security/java.security
@rudibatt rudibatt changed the title Disable Java DNS Cache-for-ever, which prevents discovery of moving masters Disable Java DNS (for-ever-)Cache, which prevents discovery of moving masters Oct 31, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant