Unable to lock JVM Memory


(Carlos Vega Moreno) #1

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)


(Magnus Bäck) #2

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

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


(Carlos Vega Moreno) #3

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?


(Magnus Bäck) #4

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


(system) #5