# Failed to publish events: connect: connection refused

**URL:** https://discuss.elastic.co/t/failed-to-publish-events-connect-connection-refused/309785
**Category:** Beats
**Tags:** filebeat
**Created:** [July 16, 2022, 11:47am UTC](https://discuss.elastic.co/t/failed-to-publish-events-connect-connection-refused/309785 "2022-07-16T11:47:45Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![knitehias](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/knitehias/32/108398_2.png) [@knitehias](https://discuss.elastic.co/u/knitehias)
#### Post date: [July 16, 2022, 11:47am UTC](https://discuss.elastic.co/t/failed-to-publish-events-connect-connection-refused/309785/1 "2022-07-16T11:47:45Z")

</div>

Hi Experts,

I am using beats-\>logstash-\>elasticsearch-kibana stack.  
Every now and then my file beat will log error log then no other logging at all

| 2022-07-16T10:04:26.148Z | ERROR | [publisher\_pipeline\_output] | pipeline/output.go:180 | failed to publish events: dial tcp 10.xx.xx.x:5000: connect: connection refused |
| --- | --- | --- | --- | --- |
| 2022-07-16T10:04:40.940Z | ERROR | [publisher\_pipeline\_output] | pipeline/output.go:180 | failed to publish events: dial tcp 10.xx.xx.x:5000: connect: connection refused |

Is that because my logstash is overloaded or shall I restart my filebeat? I need some help to get the best practise here.

This is my production env by the way.  
filebeat:  
version: 7.16.2  
resources:  
limits:  
cpu: "250m"  
memory: "300Mi"  
requests:  
cpu: "250m"  
memory: "300Mi"

---

<div class="post-metadata">

### Author: ![mtojek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mtojek/32/63863_2.png) [@mtojek](https://discuss.elastic.co/u/mtojek)
#### Post date: [July 19, 2022, 10:58am UTC](https://discuss.elastic.co/t/failed-to-publish-events-connect-connection-refused/309785/2 "2022-07-19T10:58:48Z")

</div>

Can you check with telnet if logstash is accessible from that host?

---

<div class="post-metadata">

### Author: ![knitehias](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/knitehias/32/108398_2.png) [@knitehias](https://discuss.elastic.co/u/knitehias)
#### Post date: [July 19, 2022, 12:00pm UTC](https://discuss.elastic.co/t/failed-to-publish-events-connect-connection-refused/309785/3 "2022-07-19T12:00:06Z")

</div>

Thanks. I actually do not know I could do that from logstash container, so it is to rule out the network layer issue right

---

<div class="post-metadata">

### Author: ![knitehias](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/knitehias/32/108398_2.png) [@knitehias](https://discuss.elastic.co/u/knitehias)
#### Post date: [July 20, 2022, 2:31pm UTC](https://discuss.elastic.co/t/failed-to-publish-events-connect-connection-refused/309785/4 "2022-07-20T14:31:35Z")

</div>

I do not have telnet installed on the image but I am sure the network is fine since after restarting the filebeat the log will be able to sent to logstash

---

<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: [August 17, 2022, 4:32pm UTC](https://discuss.elastic.co/t/failed-to-publish-events-connect-connection-refused/309785/5 "2022-08-17T16:32:22Z")

</div>

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