Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrading to Logstash 8 reintroduces noisy "Connection reset" logs #457

Open
indygriffiths opened this issue Nov 8, 2022 · 0 comments
Open

Comments

@indygriffiths
Copy link

indygriffiths commented Nov 8, 2022

As part of 4d00d57 the Beats handler contains a check to see if an exception message is a connection reset by peer error, which if it is reduces the amount of log spam by hiding the full stack trace from the info/warn log level.

This was working on Logstash v7, but it looks like the JDK upgrade as part of Logstash v8 has changed the error message wording from Connection reset by peer to just Connection reset which reintroduces the noisy stack traces:

v7:

[2022-11-08T02:56:24,995][INFO ][org.logstash.beats.BeatsHandler] [local: <snip>, remote: <snip>] closing (Connection reset by peer)

v8

[2022-11-08T03:50:30,801][INFO ][org.logstash.beats.BeatsHandler] [local: <snip>, remote: <snip>] Handling exception: java.net.SocketException: Connection reset (caused by: java.net.SocketException: Connection reset)
[2022-11-08T03:50:29,347][WARN ][io.netty.channel.DefaultChannelPipeline] An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception.
java.net.SocketException: Connection reset
	at sun.nio.ch.SocketChannelImpl.throwConnectionReset(SocketChannelImpl.java:394) ~[?:?]
	at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:426) ~[?:?]
	at io.netty.buffer.PooledByteBuf.setBytes(PooledByteBuf.java:253) ~[netty-all-4.1.65.Final.jar:4.1.65.Final]
...
  • Version: Logstash 8.5.0
  • Operating System: Ubuntu 18.04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant