Skip to content

Instantly share code, notes, and snippets.

@mysticaltech
Created January 3, 2019 21:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mysticaltech/c681f95318bcb178e62294b18023ff54 to your computer and use it in GitHub Desktop.
Save mysticaltech/c681f95318bcb178e62294b18023ff54 to your computer and use it in GitHub Desktop.
All right, just a quick recap on this issue for people looking to setup Elasticsearch 5.x. There's a workable solution in the above comments, but was a bit of trial an error. Hope this speeds things up for others:
Edit /etc/sysctl.conf, add vm.max_map_count = 262144 at the bottom. Then run sysctl -p to load the changes.
Create a new Elasticsearch instance with dokku, per manual. I've only tested this with the latest 5.x release.
export ELASTICSEARCH_IMAGE="elasticsearch"
export ELASTICSEARCH_IMAGE_VERSION="5.6.12"
dokku elasticsearch:create lollipop
This will result in the "unable to connect" error. But now worries.
Edit /var/lib/dokku/services/elasticsearch/lollipop/config/jvm.options
Change the 2g values for -Xms and -Xmx to 512m:
-Xms2g -> -Xms512m
-Xmx2g -> -Xmx512m
Edit /var/lib/dokku/services/elasticsearch/lollipop/config/elasticsearch.yml
Double check there is only one network.host: 0.0.0.0 at the bottom of the file. (For reasons unknown to me, it was there twice, making Elasticsearch barf on boot up.)
Wait for the Elasticsearch container to restart itself, it will retry about every minute. You can check the logs with docker logs <container_id>. You can get the container_id by looking at docker ps.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment