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

Issue on latest image: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144] #92

Closed
fahadysf opened this issue Nov 27, 2016 · 10 comments

Comments

@fahadysf
Copy link

fahadysf commented Nov 27, 2016

Launching the latest docker image fails with the error message:

Output from image console is: pastebin-link with complete output

Relevant error message:
elk_1 | [2016-11-27T21:58:16,368][INFO ][o.e.b.BootstrapCheck ] [jpehzFE] bound or publishing to a non-loopback or non-link-local address, enforcing bootstrap checks
elk_1 | [2016-11-27T21:58:16,369][ERROR][o.e.b.Bootstrap ] [jpehzFE] node validation exception
elk_1 | bootstrap checks failed
elk_1 | max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

@fahadysf
Copy link
Author

I googled up this issue on the elasticsearch docker image issue list and the suggestion to use:
sysctl -w vm.max_map_count=262144
on the host running the image resolves the problem. Is there any other/better way to do this?

@spujadas
Copy link
Owner

That's one way to do it, you can make the change permanent by editing the /etc/sysctl.conf file (see #79, #89, and http://elk-docker.readthedocs.io/#troubleshooting).

@x-itec
Copy link

x-itec commented Aug 11, 2017

Even if this value is correct, ES5 won't start anymore in docker with same error here bla bla readonly error.

@spujadas
Copy link
Owner

@x-itec This issue has been pretty much solved for everyone by now, so shouldn't remain a problem: see http://elk-docker.readthedocs.io/#prerequisites for ways around this. If this doesn't solve it:

  • Could you post a full output of how you set vm.max_map_count and started the container + output from the container? ("bla bla readonly error" isn't the usual error one gets when the parameter is set incorrectly)

  • What are you running Docker on?

  • Can you confirm that you have set vm.max_map_count on the host?

  • If you bash into the container, has this value been taken into account?

  • Depending on your setup, have you tried setting the MAX_MAP_COUNT environment variable?

@nexusguy59
Copy link

Hello Guys,

I am getting similar behavior:

root@cfELK:~# sysctl -w vm.max_map_count=262144
sysctl: setting key "vm.max_map_count": Read-only file system

I tried this and it did take but it still doesn't start with the new value
vim /etc/sysctl/sysctl.conf
and added this to the bottom of the file and rebooted the server
vm.max_map_count = 262144

So at this point not sure where to go with this, any help would be appreciated,
Thanks,
Michael

@spujadas
Copy link
Owner

spujadas commented Oct 7, 2017

@nexusguy59

root@cfELK:~# sysctl -w vm.max_map_count=262144
sysctl: setting key "vm.max_map_count": Read-only file system

It seems that you're attempting to change the parameter in the container: you need to do it on the host running the container (and check that the value has actually been updated using sysctl vm.max_map_count).

@sunnyagain
Copy link

root@cfELK:~# sysctl -w vm.max_map_count=262144 Helped me, Many thanks

@nexusguy59
Copy link

nexusguy59 commented Oct 9, 2017 via email

@mkbru
Copy link

mkbru commented Nov 21, 2017

@spujadas

What if the host is windows? How do you change the parameter.

root@cfELK:~# sysctl -w vm.max_map_count=262144
sysctl: setting key "vm.max_map_count": Read-only file system
It seems that you're attempting to change the parameter in the container: you need to do it on the host running the container (and check that the value has actually been updated using sysctl vm.max_map_count).

@spujadas
Copy link
Owner

@mikebrusilov haven't tested it but I assume that boot2docker/boot2docker#1216 should do the trick. Let me know if it works out for you.

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

No branches or pull requests

6 participants