Can't start elasticsearch server via Homebrew
Asked Answered
T

3

14

So I have installed elasticsearch through brew:

$ brew install elasticsearch

Then when I run the elasticsearch server:

elasticsearch -f -D es.config=/usr/local/Cellar/elasticsearch/0.19.3/config/elasticsearch.yml

I get this error:

{0.20.4}: Setup Failed ...
- FailedToResolveConfigException[Failed to resolve config path [/usr/local/Cellar/elasticsearch/0.19.3/config/elasticsearch.yml], tried file path [/usr/local/Cellar/elasticsearch/0.19.3/config/elasticsearch.yml], path file [/usr/local/Cellar/elasticsearch/0.20.4/config/usr/local/Cellar/elasticsearch/0.19.3/config/elasticsearch.yml], and classpath]

How can I fix this? Any ideas och suggestions are welcome.

I did this and it had worked for me:

Get the package:

$ curl -k -L -o elasticsearch-0.20.2.tar.gz http://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.20.2.tar.gz

Unzipp:

$ tar -zxvf elasticsearch-0.20.2.tar.gz

Run the elasticsearch server:

./elasticsearch-0.20.2/bin/elasticsearch -f
Tussock answered 5/2, 2013 at 16:41 Comment(0)
P
14

try with

elasticsearch -f -Des.path.conf=/usr/local/Cellar/elasticsearch/0.19.3/config/
Positively answered 5/2, 2013 at 16:54 Comment(1)
Also, have a look at brew info elasticsearch -- it should print information how to start/stop elasticsearch.Court
H
8

That's weird, my install asked me to run elasticsearch slightly different. I got it running with:

Install

$ brew update
$ brew install elasticsearch

Run Elasticsearch

$ elasticsearch --config=/usr/local/opt/elasticsearch/config/elasticsearch.yml

As @karmi said, brew info elasticsearch shows how to run elasticsearch on your system.

Hedda answered 26/2, 2015 at 0:29 Comment(0)
C
1

Things haven't been changed in 2021.

Homebrew stops distributing newer version of elasticsearch, and kibana, although you can still get outdated versions in homebrew-core.

It's beacause Homebrew defers to the OSI's open source licence definition. The new license used by elastic softwares is not compatible with it, and Homebrew rufuses to distribute them.

So, elastic begins to distribute these software with its own custom tap.

# tap maintained by elastic organization
# https://github.com/elastic/homebrew-tap
brew tap elastic/tap

brew install elastic/tap/elasticsearch-full
# brew install elastic/tap/kibina-full
# brew install elastic/tap/logstash-full
Carburet answered 20/11, 2021 at 10:16 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.