I can only send curl commands on the localhost

Greetings,

I've been trying to send some curl requests to elasticsearch (port 9200) from my desktop but all I get is a net::ERR_CONNECTION_REFUSED message.

Now all problems disappear when I execute the command locally on the elasticsearch server.

Any suggestions?

Make sure you are using the public IP of the node to make api call (curl commands). Before that make sure the node is accessible from your desktop by pinging the IP.
I use a tool called "postman" to make api calls. This might come handy if you are a beginner.
Your curl command should look like:
GET http://:9200
{
..
..
}

ElasticSearch binds on localhost by default.
Check doc at https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html

You should change the network.host property to something accessible from the outside.
For instance network.host: _site:ipv4_

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.