# Using wsl2 install elasticsearch cant' create vm.max\_map\_cout

**URL:** <https://discuss.elastic.co/t/using-wsl2-install-elasticsearch-cant-create-vm-max-map-cout/188594>\
**Category:** Elasticsearch\
**Created:** [July 3, 2019, 1:57am UTC](https://discuss.elastic.co/t/using-wsl2-install-elasticsearch-cant-create-vm-max-map-cout/188594 "2019-07-03T01:57:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rick\_zhang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rick_zhang/32/48786_2.png) [@rick\_zhang](https://discuss.elastic.co/u/rick_zhang)\
**Post date:** [July 3, 2019, 1:57am UTC](https://discuss.elastic.co/t/using-wsl2-install-elasticsearch-cant-create-vm-max-map-cout/188594/1 "2019-07-03T01:57:33Z")

</div>

i have using wsl2 and debian 9.9 from windows appstore , install elasticsearch 7.2 and service elasticsearch start sucess but have a error ,when i startup another node from command, always have a same error . system can't create vm.max\_map\_count. wsl2 how cant setup vm.max\_map\_count?  
when i starup from command,

elasticsearch@zhangqi:/usr/share/elasticsearch/bin$ ./elasticsearch -E node.name=node01 -E cluster.name=zhangqi -E path.data=/home/elasticsearch/data/node01  
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.  
[2019-07-06T17:35:44,741][INFO][o.e.p.PluginsService] [zhangqi] loaded module [x-pack-watcher]  
[2019-07-06T17:35:44,742][INFO][o.e.p.PluginsService] [zhangqi] no plugins loaded  
[2019-07-06T17:35:47,560][INFO][o.e.x.s.a.s.FileRolesStore] [zhangqi] parsed [0] roles from file [/etc/elasticsearch/roles.yml]  
[2019-07-06T17:35:48,054][INFO][o.e.x.m.p.l.CppLogMessageHandler] [zhangqi] [controller/27452] [Main.cc@110] controller (64 bit): Version 7.2.0 (Build 65aefcbfce449b) Copyright (c) 2019 Elasticsearch BV  
[2019-07-06T17:35:48,371][DEBUG][o.e.a.ActionModule] [zhangqi] Using REST wrapper from plugin org.elasticsearch.xpack.security.Security  
[2019-07-06T17:35:48,790][INFO][o.e.d.DiscoveryModule] [zhangqi] using discovery type [zen] and seed hosts providers [settings]  
[2019-07-06T17:35:49,389][INFO][o.e.n.Node] [zhangqi] initialized  
[2019-07-06T17:35:49,389][INFO][o.e.n.Node] [zhangqi] starting ...  
[2019-07-06T17:35:49,500][INFO][o.e.t.TransportService] [zhangqi] publish\_address {10.11.3.186:9300}, bound\_addresses {[::]:9300}  
[2019-07-06T17:35:49,507][INFO][o.e.b.BootstrapChecks] [zhangqi] bound or publishing to a non-loopback address, enforcing bootstrap checks  
_[2019-07-06T17:35:49,509][WARN][o.e.b.BootstrapChecks] [zhangqi] I/O exception while trying to read [/proc/sys/vm/max\_map\_count]_  
_java.nio.file.NoSuchFileException: /proc/sys/vm/max\_map\_count_  
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:92) ~[?:?]  
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111) ~[?:?]  
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116) ~[?:?]  
at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:219) ~[?:?]  
at java.nio.file.Files.newByteChannel(Files.java:373) ~[?:?]  
at java.nio.file.Files.newByteChannel(Files.java:424) ~[?:?]  
at java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:420) ~[?:?]  
at java.nio.file.Files.newInputStream(Files.java:158) ~[?:?]  
......  
root@zhangqi:/usr/share/elasticsearch/bin# cat /proc/sys/vm/max\_map\_count  
"can't create vm.max\_map\_count"  
root@zhangqi:/usr/share/elasticsearch/bin# echo 262144\> /proc/sys/vm/max\_map\_count  
bash: /proc/sys/vm/max\_map\_count: Operation not permitted

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [July 3, 2019, 3:00am UTC](https://discuss.elastic.co/t/using-wsl2-install-elasticsearch-cant-create-vm-max-map-cout/188594/2 "2019-07-03T03:00:37Z")

</div>

Please don't post pictures of text, they are difficult to read, impossible to search and some people may not be even able to see them 🙂

---

<div class="post-metadata">

**Author:** ![rick\_zhang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rick_zhang/32/48786_2.png) [@rick\_zhang](https://discuss.elastic.co/u/rick_zhang)\
**Post date:** [July 6, 2019, 9:40am UTC](https://discuss.elastic.co/t/using-wsl2-install-elasticsearch-cant-create-vm-max-map-cout/188594/3 "2019-07-06T09:40:48Z")

</div>

i have remove picture:sweat\_smile:

---

<div class="post-metadata">

**Author:** ![Juanma](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/juanma/32/49076_2.png) [@Juanma](https://discuss.elastic.co/u/Juanma)\
**Post date:** [July 6, 2019, 9:56am UTC](https://discuss.elastic.co/t/using-wsl2-install-elasticsearch-cant-create-vm-max-map-cout/188594/4 "2019-07-06T09:56:24Z")

</div>

Hello @rick_zhang

The "vm.max\_map\_count" it's a linux kernel parameter. You are using WSL2 which have a linux but I think that only if you uses a distro backed by "WSL2" did you follow the official Install guide? [https://docs.microsoft.com/en-us/windows/wsl/wsl2-install](https://docs.microsoft.com/en-us/windows/wsl/wsl2-install)

To be honest it's more an WSL issue than an elasticsearch one, WSL never have been friendly with kernel parameters. And as I see a file not found exception seems that you have taken a linux image without kernel.

I hope this helps

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 3, 2019, 9:56am UTC](https://discuss.elastic.co/t/using-wsl2-install-elasticsearch-cant-create-vm-max-map-cout/188594/5 "2019-08-03T09:56:25Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
