I am using elasticsearch version 7.2 i want to use it in production mode for that i did some changes in its elasticsearch.yml
file such as
network.host: 0.0.0.0
discovery.seed_hosts: ["192.168.1.8"]
by following these links https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html https://www.elastic.co/guide/en/elasticsearch/reference/current/discovery-settings.html
when i run elasticsearch server it throws two error messages
[2019-07-09T18:07:04,978][DEBUG][o.e.a.ActionModule ] [sara-Inspiron-7773] Using REST wrapper from plugin org.elasticsearch.xpack.security.Security
[2019-07-09T18:07:05,759][INFO ][o.e.d.DiscoveryModule ] [sara-Inspiron-7773] using discovery type [zen] and seed hosts providers [settings]
[2019-07-09T18:07:06,418][INFO ][o.e.n.Node ] [sara-Inspiron-7773] initialized
[2019-07-09T18:07:06,419][INFO ][o.e.n.Node ] [sara-Inspiron-7773] starting ...
[2019-07-09T18:07:06,525][INFO ][o.e.t.TransportService ] [sara-Inspiron-7773] publish_address {192.168.1.8:9300}, bound_addresses {[::]:9300}
[2019-07-09T18:07:06,531][INFO ][o.e.b.BootstrapChecks ] [sara-Inspiron-7773] bound or publishing to a non-loopback address, enforcing bootstrap checks
ERROR: [2] bootstrap checks failed
[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]
[2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
[2019-07-09T18:07:06,568][INFO ][o.e.n.Node ] [sara-Inspiron-7773] stopping ...
[2019-07-09T18:07:06,579][INFO ][o.e.n.Node ] [sara-Inspiron-7773] stopped
[2019-07-09T18:07:06,580][INFO ][o.e.n.Node ] [sara-Inspiron-7773] closing ...
[2019-07-09T18:07:06,594][INFO ][o.e.n.Node ] [sara-Inspiron-7773] closed
[2019-07-09T18:07:06,596][INFO ][o.e.x.m.p.NativeController] [sara-Inspiron-7773] Native controller process has stopped - no new native processes can be started
i did add
elasticsearch - nofile 65535
in /etc/security/limits.conf
file as given in
https://www.elastic.co/guide/en/elasticsearch/reference/current/setting-system-settings.html#limits.conf
for error [1] in the logs but i did not resolved the issue
i tried logging in again and run the elasticsearch server but it did not helped
/etc/security/limits.conf
is applied on boot. Did you reboot? – Andy Shinn