-
Notifications
You must be signed in to change notification settings - Fork 344
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
elasticsearch:5.0.0 max virtual memory areas vm.max_map_count [65530] likely too low, increase to at least [262144] #111
Comments
Same here. |
Duplicate of #98, |
set max_map_count value (Linux)
|
From this link The vm_max_map_count kernel setting needs to be set to at least 262144 for production use. Depending on your platform: The vm_map_max_count setting should be set permanently in /etc/sysctl.conf:
To apply the setting on a live system type:
|
Hey Guys, and I still get the same error.... any ideas?? |
@tzookb, did you also set max map count like this comment? And possibly an env var of |
Thanks @yosifkit I can add this, to my docker .env file right :
but where do I update the above max map?
Thanks!! |
Linux 16 Azure
|
@tzookb you should use the sysctl -w command on the host machine not in the docker container. This will solve the issue. Hope this helps... |
I don't have sudo access on host machine. So How do I solve this in this case? |
@kanihal, If you have full Docker access, you have sudo access. 😉 $ sysctl vm.max_map_count
vm.max_map_count = 262144
$ docker run -it --rm --privileged --net=host --pid=host -v /:/host debian:sid chroot /host sysctl -w vm.max_map_count=262145
vm.max_map_count = 262145
$ sysctl vm.max_map_count
vm.max_map_count = 262145 |
@yosifkit Thanks it worked. host info:
BTW why are we using |
No particular reason; you could use whatever base image you want as long as it has |
@yosifkit |
@kanihal, I have no idea. I only know that elasticsearch requires a large enough As the image is working fine then I suggest heading to the Docker Community Forums, the Docker Community Slack, or Stack Overflow for further help or debugging. As a side note, if you are using the 5 series, then you will have #153 and not run into this problem; that is not true for the the 6 series and above (like the config from 6.6.0). I did manage to get it $ sysctl vm.max_map_count
vm.max_map_count = 262000
$ # ie, less than the required 262144
$ # basically this replaces the default cluster ready config
$ # and sets the config in such a way that the bootstrap checks done by elasticsearch are no longer fatal
$ # probably need a volume, not "-it --rm", etcetera
$ docker run -it --rm elasticsearch:6.6.0 sh -c 'echo "http.host: 0.0.0.0" > /usr/share/elasticsearch/config/elasticsearch.yml && exec docker-entrypoint.sh'
....
[2019-02-20T00:53:20,533][WARN ][o.e.b.BootstrapChecks ] [qjR9jM-] max virtual memory areas vm.max_map_count [262000] is too low, increase to at least [262144]
.... It would probably be simpler to create an image: FROM elasticsearch:6.6.0
# cat local-config.yml
# http.host: 0.0.0.0
COPY local-config.yml /usr/share/elasticsearch/config/elasticsearch.yml
# alternative to COPY + file
RUN echo 'http.host: 0.0.0.0' > /usr/share/elasticsearch/config/elasticsearch.yml |
If someone else stumbles over this for a test system you can also disable the bootstrap checks by setting in the discovery.type: single-node |
If we are using Docker in Windows Home, we have to do the following:
|
My docker compose file functional!
|
how do I run this:
right before my docker containers start up (imagine that I reboot an ec2 instance). does docker-compose have a "before" hook? |
I'd recommend using a file in In the future, these sorts of questions/requests would be more appropriately posted to the Docker Community Forums, the Docker Community Slack, or Stack Overflow. |
I get this message when I try to run the
elasticsearch:5.0.0
image:I also tried this:
With the following config:
The text was updated successfully, but these errors were encountered: