# Failed (Connection refused - Connection refused). Sleeping for 2.0

**URL:** <https://discuss.elastic.co/t/failed-connection-refused-connection-refused-sleeping-for-2-0/71848>\
**Category:** Logstash\
**Created:** [January 17, 2017, 10:59am UTC](https://discuss.elastic.co/t/failed-connection-refused-connection-refused-sleeping-for-2-0/71848 "2017-01-17T10:59:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![spyros9](https://avatars.discourse-cdn.com/v4/letter/s/58956e/32.png) [@spyros9](https://discuss.elastic.co/u/spyros9)\
**Post date:** [January 17, 2017, 10:59am UTC](https://discuss.elastic.co/t/failed-connection-refused-connection-refused-sleeping-for-2-0/71848/1 "2017-01-17T10:59:48Z")

</div>

Hey gang,

I'm running filebeat 1.3.1 and logstash 2.4.1 (haven't upgraded to newest because we are still using java7...) on an ubuntu instance on AWS. Once I deploy (we do a green-blue deployment scheme) with the AMI that contains filebeat and logstash, it works fine at least for a couple of hours (doing stuff on the instance shows in the logs). I'm shipping my logs to [logz.io](http://logz.io), filebeat and logstash are installed in the AMI, and communicate between them without TLS.

After a few hours (don't know how many exactly - the next day it happens for sure), logstash appears to be stuck, and I'm getting this in /var/log/logstash/logstash.stdout:

> Failed (Connection refused - Connection refused). Sleeping for 0.02  
> Failed (Connection refused - Connection refused). Sleeping for 0.04  
> Failed (Connection refused - Connection refused). Sleeping for 0.08  
> Failed (Connection refused - Connection refused). Sleeping for 0.16  
> Failed (Connection refused - Connection refused). Sleeping for 0.32  
> Failed (Connection refused - Connection refused). Sleeping for 0.64  
> Failed (Connection refused - Connection refused). Sleeping for 1.28  
> Failed (Connection refused - Connection refused). Sleeping for 2.0

From that point on, that log contains lines just like the last one. I tried to play with keeping the file handlers open and so on, but nothing works. Can someone offer any piece of advice here?

Thanks!

---

<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:** [February 14, 2017, 11:00am UTC](https://discuss.elastic.co/t/failed-connection-refused-connection-refused-sleeping-for-2-0/71848/2 "2017-02-14T11:00:06Z")

</div>

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