logstash-plugins / logstash-output-udp

Apache License 2.0
7 stars 10 forks source link

(IOError) Operation not permitted exception crashes the plugin #11

Closed colinsurprenant closed 4 years ago

colinsurprenant commented 4 years ago

Upon a (IOError) Operation not permitted exception by the socket send method per

https://github.com/logstash-plugins/logstash-output-udp/blob/5ce21fbed852ea8c0a382e80a2bbb9852638357f/lib/logstash/outputs/udp.rb#L24

the plugin dies.

The reason the underlying Java UDP socket write result in a (IOError) Operation not permitted exception is unclear, but it seems like a "normal" behaviour of the Linux kernel if a UDP socket is sending too fast.

I suggest we add a retry policy for this exception.

willemdh commented 4 years ago

We run into this issue when we reload firewalld on our Logstash nodes. The result is that Logstash crashes, which is not good on PR Logstash nodes, as firewalld needs to be reloaded a lot as Logstash has no builtin ip filters..

colinsurprenant commented 4 years ago

@willemdh #12 should address your issue; logstash will not crash but drop+log the failed event upon socket write failure. You will also be able to specify a retry count and delay.

colinsurprenant commented 4 years ago

udp output v3.1.0 has been published.