Brew shows elasticsearch server is running, but request to elasticsearch server keeps failing
In logs I could find 'All shards failed' this error.
Running brew info elasticsearch@5.6
I got this:
Data: /usr/local/var/elasticsearch/elasticsearch_suryapandian/Logs: /usr/local/var/log/elasticsearch/elasticsearch_suryapandian.logPlugins: /usr/local/opt/elasticsearch@5.6/libexec/plugins/Config: /usr/local/etc/elasticsearch/plugin script: /usr/local/opt/elasticsearch@5.6/libexec/bin/elasticsearch-plugin
After uninstalling elastic search using brewbrew uninstall elasticsearch@5.6
Manually I checked in all these locations if any of elasticsearch was still present and removed all of it.To make sure that all the old shards gets deleted.
Then I installed elasticsearch again. Now elasticsearch is running smoothly.