# Filebeat Error: connect: connection refused

**URL:** https://discuss.elastic.co/t/filebeat-error-connect-connection-refused/260866
**Category:** Logstash
**Created:** [January 12, 2021, 4:12pm UTC](https://discuss.elastic.co/t/filebeat-error-connect-connection-refused/260866 "2021-01-12T16:12:45Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![haithem899](https://avatars.discourse-cdn.com/v4/letter/h/41988e/32.png) [@haithem899](https://discuss.elastic.co/u/haithem899)
#### Post date: [January 12, 2021, 4:12pm UTC](https://discuss.elastic.co/t/filebeat-error-connect-connection-refused/260866/1 "2021-01-12T16:12:46Z")

</div>

Hello,  
i've setup ELK stack with three nodes ( kibana-elasticsearch-logstash) separating however i can't recieve logs and with checking filebeat log i see this error: "connect: connection refused". Even i increased client\_inactivity\_timeout to 86400,it doesn't resolve the issue.  
Have you an idea to resolve this issue. thanks

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [January 12, 2021, 11:45pm UTC](https://discuss.elastic.co/t/filebeat-error-connect-connection-refused/260866/2 "2021-01-12T23:45:38Z")

</div>

Welcome to our community! 😃

What version are you running?  
Can you please post your config and Filebeat log?

---

<div class="post-metadata">

### Author: ![haithem899](https://avatars.discourse-cdn.com/v4/letter/h/41988e/32.png) [@haithem899](https://discuss.elastic.co/u/haithem899)
#### Post date: [January 19, 2021, 9:08am UTC](https://discuss.elastic.co/t/filebeat-error-connect-connection-refused/260866/3 "2021-01-19T09:08:18Z")

</div>

hello,  
Thank you for your reply 😃  
i run the version 7.3.1  
and this is my filebeat log:

Jan 19 09:48:24 B-SMTPOUT1-G2 filebeat: 2021-01-19T09:48:24.981+0100#011INFO#011[publisher]#011pipeline/retry.go:223#011 done  
Jan 19 09:48:24 B-SMTPOUT1-G2 filebeat: 2021-01-19T09:48:24.984+0100#011INFO#011[publisher\_pipeline\_output]#011pipeline/output.go:151#011Connection to backoff(async(tcp://host:5044)) established  
tcp6 0 0 :::5044 :::\* LISTEN 914/java  
tcp6 0 0 x.x.x.x:5044 x.x.x.x:48950 ESTABLISHED 914/java

eat":{"config":{"module":{"running":0}},"output":{"events":{"acked":5,"batches":2,"total":5},"read":{"bytes":12},"write":{"bytes":2075}},"pipeline":{"clients":1,"events":{"active":0,"published":5,"retry":1,"total":5},"queue":{"acked":5}}},"registrar":{"states":{"current":7,"update":5},"writes":{"success":2,"total":2}},"system":{"load":{"1":0,"15":0.05,"5":0.01,"norm":{"1":0,"15":0.05,"5":0.01}}}}}}  
Jan 19 09:55:19 B-SMTPOUT1-G2 filebeat: 2021-01-19T09:55:19.125+0100#011INFO#011[monitoring]#011log/log.go:145#011Non-zero metrics in the last 30s#011{"monitoring": {"metrics": {"beat":{"cpu":{"system":{"ticks":83480,"time":{"ms":2}},"total":{"ticks":253020,"time":{"ms":16},"value":253020},"user":{"ticks":169540,"time":{"ms":14}}},"handles":{"limit":{"hard":4096,"soft":1024},"open":13},"info":{"ephemeral\_id":"9b787f1f-e34a-4695-b372-91f3bb77ecaa","uptime":{"ms":580170085}},"memstats":{"gc\_next":31349712,"memory\_alloc":15696072,"memory\_total":76876508952},"runtime":{"goroutines":31}},"filebeat":{"events":{"added":1,"done":1},"harvester":{"files":{"092cb932-1837-4050-83bf-29c9eb5b2a9d":{"last\_event\_published\_time":"2021-01-19T09:54:50.031Z","last\_event\_timestamp":"2021-01-19T09:54:50.031Z","read\_offset":1266,"size":1266}},"open\_files":1,"running":1}},"libbeat":{"config":{"module":{"running":0}},"output":{"events":{"acked":1,"batches":1,"total":1},"read":{"bytes":6},"write":{"bytes":1161}},"pipeline":{"clients":1,"events":{"active":0,"published":1,"total":1},"queue":{"acked":1}}},"registrar":{"states":{"current":7,"update":1},"writes":{"success":1,"total":1}},"system":{"load":{"1":0,"15":0.05,"5":0.01,"norm":{"1":0,"15":0.05,"5":0.01}}}}}}  
Jan 19 09:55:49 B-SMTPOUT1-G2 filebeat: 2021-01-19T09:55:49.124+0100#011INFO#011[monitoring]#011log/log.go:145#011Non-zero metrics in the last 30s#011{"monitoring": {"metrics": {"beat":{"cpu":{"system":{"ticks":83480,"time":{"ms":1}},"total":{"ticks":253030,"time":{"ms":6},"value":253030},"user":{"ticks":169550,"time":{"ms":5}}},"handles":{"limit":{"hard":4096,"soft":1024},"open":13},"info":{"ephemeral\_id":"9b787f1f-e34a-4695-b372-91f3bb77ecaa","uptime":{"ms":580200087}},"memstats":{"gc\_next":31349712,"memory\_alloc":18167360,"memory\_total":76878980240},"runtime":{"goroutines":31}},"filebeat":{"events":{"added":1,"done":1},"harvester":{"files":{"092cb932-1837-4050-83bf-29c9eb5b2a9d":{"last\_event\_published\_time":"2021-01-19T09:55:25.034Z","last\_event\_timestamp":"2021-01-19T09:55:25.034Z","read\_offset":1257,"size":1257}},"open\_files":1,"running":1}},"libbeat":{"config":{"module":{"running":0}},"output":{"events":{"acked":1,"batches":1,"total":1},"read":{"bytes":6},"write":{"bytes":1141}},"pipeline":{"clients":1,"events":{"active":0,"published":1,"total":1},"queue":{"acked":1}}},"registrar":{"states":{"current":7,"update":1},"writes":{"success":1,"total":1}},"system":{"load":{"1":0,"15":0.05,"5":0.01,"norm":{"1":0,"15":0.05,"5":0.01}}}}}}  
Jan 19 09:55:51 B-SMTPOUT1-G2 filebeat: 2021-01-19T09:55:51.037+0100#011ERROR#011[logstash]#011logstash/async.go:280#011Failed to publish events caused by: write tcp x.x.x.x:48950-\>x.x.x.x:5044: write: connection reset by peer  
Jan 19 09:55:51 B-SMTPOUT1-G2 filebeat: 2021-01-19T09:55:51.037+0100#011INFO#011[publisher]#011pipeline/retry.go:219#011retryer: send unwait signal to consumer  
Jan 19 09:55:51 B-SMTPOUT1-G2 filebeat: 2021-01-19T09:55:51.037+0100#011INFO#011[publisher]#011pipeline/retry.go:223#011 done  
Jan 19 09:55:52 B-SMTPOUT1-G2 filebeat: 2021-01-19T09:55:52.841+0100#011ERROR#011[publisher\_pipeline\_output]#011pipeline/output.go:180#011failed to publish events: write tcp x.x.x.x:48950-\>x.x.x.x:5044: write: connection reset by peer

Best Regard,

---

<div class="post-metadata">

### Author: ![haithem899](https://avatars.discourse-cdn.com/v4/letter/h/41988e/32.png) [@haithem899](https://discuss.elastic.co/u/haithem899)
#### Post date: [January 28, 2021, 8:28am UTC](https://discuss.elastic.co/t/filebeat-error-connect-connection-refused/260866/4 "2021-01-28T08:28:09Z")

</div>

have you any ideas to resolve my issue?

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [January 28, 2021, 10:48pm UTC](https://discuss.elastic.co/t/filebeat-error-connect-connection-refused/260866/5 "2021-01-28T22:48:21Z")

</div>

> [@haithem899](#):
>
> connection reset by peer

That might suggest a firewall or something is causing a disconnect. Is there anything in your Logstash logs?

---

<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 25, 2021, 10:49pm UTC](https://discuss.elastic.co/t/filebeat-error-connect-connection-refused/260866/6 "2021-02-25T22:49:07Z")

</div>

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