Elasticsearch error: curl: (7) Failed to connect to localhost port 9200: Connection refused

I installed the elasticsearch in my local but when I tried to access this command curl -X GET http://localhost:9200/ it's giving me the error that the connection was refused.

curl: (7) Failed to connect to localhost port 9200: Connection refused

Please what's wrong with curl?

There is not a lot of information to go on here. Which version did you install? How is it configured? How did you install it? Is there anything in the Elasticsearch logs?

I had installed 7.1.0 elasticsearch version

Here is the screenshot of elasticsearch.yml

'cluster.name: ACM_STG_Cluster
node.name: pvg03s1acmes01
https.bind_host: 10.120.21.178
path.data: /elasticdata/data
path.logs: /elasticlogs/logs
network.host: 0.0.0.0
cluster.initial_master_nodes: ["sjc04s1ctres01"]
discovery.seed_hosts: ["10.120.21.178"]
opendistro_security.nodes_dn:

  • 'CN=pvg03s1acmes*''

I installed by these instructions: https://www.elastic.co/guide/en/elasticsearch/reference/current/brew.html

I do have a lot of files in logs. do you want me to upload the logs as well?

Please format your code, logs or configuration files using </> icon as explained in this guide and not the citation button. It will make your post more readable.

Or use markdown style like:

```
CODE
```

This is the icon to use if you are not using markdown format:

There's a live preview panel for exactly this reasons.

Lots of people read these forums, and many of them will simply skip over a post that is difficult to read, because it's just too large an investment of their time to try and follow a wall of badly formatted text.
If your goal is to get an answer to your questions, it's in your interest to make it as easy to read and understand as possible.
Please update your post.

opendistro_security.nodes_dn:

Note that we don't support the distribution/this plugin you are using here.

Thanks @dadoonet. BTW May I know since which elasticsearch version have they stopped supporting the above distribution?

OpenDistro has never been supported here and they have their own forum. I do suspect your issue is that you have configured you http host to not listen to localhost.

1 Like

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