title: curl: (7) Failed to connect to localhost port 9200: Connection refused. Even after having configured /etc/elasticsearch/elasticsearch.yml
body: <p>I am trying to check if elasticsearch is properly working on Ubuntu 14.04. So for that, I am running following commands:</p>
  
  <pre><code>$ sudo service elasticsearch start
  $ curl -X GET 'http://localhost:9200'
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>curl: (7) Failed to connect to localhost port 9200: Connection refused
  </code></pre>
  
  <p>I am attaching screenshot of my /etc/elasticsearch/elasticsearch.yml file here and also attaching my-application.log
  <a href="https://i.stack.imgur.com/VAb5x.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VAb5x.png" alt="enter image description here"></a>
  <a href="https://i.stack.imgur.com/FYiL9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FYiL9.png" alt="enter image description here"></a>
  <a href="https://i.stack.imgur.com/j0Rwm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/j0Rwm.png" alt="enter image description here"></a></p>