user592638
user592638

Reputation:

Can't start elasticsearch server via Homebrew

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

Upvotes: 14

Views: 14967

Answers (3)

Simba
Simba

Reputation: 27588

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

Upvotes: 1

Will
Will

Reputation: 11500

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.

Upvotes: 8

dadoonet
dadoonet

Reputation: 14492

try with

elasticsearch -f -Des.path.conf=/usr/local/Cellar/elasticsearch/0.19.3/config/

Upvotes: 14

Related Questions