title: Elasticsearch - Failed to connect to localhost port 9200: Connection refused
body: <p>I tried to install Elasticsearch and run it.</p>
  <p>When I type <code>curl -X GET http://localhost:9200</code> or <code>curl -X GET 192.1.0.0:9200</code>, I get this error:</p>
  <blockquote>
  <p>Failed to connect to localhost port 9200: Connection refused</p>
  </blockquote>
  <p>How may I fix this?</p>
  <p>I searched Stack Overflow for this issue, but none of the solutions worked for me, including this one: <a href="https://stackoverflow.com/questions/31677563/connection-refused-error-on-elastic-search">Elasticsearch: Failed to connect to localhost port 9200 - Connection refused</a></p>
  <p>I also found <a href="https://www.elastic.co/guide/en/elasticsearch/reference/1.4/modules-plugins.html" rel="nofollow noreferrer">this article</a>,  tried to follow it, but failed,
  because every time I type this in my cmd:</p>
  <pre><code>bin/plugin --install mobz/elasticsearch-head
  bin/plugin --install lukas-vlcek/bigdesk
  </code></pre>
  <p>cmd will tell me:</p>
  <blockquote>
  <p>plugin is not recognized as internal or external command</p>
  </blockquote>
  <p>How do I fix this one?</p>