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?

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?

@webapps

should you be using https to connect?