Open mixazya opened 6 years ago
This bug fix is not necessary anymore. It was fixed in https://github.com/MerlinDMC/fluent-plugin-input-gelf/commit/fb0b653c051e8696ae988daa43f607c51356f03d when the Fluent::SocketUtil::UdpHandler
was replaced by server_create
. The UdpHandler did chomping, while the server_create callback handler does not:
vs.
https://github.com/fluent/fluentd/blob/b04e8084a887dc8395d49c606f474e33a396997c/lib/fluent/plugin_helper/server.rb#L178 https://github.com/fluent/fluentd/blob/5844f7209fec154a4e6807eb1bee6989d3f3297f/lib/fluent/plugin/in_udp.rb#L72-L74
(A bug fix that is necessary, is #16 though. Also causing messages to get dropped.)
Issue happend when data coming compressed: Module used lib/fluent/plugin/socket_util.rb class UdpHandler which chomping incoming data:
So when you receiving compressed packet then ending with '0d' (CR), this symbol will be removed and compressed stream will be damaged. Testing with compressing of zlib, after symbol was removed, zlib failed to decode and show following message in logs: 2017-12-26 13:28:54 +1000 [warn]: Gelfd failed to parse a message error="Failed to decode data: buffer error "
One way of resolving: