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

**URL:** <https://forum.opensearch.org/t/elasticsearch-error-curl-7-failed-to-connect-to-localhost-port-9200-connection-refused/4317>\
**Category:** Open Source Elasticsearch and Kibana\
**Created:** [December 2, 2020, 5:13pm UTC](https://forum.opensearch.org/t/elasticsearch-error-curl-7-failed-to-connect-to-localhost-port-9200-connection-refused/4317 "2020-12-02T17:13:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![webapps](https://avatars.discourse-cdn.com/v4/letter/w/3ec8ea/32.png) [@webapps](https://forum.opensearch.org/u/webapps)\
**Post date:** [December 2, 2020, 5:13pm UTC](https://forum.opensearch.org/t/elasticsearch-error-curl-7-failed-to-connect-to-localhost-port-9200-connection-refused/4317/1 "2020-12-02T17:13:17Z")

</div>

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.

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

```

Please what’s wrong with curl?

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](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?

---

<div class="post-metadata">

**Author:** ![sreekanth](https://avatars.discourse-cdn.com/v4/letter/s/e47774/32.png) [@sreekanth](https://forum.opensearch.org/u/sreekanth)\
**Post date:** [December 3, 2020, 7:40am UTC](https://forum.opensearch.org/t/elasticsearch-error-curl-7-failed-to-connect-to-localhost-port-9200-connection-refused/4317/2 "2020-12-03T07:40:42Z")

</div>

@webapps

> [@webapps](#):
>
> https.bind\_host: 10.120.21.178

should you be using https to connect?
