# Unable to lock JVM Memory

**URL:** <https://discuss.elastic.co/t/unable-to-lock-jvm-memory/33625>\
**Category:** Elasticsearch\
**Created:** [November 3, 2015, 12:21pm UTC](https://discuss.elastic.co/t/unable-to-lock-jvm-memory/33625 "2015-11-03T12:21:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Carlos\_Vega\_Moreno](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carlos_vega_moreno/32/3773_2.png) [@Carlos\_Vega\_Moreno](https://discuss.elastic.co/u/Carlos_Vega_Moreno)\
**Post date:** [November 3, 2015, 12:21pm UTC](https://discuss.elastic.co/t/unable-to-lock-jvm-memory/33625/1 "2015-11-03T12:21:59Z")

</div>

I updated to elasticsearch 2.0 and now I cannot restart the service:

I get the following log messages. My yml config file has the bootstrap.mlockall: true line on it.

> [2015-11-03 13:18:25,842][WARN][bootstrap] Unable to lock JVM Memory: error=12,reason=Cannot allocate memory  
> [2015-11-03 13:18:25,842][WARN][bootstrap] This can result in part of the JVM being swapped out.  
> [2015-11-03 13:18:25,842][WARN][bootstrap] Increase RLIMIT\_MEMLOCK, soft limit: 65536, hard limit: 65536  
> [2015-11-03 13:18:25,842][WARN][bootstrap] These can be adjusted by modifying /etc/security/limits.conf, for example:
> 
> # allow user 'elasticsearch' mlockall
> 
> elasticsearch soft memlock unlimited  
> elasticsearch hard memlock unlimited  
> [2015-11-03 13:18:25,842][WARN][bootstrap] If you are logged in interactively, you will have to re-login for the new limits to take effect.  
> [2015-11-03 13:18:26,089][INFO][node] [es\_hele] version[2.0.0], pid[5709], build[de54438/2015-10-22T08:09:48Z]  
> [2015-11-03 13:18:26,089][INFO][node] [es\_hele] initializing ...  
> [2015-11-03 13:18:26,097][ERROR][bootstrap] Exception  
> java.lang.IllegalStateException: Unable to initialize plugins  
> at org.elasticsearch.plugins.PluginsService.(PluginsService.java:115)  
> at org.elasticsearch.node.Node.(Node.java:144)  
> at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:145)  
> at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:170)  
> at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:270)  
> at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)  
> Caused by: java.nio.file.NoSuchFileException: /usr/share/elasticsearch/plugins/migration/plugin-descriptor.properties  
> at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)  
> at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)  
> at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)  
> at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214)  
> at java.nio.file.Files.newByteChannel(Files.java:317)  
> at java.nio.file.Files.newByteChannel(Files.java:363)  
> at java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:380)  
> at java.nio.file.Files.newInputStream(Files.java:108)  
> at org.elasticsearch.plugins.PluginInfo.readFromProperties(PluginInfo.java:86)  
> at org.elasticsearch.plugins.PluginsService.getPluginBundles(PluginsService.java:306)  
> at org.elasticsearch.plugins.PluginsService.(PluginsService.java:112)

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [November 3, 2015, 12:31pm UTC](https://discuss.elastic.co/t/unable-to-lock-jvm-memory/33625/2 "2015-11-03T12:31:26Z")

</div>

Never mind mlockall, this is what's killing it:

> Caused by: java.nio.file.NoSuchFileException: /usr/share/elasticsearch/plugins/migration/plugin-descriptor.properties

---

<div class="post-metadata">

**Author:** ![Carlos\_Vega\_Moreno](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carlos_vega_moreno/32/3773_2.png) [@Carlos\_Vega\_Moreno](https://discuss.elastic.co/u/Carlos_Vega_Moreno)\
**Post date:** [November 3, 2015, 12:33pm UTC](https://discuss.elastic.co/t/unable-to-lock-jvm-memory/33625/3 "2015-11-03T12:33:32Z")

</div>

I removed the migration plugin and now I'm getting this error:

> Guice Exception: java.lang.IllegalStateException: unable to upgrade the mappings for the index [.kibana], reason: [Mapper for [hits] conflicts with existing mapping in other types:

Upgrading elasticsearch should be easier. I ran the migration test and everything went ok. Now what? should I remove the kibana index right away from the data folder?

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [November 3, 2015, 12:39pm UTC](https://discuss.elastic.co/t/unable-to-lock-jvm-memory/33625/4 "2015-11-03T12:39:14Z")

</div>

Do not inflict more pain upon yourself by touching the data directory. Not sure why you're gettng the mapping error.

---

<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:** [July 5, 2017, 11:40pm UTC](https://discuss.elastic.co/t/unable-to-lock-jvm-memory/33625/5 "2017-07-05T23:40:55Z")

</div>


