Closed
Description
Description:
I get the error undefined method 'peeraddr' for #<Fluent::PluginHelper::HttpServer::Request...
when trying to use the protobuf-http input plugin. If I hardcode a peeraddr
then it progresses to a similar message undefined method 'header'...
. If I hardcode both the content_type
and the peeraddr
, thus removing both of those method calls, the plugin seems to work as intended, minus actually performing the checks against the actual request peeraddr and headers.
Reviewing both the documentation for the Fluentd HTTP Server plugin helper, as well as the code, I would agree with the error message, it does not look like those methods are available in the request object.
To Reproduce
Steps to reproduce the behavior:
- I'm using the
fluent/fluentd:v1.16-debian-1
Docker image - Added
apt-get install -y protobuf-compiler
andRUN gem install fluent-plugin-protobuf-http
to the DockerFile - Using stdout for my output
- POST to endpoint using Postman with a valid protobuf message
fluentd.conf
<source>
@type protobuf_http
@id protobuf_http_input
@log_level debug
bind 0.0.0.0
port 8081
tag debug.test
proto_dir /fluentd/etc
in_mode binary
out_mode json
</source>
<match **>
@type stdout
</match>