Setting up Elasticsearch on a virtual machine

Hello everybody.
I'm working with a virtual machine using vagrant and try to setting up Elasticsearch on this VM. But when i run bin/elasticsearch it's using wich is not the localhost of my virtual machine. I'm wondering how can i change that. I changed in the file elasticsearch.yml the line
The default list of hosts is ["", "[::1]"]
The default list of hosts is ["localhost", "[::1]"]

but it doesn't work. I also changed in this file the line ["host1", "host2"]
with ["localhost"]
but still not. I can't have any result when i go in (wich is vm ip). if anyone could help, thanks a lot

Change in in configfile (elasticsearch,yml)

like this: :


Documents :

If you running with 1 instances ES, dont use option


firstly make sure your following points for running elastic search with your vm ip:
1: mention the vm ip in /etc/host file as localhost
2: change the parameters as:
default list of hosts is: ["localhost"] ["VMIP:9200"]

3: also open the port 9200 and 9300 which is very important for communications
9200 is default port for elasticsearch

So it's better thanks. but now I have an error while running bin/elasticsearch :

[2017-11-23T09:42:53,226][INFO ][o.e.b.BootstrapChecks ] [DX9fDXX] bound or publishing to a non-loopback or non-link-local address, enforcing bootstrap checks
ERROR: [2] bootstrap checks failed
[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
[2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
[2017-11-23T09:42:53,234][INFO ][o.e.n.Node ] [DX9fDXX] stopping ...
[2017-11-23T09:42:53,255][INFO ][o.e.n.Node ] [DX9fDXX] stopped
[2017-11-23T09:42:53,256][INFO ][o.e.n.Node ] [DX9fDXX] closing ...
[2017-11-23T09:42:53,273][INFO ][o.e.n.Node ] [DX9fDXX] closed

Please check here

and here

1 Like

Please read

1 Like

As seeing your logs , it seems there is an issue to run elastic search process and it is getting failed due to low space.
It can be the case your VM configuration is low and elasticsearch occuping high data.
In that case you can customize your heap size configuration setting in jvm_options file of elasticsearch.
Change the Xms parameter with less space i.e half RAM of your VM.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.