elastic / elastic/logstash

All output fail if one of many outputs fails

Open
#8,524 36 comments 14 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
14.9k
Forks
3.5k
Avg merge
19h 14m
Merged PRs (30d)
63

Description

## Logstash -> TCP: tcp output exception, EOFError: End of file reached

According to:
- https://github.com/logstash-plugins/logstash-output-tcp/issues/9, and
- https://github.com/logstash-plugins/logstash-output-tcp/issues/10

This is caused by the shutting down of TCP server, which the logstash’s TCP client is trying to connect to. And this is indeed the case.

As stated in the code [tcp.rb Line 153 of logstash-output-tcp plugin](https://github.com/logstash-plugins/logstash-output-tcp/blob/5f775830420178c78711d79b89b875b818b9e96d/lib/logstash/outputs/tcp.rb#L153):

![image](https://user-images.githubusercontent.com/7440735/31988813-a37eab10-b970-11e7-8694-519529014cef.png)

_“# don't expect any reads, but a readable socket might # mean the remote end closed, so read it and throw it away. # we'll get an EOFError if it happens.”_

# However:

## Logstash stopped outputting event via all output plugins once TCP output stopped.

Once the TCP output was not working due to the TCP server was stopped, all of our other outputs stopped working as well, such as Redis.

According to:
- https://github.com/elastic/logstash/issues/2463, and
- https://github.com/elastic/logstash/issues/1933, and
- https://github.com/logstash-plugins/logstash-output-tcp/issues/10

Many people have encountered such situation: all output fail if one of many outputs fails. It has been behaving like such for a long time, and according to different developers’ experience, it depends on the plugin. Some plugin’s failure will block all outputs but some won’t.

I think this is a serious problem and has be to be fixed. And I think this is a more general issue not related to single particular Logstash plugin, so I submitted it here.

- Version: 5.6.2
- Operating System:
- Config File (if you have sensitive info, please remove it):
- Sample Data:
- Steps to Reproduce:

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.