ElasticSearch installation error - curl: (7) Failed connect to localhost:9200; Connection refused
<p>I'm trying to configure ElasticSearch with <a href="https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-elasticsearch-on-centos-7" rel="noreferrer">this</a> tutorial </p>

<p>I did everything except step 4 of the tutorial.</p>

<hr>

<p>In step 5, when I run this command:</p>

<pre><code>curl -X GET 'http://localhost:9200'
</code></pre>

<p>I get this error:</p>

<pre><code>curl: (7) Failed connect to localhost:9200; Connection refused
</code></pre>

<hr>

<p>I have tried two different things to fix the error: </p>

<ol>
<li><p>network.bind_host: 0.0.0.0</p></li>
<li><p>network :
host : 192.168.2.229</p></li>
</ol>

<p>But neither solved the problem.  </p>

<p>What should I do to test Elasticsearch and solve this error?</p>

<p>Thanks.</p>