Mangoski
Mangoski

Reputation: 2119

Elasticsearch unable to start with basic network settings 5.2.1

I have installed Elasticsearch 5.2.1 RPM manually. I have configured the basic network setting which I have utilized in my previous version. When I try to start the Elasticsearch it throwing me some error. The same setting was running in my older version 2.3.1 without any issues. I am not sure whether I need to add any additional setting for this.

My Configuration

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

My Elasticsearch Log Message

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 ...

Upvotes: 1

Views: 1143

Answers (2)

Mangoski
Mangoski

Reputation: 2119

My issue got resolved when I changed the setting in this file /etc/security/limits.conf. We need to add this two line in that file

<<username>> soft memlock unlimited
<<username>> hard memlock unlimited

After adding this line you can enable bootstrap.memory_lock: true

Upvotes: 1

Lee Lee Lee
Lee Lee Lee

Reputation: 45

I have this issue too,I use tmux , sometimes in tmux your config not perform right,so you should restart your computer or run elasticsearch out of tmux .

Upvotes: 0

Related Questions