# ERR Failed to publish events caused by: read tcp X.XXXX:55860-\>XXXXXXX:5044: i/o timeout

**URL:** <https://discuss.elastic.co/t/err-failed-to-publish-events-caused-by-read-tcp-x-xxxx-55860-xxxxxxx-i-o-timeout/142000>\
**Category:** Logstash\
**Created:** [July 27, 2018, 9:34pm UTC](https://discuss.elastic.co/t/err-failed-to-publish-events-caused-by-read-tcp-x-xxxx-55860-xxxxxxx-i-o-timeout/142000 "2018-07-27T21:34:11Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![rajkumar.m](https://avatars.discourse-cdn.com/v4/letter/r/e9bcb4/32.png) [@rajkumar.m](https://discuss.elastic.co/u/rajkumar.m)\
**Post date:** [July 27, 2018, 9:34pm UTC](https://discuss.elastic.co/t/err-failed-to-publish-events-caused-by-read-tcp-x-xxxx-55860-xxxxxxx-i-o-timeout/142000/1 "2018-07-27T21:34:11Z")

</div>

file beat is not able to send data and getting timeout error with logstash,  
what could be the reason

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [July 28, 2018, 11:07am UTC](https://discuss.elastic.co/t/err-failed-to-publish-events-caused-by-read-tcp-x-xxxx-55860-xxxxxxx-i-o-timeout/142000/2 "2018-07-28T11:07:16Z")

</div>

Please show the logs and config. Without additional information it is very hard for anyone to help...

---

<div class="post-metadata">

**Author:** ![rajkumar.m](https://avatars.discourse-cdn.com/v4/letter/r/e9bcb4/32.png) [@rajkumar.m](https://discuss.elastic.co/u/rajkumar.m)\
**Post date:** [July 30, 2018, 3:56pm UTC](https://discuss.elastic.co/t/err-failed-to-publish-events-caused-by-read-tcp-x-xxxx-55860-xxxxxxx-i-o-timeout/142000/3 "2018-07-30T15:56:34Z")

</div>

## sorry for missing log, Please find the below log from filebeat:

## 2018-07-27T16:59:36-05:00 ERR Failed to publish events caused by: read tcp (FilebeatIP):46926-\>(LogSTashIP):5044: i/o timeout 2018-07-27T16:59:36-05:00 INFO Error publishing events (retrying): read tcp (FilebeatIP):46926-\>(LogSTashIP):5044: i/o timeout 2018-07-27T17:00:03-05:00 INFO Non-zero metrics in the last 30s: libbeat.logstash.publish.read\_errors=1 libbeat.logstash.published\_but\_not\_acked\_events=2047 2018-07-27T17:00:33-05:00 INFO No non-zero metrics in the last 30s

---

<div class="post-metadata">

**Author:** ![harshbajaj16](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/harshbajaj16/32/44970_2.png) [@harshbajaj16](https://discuss.elastic.co/u/harshbajaj16)\
**Post date:** [July 31, 2018, 6:28am UTC](https://discuss.elastic.co/t/err-failed-to-publish-events-caused-by-read-tcp-x-xxxx-55860-xxxxxxx-i-o-timeout/142000/4 "2018-07-31T06:28:56Z")

</div>

Hi,

Please share your filebeat configuration file and logstasg configuration file and pipeline to solve this issue.

Regards,

---

<div class="post-metadata">

**Author:** ![rajkumar.m](https://avatars.discourse-cdn.com/v4/letter/r/e9bcb4/32.png) [@rajkumar.m](https://discuss.elastic.co/u/rajkumar.m)\
**Post date:** [July 31, 2018, 3:35pm UTC](https://discuss.elastic.co/t/err-failed-to-publish-events-caused-by-read-tcp-x-xxxx-55860-xxxxxxx-i-o-timeout/142000/5 "2018-07-31T15:35:04Z")

</div>

## =============================== filebeat.yml file

filebeat.prospectors:

- input\_type: log  
paths:

output.logstash:  
hosts: [":5044"]

ssl.certificate\_authorities: ["XXXX\_XX.pem"]

logging.level: info  
logging.to\_files: true  
logging.to\_syslog: false  
logging.files.path: /var/log/filebeat  
logging.files.name: filebeat.log  
logging.files.keepfiles: 2  
registry\_file: /etc/filebeat/.filebeat.registry

## =============================== logstash.yml file

path.data: /data/logstash

queue.type: persisted

path.logs: /var/log/logstash  
xpack.monitoring.enabled: false  
xpack.monitoring.elasticsearch.url: [":9200"]  
xpack.monitoring.elasticsearch.username: XXXXX\_XXXX  
xpack.monitoring.elasticsearch.password: XXXXX  
xpack.monitoring.elasticsearch.ssl.ca: "XXXX\_XX.pem"

## =============================== input.beat.conf file

# input { beats { port=\> 5044 ssl =\> false ssl\_certificate =\> ".crt" ssl\_key =\> ".pkcs8" } }

---

<div class="post-metadata">

**Author:** ![harshbajaj16](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/harshbajaj16/32/44970_2.png) [@harshbajaj16](https://discuss.elastic.co/u/harshbajaj16)\
**Post date:** [August 1, 2018, 3:40am UTC](https://discuss.elastic.co/t/err-failed-to-publish-events-caused-by-read-tcp-x-xxxx-55860-xxxxxxx-i-o-timeout/142000/6 "2018-08-01T03:40:16Z")

</div>

Hi,

Please check your ssl settings if that is ok then please find below one more solution.

```
# If using queue.type: persisted, the total capacity of the queue in number of bytes.
# If you would like more unacked events to be buffered in Logstash, you can increase the
# capacity using this setting. Please make sure your disk drive has capacity greater than
# the size specified here. If both max_bytes and max_events are specified, Logstash will pick
# whichever criteria is reached first
# Default is 1024mb or 1gb
#
#queue.max_bytes: 2gb 

```

For more details. please read  
[https://www.elastic.co/guide/en/logstash/current/persistent-queues.html](https://www.elastic.co/guide/en/logstash/current/persistent-queues.html)

Regards,  
Harsh

---

<div class="post-metadata">

**Author:** ![rajkumar.m](https://avatars.discourse-cdn.com/v4/letter/r/e9bcb4/32.png) [@rajkumar.m](https://discuss.elastic.co/u/rajkumar.m)\
**Post date:** [August 1, 2018, 7:22pm UTC](https://discuss.elastic.co/t/err-failed-to-publish-events-caused-by-read-tcp-x-xxxx-55860-xxxxxxx-i-o-timeout/142000/7 "2018-08-01T19:22:09Z")

</div>

Thanks Harsh for info,

i am able to fix the connection issue  
but i could see the below error in logstash log file. please advise.

[2018-08-01T13:30:45,136][INFO][org.logstash.beats.BeatsHandler] Exception: not an SSL/TLS record:

---

<div class="post-metadata">

**Author:** ![harshbajaj16](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/harshbajaj16/32/44970_2.png) [@harshbajaj16](https://discuss.elastic.co/u/harshbajaj16)\
**Post date:** [August 2, 2018, 3:58am UTC](https://discuss.elastic.co/t/err-failed-to-publish-events-caused-by-read-tcp-x-xxxx-55860-xxxxxxx-i-o-timeout/142000/8 "2018-08-02T03:58:55Z")

</div>

Hi @rajkumar.m,

Please read this thread it will help you to get it resolve.

> <https://github.com/wazuh/wazuh/issues/197>

Regards,  
Harsh

---

<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 30, 2018, 3:59am UTC](https://discuss.elastic.co/t/err-failed-to-publish-events-caused-by-read-tcp-x-xxxx-55860-xxxxxxx-i-o-timeout/142000/9 "2018-08-30T03:59:05Z")

</div>

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