# Filebeat : Badly Stuck with Connection reset by peer error

**URL:** https://discuss.elastic.co/t/filebeat-badly-stuck-with-connection-reset-by-peer-error/66878
**Category:** Beats
**Tags:** filebeat
**Created:** [November 22, 2016, 3:16pm UTC](https://discuss.elastic.co/t/filebeat-badly-stuck-with-connection-reset-by-peer-error/66878 "2016-11-22T15:16:48Z")
**Posts on this page:** 1
**Showing post:** 14

<div class="post-metadata">

### Author: ![Robert\_Firek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/robert_firek/32/6353_2.png) [@Robert\_Firek](https://discuss.elastic.co/u/Robert_Firek)
#### Post date: [November 23, 2016, 12:25pm UTC](https://discuss.elastic.co/t/filebeat-badly-stuck-with-connection-reset-by-peer-error/66878/14 "2016-11-23T12:25:57Z")

</div>

Your problem looks very similar to my problem ([Elasitcsearch-ruby raises "Cannot get new connection from pool" error](https://discuss.elastic.co/t/elasitcsearch-ruby-raises-cannot-get-new-connection-from-pool-error/36252/9)), but maybe it is now problem in different plugin.

I found my error by finding the exact place in the code where my exception was thrown (I would suggest to do the same). Next I modified the code to retrieve additional information about the connection (url, parameters, used libraries etc.). I compiled the code and deployed on the server. I repeated these steps few time until I found the reasons . In my case I found the code which depends on the API call which is not supported by AWS in the same way as Elasticsearch.

It is a little bit primitive way of doing it, but only in such a way I was able to trace the root cause of the problem. Fortunately all my code was open sourced.

---

_[View the full topic](https://discuss.elastic.co/t/filebeat-badly-stuck-with-connection-reset-by-peer-error/66878)._
