Reputation: 41
I have elasticsearch (not installed as service) on AWS ubuntu 16. I am trying to connect it to my node application but I am getting connection refused.
curl -XGET '52.x.x.x:9200/_cat/indices?v&pretty' also fetches me connection refused.
Things I have tried: updating the network host in elasticsearch.yaml to 0.0.0.0
Upvotes: 2
Views: 6041
Reputation: 126
1st see if your firewall has an open 9200 port.
2nd in elasticsearch.yaml set network.host to 52.x.x.x and save it.
3th restart elasticsearch service: service elasticsearch restart
4th test it: curl -X GET 'http://52.x.x.x:9200'
Upvotes: 4
Reputation: 5456
You should set the item network.host in conf/elasticsearch.yml file as:
network.host: 52.x.x.x
and restart the elasticsearch. The default value of network.host is localhost, so you can visit elasticsearch in localhost.
Upvotes: 3