I installed elasticsearch
by brew install elasticsearch
and started it with brew services start elasticsearch
, however, curl http://127.0.0.1:9200
shows connection refused
. I checked the port: netstat -a -n | grep tcp | grep 9200
and some ipv4
is running there. Ok, so I opened /usr/local/etc/elasticsearch/elasticsearch.yml
and changed the port to 9300
and also uncommented and changed: network.host: 127.0.0.1
. Still shows connection refused
when I do curl http://127.0.0.1:9300
. The OS
is MacOS High Sierra 10.13.4
. If we open /usr/local/var/log/elasticsearch/elasticsearch_nikitavlasenko.log
the error seems to be:
Cluster name [elasticsearch_nikitavlasenko] subdirectory exists in data paths [/usr/local/var/lib/elasticsearch/elasticsearch_nikitavlasenko]. All data under these paths must be moved up one directory to paths [/usr/local/var/lib/elasticsearch]
Checking if Elasticsearch is running on Mac OS X is a simple process. First, open the Terminal application. Then, type the following command and press Enter: ps -A | grep -i elasticsearch. You should see a process with the name [elasticsearch] if Elasticsearch is running.
Did you have an older version (2.x or before) installed before? It sounds a lot like this PR to check that you're not using the old behavior when there was the node name in the path.
What I would do:
/usr/local/var/lib/elasticsearch/elasticsearch_nikitavlasenko
and start fresh.path.data
in your config or move the folder one level up (just like the log message says).PS: I wouldn't use port 9300 for HTTP, because that's generally the port used for communication of the nodes in a cluster itself.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With