我手动安装了Elasticsearch 5.2.1
RPM
。我已经配置了我在之前版本中使用的基本网络设置。当我尝试启动Elasticsearch
时,它给我一些错误。我的旧版本2.3.1
中运行的设置相同,没有任何问题。我不确定是否需要为此添加任何其他设置。
我的配置
cluster.name: ddlm.cluster
node.name: dd.sys.node-1
path.data: /ddlm/es/data/
path.logs: /ddlm/logs/elasticsearch_logs
bootstrap.memory_lock: true
我的Elasticsearch日志消息
2017-04-13T12:45:44,435][WARN ][o.e.b.JNANatives ] Unable to lock JVM Memory: error=12, reason=Cannot allocate memory
[2017-04-13T12:45:44,437][WARN ][o.e.b.JNANatives ] This can result in part of the JVM being swapped out.
[2017-04-13T12:45:44,438][WARN ][o.e.b.JNANatives ] Increase RLIMIT_MEMLOCK, soft limit: 65536, hard limit: 65536
[2017-04-13T12:45:44,438][WARN ][o.e.b.JNANatives ] These can be adjusted by modifying /etc/security/limits.conf, for example:
# allow user 'ddlm' mlockall
ddlm soft memlock unlimited
ddlm hard memlock unlimited
[2017-04-13T12:45:44,438][WARN ][o.e.b.JNANatives ] If you are logged in interactively, you will have to re-login for the new limits to take effect.
[2017-04-13T12:45:44,673][INFO ][o.e.n.Node ] [dd.sys.node-1] initializing ...
[2017-04-13T12:45:44,804][INFO ][o.e.e.NodeEnvironment ] [dd.sys.node-1] using [1] data paths, mounts [[/../data (/dev/mapper/vfg_dd_data)]], net usable_space [102.4gb], net total_space [102.5gb], spins? [possibly], types [xfs]
[2017-04-13T12:45:44,804][INFO ][o.e.e.NodeEnvironment ] [dd.sys.node-1] heap size [15.9gb], compressed ordinary object pointers [true]
[2017-04-13T12:45:44,805][INFO ][o.e.n.Node ] [dd.sys.node-1] node name [dd.sys.node-1], node ID [gDrNs4gRSLyF_xiSDtNrMQ]
[2017-04-13T12:45:44,810][INFO ][o.e.n.Node ] [dd.sys.node-1] version[5.2.1], pid[112449], build[db0d481/2017-02-09T22:05:32.386Z], OS[Linux/3.10.0-327.el7.x86_64/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/1.8.0_111/25.111-b15]
[2017-04-13T12:45:48,614][INFO ][o.e.p.PluginsService ] [dd.sys.node-1] loaded module [aggs-matrix-stats]
[2017-04-13T12:45:48,614][INFO ][o.e.p.PluginsService ] [dd.sys.node-1] loaded module [ingest-common]
[2017-04-13T12:45:48,614][INFO ][o.e.p.PluginsService ] [dd.sys.node-1] loaded module [lang-expression]
[2017-04-13T12:45:48,614][INFO ][o.e.p.PluginsService ] [dd.sys.node-1] loaded module [lang-groovy]
[2017-04-13T12:45:48,614][INFO ][o.e.p.PluginsService ] [dd.sys.node-1] loaded module [lang-mustache]
[2017-04-13T12:45:48,614][INFO ][o.e.p.PluginsService ] [dd.sys.node-1] loaded module [lang-painless]
[2017-04-13T12:45:48,614][INFO ][o.e.p.PluginsService ] [dd.sys.node-1] loaded module [percolator]
[2017-04-13T12:45:48,614][INFO ][o.e.p.PluginsService ] [dd.sys.node-1] loaded module [reindex]
[2017-04-13T12:45:48,614][INFO ][o.e.p.PluginsService ] [dd.sys.node-1] loaded module [transport-netty3]
[2017-04-13T12:45:48,614][INFO ][o.e.p.PluginsService ] [dd.sys.node-1] loaded module [transport-netty4]
[2017-04-13T12:45:48,615][INFO ][o.e.p.PluginsService ] [dd.sys.node-1] no plugins loaded
[2017-04-13T12:45:53,486][INFO ][o.e.n.Node ] [dd.sys.node-1] initialized
[2017-04-13T12:45:53,486][INFO ][o.e.n.Node ] [dd.sys.node-1] starting ...
[2017-04-13T12:45:54,103][INFO ][o.e.t.TransportService ] [dd.sys.node-1] publish_address {xx.xx.xx.xxx:9300}, bound_addresses {xx.xx.xx.xxx:9300}
[2017-04-13T12:45:54,114][INFO ][o.e.b.BootstrapChecks ] [dd.sys.node-1] bound or publishing to a non-loopback or non-link-local address, enforcing bootstrap checks
[2017-04-13T12:45:54,117][ERROR][o.e.b.Bootstrap ] [dd.sys.node-1] node validation exception
bootstrap checks failed
memory locking requested for elasticsearch process but memory is not locked
[2017-04-13T12:45:54,769][INFO ][o.e.n.Node ] [dd.sys.node-1] stopping ...
答案 0 :(得分:1)
当我更改此文件/etc/security/limits.conf
中的设置时,我的问题得到了解决。我们需要在该文件中添加这两行
<<username>> soft memlock unlimited
<<username>> hard memlock unlimited
添加此行后,您可以启用bootstrap.memory_lock: true
答案 1 :(得分:0)
我也有这个问题,我使用tmux,有时在tmux中你的配置执行不正确,所以你应该重新启动计算机或从tmux运行elasticsearch。