Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add upstream quote about elastic 5.x vm.max_map_count check #778

Merged
merged 1 commit into from
Dec 19, 2016

Conversation

yosifkit
Copy link
Member

Copy link
Member

@tianon tianon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 👍

@tianon tianon merged commit 0e7f7bf into docker-library:master Dec 19, 2016
@tianon tianon deleted the elastic-vm-max-map branch December 20, 2016 00:00
@yosifkit
Copy link
Member Author

Reading further in elastic/elasticsearch#4978, I found this:

You can set http.host independently of transport.host (network.host sets both); the bootstrap checks are only enforced if a node is able to form a cluster with other instances not on localhost
- elastic/elasticsearch#4978 (comment)

So maybe, instead we change our default provided config to not set network.host and instead just http.host and print a warning in the logs and here in the docs to let users know how to set it up for clustering.

@yosifkit
Copy link
Member Author

So, it will work with a smaller vm.max_map_count on the host; the only drawback is that it won't be able to cluster with other nodes, since that part is now only on localhost of the container.

$ sudo sysctl -w vm.max_map_count=262144
$ docker run -it --rm elacticsearch:5
...
[2016-12-20T00:47:34,773][INFO ][o.e.b.BootstrapCheck     ] [vvWlFNU] bound or publishing to a non-loopback or non-link-local address, enforcing bootstrap checks
... works (no warning or error)
$ sudo sysctl -w vm.max_map_count=262000
$ docker run -it --rm elacticsearch:5
...
[2016-12-20T00:32:39,125][INFO ][o.e.b.BootstrapCheck     ] [YoNYX3Z] bound or publishing to a non-loopback or non-link-local address, enforcing bootstrap checks
ERROR: bootstrap checks failed
max virtual memory areas vm.max_map_count [262000] is too low, increase to at least [262144]
... fails
$ # build new elasticsearch:5 with 
diff --git a/5/config/elasticsearch.yml b/5/config/elasticsearch.yml
-network.host: 0.0.0.0
+http.host: 0.0.0.0
$ # vm.max_map_count still set to 262000
$ docker run -it --rm new-elacticsearch:5
...
[2016-12-20T00:36:44,447][INFO ][o.e.t.TransportService   ] [UdTHcL7] publish_address {127.0.0.1:9300}, bound_addresses {[::1]:9300}, {127.0.0.1:9300}
[2016-12-20T00:36:44,452][WARN ][o.e.b.BootstrapCheck     ] [UdTHcL7] max virtual memory areas vm.max_map_count [262000] is too low, increase to at least [262144]
... SUCCESS! (just a warning)

@tianon
Copy link
Member

tianon commented Dec 20, 2016 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants