Skip to content

undefined method 'peeraddr' for #<Fluent::PluginHelper::HttpServer::Request #10

Closed
@dentonk

Description

@dentonk

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:

  1. I'm using the fluent/fluentd:v1.16-debian-1 Docker image
  2. Added apt-get install -y protobuf-compiler and RUN gem install fluent-plugin-protobuf-http to the DockerFile
  3. Using stdout for my output
  4. 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>

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingdocumentationImprovements or additions to documentation

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions