I am not sure if elasticsearch is installed in my Mac. macOS: 10.14 elasticsearch: 5.6
This is what I tried:
Bash Command:
elasticsearch
Result:
-bash: elasticsearch: command not found
Bash Command:
brew search elasticsearch
Result:
==> Formulae elasticsearch [email protected] [email protected]✔
Bash Command:
brew services start elasticsearch
Result:
Service `[email protected]` already started, use `brew services restart [email protected]` to restart.
Bash Command:
brew services restart [email protected]
Result:
==> Successfully ran `[email protected]` (label: [email protected])
But when I tried to curl http://localhost:9200/ I get curl: (7) Failed to connect to localhost port 9200: Connection refused
My app server throws this error: Faraday::ConnectionFailed (Failed to open TCP connection to localhost:9200 (Connection refused - connect(2) for "localhost" port 9200)):
Even when I reinstalled elasticsearch, I am running into this problem again.
Where am I going wrong?