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
karmi
  • 14,059
  • 3
  • 33
  • 41

3 Answers3

14

try with

elasticsearch -f -Des.path.conf=/usr/local/Cellar/elasticsearch/0.19.3/config/
dadoonet
  • 14,109
  • 3
  • 42
  • 49
  • 22
    Also, have a look at `brew info elasticsearch` -- it should print information how to start/stop elasticsearch. – karmi Feb 06 '13 at 07:07
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.

Dennis
  • 56,821
  • 26
  • 143
  • 139
Will
  • 11,276
  • 9
  • 68
  • 76
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
Simba
  • 23,537
  • 7
  • 64
  • 76