Java log4j2 - Forward_input: Incoming chunk broken

269 views
Skip to first unread message

missou...@gmail.com

unread,
Feb 14, 2019, 10:06:39 PM2/14/19
to Fluentd Google Group
Hello,


Please help, relatively new to Fluentd and get stuck with this *incoming chunk is broken*. My *workflow* goes like this
```
Java App----(Json /Tcp )----->Fluentd(port:24224) --------->Elasticsearch
````
Fluentd Config

<ROOT>
  <match fluent.**>
    @type null
  </match>
  <system>
    log_level trace
  </system>
  <source>
    @type forward
    port 24224
    bind "0.0.0.0"
  </source>
  <match **>
    @type copy
    <store>
      @type "file"
      path "/Users/davem/fluent/blah.txt"
      <buffer time>
        path "/Users/davem/fluent/blah.txt"
      </buffer>
    </store>
  </match>
</ROOT>

Java Application logs this


{"thread":"localhost-startStop-1","level":"DEBUG","loggerName":"org.springframework.beans.factory.support.DefaultListableBeanFactory","message":"Creating instance of bean 'cxf'","endOfBatch":false,"loggerFqcn":"org.apache.logging.log4j.jcl.Log4jLog","instant":{"epochSecond":1550109138,"nanoOfSecond":512000000},"threadId":15,"threadPriority":5,"timestamp":"2019-02-13T19:52:18.512-0600"}

Fluentd Log
```
2019-02-13 19:41:49 -0600 [warn]: #0 incoming chunk is broken: host="127.0.0.1" msg={"thread"=>"localhost-startStop-1", "level"=>"DEBUG", "loggerName"=>"org.springframework.beans.factory.support.DefaultListableBeanFactory", "message"=>"Creating instance of bean 'cxf'", "endOfBatch"=>false, "loggerFqcn"=>"org.apache.logging.log4j.jcl.Log4jLog", "instant"=>{"epochSecond"=>1550108509, "nanoOfSecond"=>935000000}, "threadId"=>15, "threadPriority"=>5, "timestamp"=>"2019-02-13T19:41:49.935-0600"}
```

Thanks in Advance!


Mr. Fiber

unread,
Feb 19, 2019, 5:35:44 AM2/19/19
to Fluentd Google Group
in_forward uses msgpack/json based forward protocol, not raw payload.


So if you want to accept raw json payload in fluentd, use in_tcp instead.


Masahiro


--
You received this message because you are subscribed to the Google Groups "Fluentd Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fluentd+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

missou...@gmail.com

unread,
Feb 21, 2019, 8:13:13 PM2/21/19
to Fluentd Google Group
Perfect! & Thank you. Stupid me. I choose the wrong source plugin.
Reply all
Reply to author
Forward
0 new messages