title: Unable to map the logstash with ElasticSearch on linux
body: <p>Unable to map the logstash with ElasticSearch on linux</p>
  
  <p>I just run the below command and it shows all the running images on docker</p>
  
  <p><strong>sudo docker ps</strong></p>
  
  <p><strong>Output:</strong></p>
  
  <pre><code>CONTAINER ID    IMAGE             COMMAND                   CREATED           STATUS           PORTS                    NAMES
  e14ace6bd419    a962b6541416      "/bin/bash /usr/loca…"    23 hours ago      Up 22 hours      0.0.0.0:5601-&gt;5601/tcp   trusting_chatterjee
  00e6822bb991    28259852697e      "/usr/local/bin/dock…"    23 hours ago      Up 23 hours      9200/tcp, 9300/tcp       friendly_roentgen
  </code></pre>
  
  <p>I just want to link the logstash into elastic search and tried to run the below command</p>
  
  <p><strong>Command:</strong></p>
  
  <pre class="lang-sh prettyprint-override"><code> sudo docker run -d --rm -it -v /home/sabharanikumar/logstash.conf e95781358676
  
  </code></pre>
  
  <p><strong>Output:</strong></p>
  
  <p>989e2a8f4d9fd972c4f2102d726a68877c989b546800899abbb8c382fb62f04c</p>
  
  <p><strong>logstash.conf:</strong></p>
  
  <pre><code>input
  {
    stdin{}
  }
  output
  {
    elasticsearch{ hosts =&gt; ["localhost:9200"] } 
  }
  </code></pre>
  
  <p><strong>Logstash Log:</strong></p>
  
  <blockquote>
    <p>[2019-08-23T09:40:53,833][WARN ][logstash.outputs.elasticsearch]
    Attempted to resurrect connection to dead ES instance, but got an
    error. {:url=>"<a href="http://logstash_system:xxxxxx@elasticsearch:9200/" rel="nofollow noreferrer">http://logstash_system:xxxxxx@elasticsearch:9200/</a>",
    :error_type=>LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError,
    :error=>"Elasticsearch Unreachable:
    [<a href="http://logstash_system:xxxxxx@elasticsearch:9200/][Manticore::ResolutionFailure]" rel="nofollow noreferrer">http://logstash_system:xxxxxx@elasticsearch:9200/][Manticore::ResolutionFailure]</a>
    elasticsearch: Name or service not known"}</p>
  </blockquote>
  
  <p>I ran the <strong>sudo docker ps</strong> but the logstash is being listed.</p>
  
  <p>Is there anything I missed it? Is there anywhere I need to change the host value?</p>