dokku / dokku-elasticsearch

an elasticsearch plugin for dokku
MIT License
94 stars 35 forks source link

Elasticsearch 5.2.0 support #51

Closed dmr closed 7 years ago

dmr commented 7 years ago

I installed the elasticsearch 5.2.0 image using export ELASTICSEARCH_IMAGE_VERSION="5.2.0". The installation was ok, but the installed image keeps restarting.

This is what the logs show:

[2017-02-15T08:30:35,793][INFO ][o.e.n.Node               ] initialized
[2017-02-15T08:30:35,793][INFO ][o.e.n.Node               ] [umWQ0NZ] starting ...
[2017-02-15T08:30:35,864][WARN ][i.n.u.i.MacAddressUtil   ] Failed to find a usable hardware address from the network interfaces; using random bytes: ce:c1:82:c9:42:1e:fd:77
[2017-02-15T08:30:35,974][INFO ][o.e.t.TransportService   ] [umWQ0NZ] publish_address {172.17.0.11:9300}, bound_addresses {[::]:9300}
[2017-02-15T08:30:35,980][INFO ][o.e.b.BootstrapChecks    ] [umWQ0NZ] 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 [65530] is too low, increase to at least [262144]
[2017-02-15T08:30:35,988][INFO ][o.e.n.Node               ] [umWQ0NZ] stopping ...

Looks like vm.max_map_count is too small.

https://www.elastic.co/guide/en/elasticsearch/reference/current/vm-max-map-count.html

--> How can I adjust sysctl inside an image?

dmr commented 7 years ago

I changed the value in host machine:

sysctl -w vm.max_map_count=262144

And then the restarts stopped for now.

--> I think dokku-elasticsearch supports elasticsearch 5.2.0 but the image adds some constraints to the host. Do I understand this correctly?

fmvilas commented 7 years ago

@dmr these constraints come from ElasticSearch 5.2.0, not this plugin. Check this out: https://www.elastic.co/guide/en/elasticsearch/reference/current/vm-max-map-count.html

dmr commented 7 years ago

Ok, this issue is resolved :)