Skip to content
This repository was archived by the owner on Nov 7, 2018. It is now read-only.
This repository was 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

@rudibatt

Description

@rudibatt

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions