# Connection get refused while connecting to elasticsearch

**URL:** <https://discuss.elastic.co/t/connection-get-refused-while-connecting-to-elasticsearch/80075>\
**Category:** Logstash\
**Created:** [March 27, 2017, 6:49am UTC](https://discuss.elastic.co/t/connection-get-refused-while-connecting-to-elasticsearch/80075 "2017-03-27T06:49:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![DharaniKumar](https://avatars.discourse-cdn.com/v4/letter/d/97f17d/32.png) [@DharaniKumar](https://discuss.elastic.co/u/DharaniKumar)\
**Post date:** [March 27, 2017, 6:49am UTC](https://discuss.elastic.co/t/connection-get-refused-while-connecting-to-elasticsearch/80075/1 "2017-03-27T06:49:14Z")

</div>

:~$ /opt/logstash/bin/logstash -f /etc/logstash/conf.d/logstash.conf --verbose  
starting agent {:level=\>:info}  
starting pipeline {:id=\>"main", :level=\>:info}  
Settings: Default pipeline workers: 1  
Starting UDP listener {:address=\>"localhost:5044", :level=\>:info}  
Using mapping template from {:path=\>nil, :level=\>:info}

[12:18]  
Attempting to install template {:manage\_template=\>{"template"=\>"logstash-_", "setti ngs"=\>{"index.refresh\_interval"=\>"5s"}, "mappings"=\>{"default"=\>{"\_all"=\>{"enable d"=\>true, "omit\_norms"=\>true}, "dynamic\_templates"=\>[{"message\_field"=\>{"match"=\>"m essage", "match\_mapping\_type"=\>"string", "mapping"=\>{"type"=\>"string", "index"=\>"an alyzed", "omit\_norms"=\>true, "fielddata"=\>{"format"=\>"disabled"}}}}, {"string\_field s"=\>{"match"=\>"_", "match\_mapping\_type"=\>"string", "mapping"=\>{"type"=\>"string", "i ndex"=\>"analyzed", "omit\_norms"=\>true, "fielddata"=\>{"format"=\>"disabled"}, "fields "=\>{"raw"=\>{"type"=\>"string", "index"=\>"not\_analyzed", "ignore\_above"=\>256}}}}}], " properties"=\>{"@timestamp"=\>{"type"=\>"date"}, "@version"=\>{"type"=\>"string", "index "=\>"not\_analyzed"}, "geoip"=\>{"dynamic"=\>true, "properties"=\>{"ip"=\>{"type"=\>"ip"}, "location"=\>{"type"=\>"geo\_point"}, "latitude"=\>{"type"=\>"float"}, "longitude"=\>{"t ype"=\>"float"}}}}}}}, :level=\>:info}  
Connection refused (Connection refused) {:class=\>"Manticore::SocketException", :lev el=\>:error}  
New Elasticsearch output {:class=\>"LogStash::Outputs::ElasticSearch", :hosts=\>["loc alhost:9200"], :level=\>:info}  
Starting pipeline {:id=\>"main", :pipeline\_workers=\>1, :batch\_size=\>125, :batch\_dela y=\>5, :max\_inflight=\>125, :level=\>:info}  
Pipeline main started  
Attempted to send a bulk request to Elasticsearch configured at '["[http://localhost](http://localhost) :9200"]', but Elasticsearch appears to be unreachable or down! {:error\_message=\>"Co nnection refused (Connection refused)", :class=\>"Manticore::SocketException", :leve l=\>:error}  
Attempted to send a bulk request to Elasticsearch configured at '["[http://localhost](http://localhost) :9200"]', but Elasticsearch appears to be unreachable or down! {:error\_message=\>"Co nnection refused (Connection refused)", :class=\>"Manticore::SocketException", :leve l=\>:error}

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [March 27, 2017, 7:10am UTC](https://discuss.elastic.co/t/connection-get-refused-while-connecting-to-elasticsearch/80075/2 "2017-03-27T07:10:06Z")

</div>

Yes? Is ES running? On port 9200? On the loopback interface? Could a firewall be blocking the access?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 24, 2017, 7:10am UTC](https://discuss.elastic.co/t/connection-get-refused-while-connecting-to-elasticsearch/80075/3 "2017-04-24T07:10:17Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
