fluent / fluent-bit

Fast and Lightweight Logs and Metrics processor for Linux, BSD, OSX and Windows
https://fluentbit.io
Apache License 2.0
5.82k stars 1.58k forks source link

FluentBit 2.08 Fail to Output log via Forward and HTTP #6642

Closed hpwahyao closed 1 year ago

hpwahyao commented 1 year ago

Bug Report

Describe the bug Running FluentBit and FluentD in the same Virtual machine (Ubuntu 24.04), however, fluent bit fails to forward the log to Fluentd. I tried both Forward plugin and HTTP plugin. both of them fail.

While, I use curl post the json file in the same VM to FluentD, Fluentd can receive it.

To Reproduce

Fluend Conf:

@type http port 24222 bind 0.0.0.0

<match **> @type stdout

Expected behavior The fluent bit shall forward the log to FluentD. However following error encountered:

Fluent Bit v2.0.8

[2023/01/04 22:40:30] [ info] [fluent bit] version=2.0.8, commit=, pid=745285 [2023/01/04 22:40:30] [ info] [storage] ver=1.4.0, type=memory, sync=normal, checksum=off, max_chunks_up=128 [2023/01/04 22:40:30] [ info] [cmetrics] version=0.5.8 [2023/01/04 22:40:30] [ info] [ctraces ] version=0.2.7 [2023/01/04 22:40:30] [ info] [input:cpu:cpu.0] initializing [2023/01/04 22:40:30] [ info] [input:cpu:cpu.0] storage_strategy='memory' (memory only) [2023/01/04 22:40:30] [ info] [output:http:http.0] worker #0 started [2023/01/04 22:40:30] [ info] [sp] stream processor started [2023/01/04 22:40:30] [ info] [output:http:http.0] worker #1 started [2023/01/04 22:40:32] [error] [output:http:http.0] 127.0.0.1:24222, HTTP status=500 500 Internal Server Error undefined method `delete' for 1672843231:Integer

[2023/01/04 22:40:32] [ warn] [engine] failed to flush chunk '745285-1672843231.946516191.flb', retry in 11 seconds: task_id=0, input=cpu.0 > output=http.0 (out_id=0) [2023/01/04 22:40:33] [error] [output:http:http.0] 127.0.0.1:24222, HTTP status=500 500 Internal Server Error undefined method `delete' for 1672843232:Integer

Screenshots $ /opt/fluent-bit/bin/fluent-bit -i cpu -t s fluent_bit -o http://127.0.0.1:24222 Fluent Bit v2.0.8

[2023/01/04 22:40:30] [ info] [fluent bit] version=2.0.8, commit=, pid=745285 [2023/01/04 22:40:30] [ info] [storage] ver=1.4.0, type=memory, sync=normal, checksum=off, max_chunks_up=128 [2023/01/04 22:40:30] [ info] [cmetrics] version=0.5.8 [2023/01/04 22:40:30] [ info] [ctraces ] version=0.2.7 [2023/01/04 22:40:30] [ info] [input:cpu:cpu.0] initializing [2023/01/04 22:40:30] [ info] [input:cpu:cpu.0] storage_strategy='memory' (memory only) [2023/01/04 22:40:30] [ info] [output:http:http.0] worker #0 started [2023/01/04 22:40:30] [ info] [sp] stream processor started [2023/01/04 22:40:30] [ info] [output:http:http.0] worker #1 started [2023/01/04 22:40:32] [error] [output:http:http.0] 127.0.0.1:24222, HTTP status=500 500 Internal Server Error undefined method `delete' for 1672843231:Integer

[2023/01/04 22:40:32] [ warn] [engine] failed to flush chunk '745285-1672843231.946516191.flb', retry in 11 seconds: task_id=0, input=cpu.0 > output=http.0 (out_id=0) [2023/01/04 22:40:33] [error] [output:http:http.0] 127.0.0.1:24222, HTTP status=500 500 Internal Server Error undefined method `delete' for 1672843232:Integer

Your Environment

Additional context

nokute78 commented 1 year ago

Could you add format property for out_http ? https://docs.fluentbit.io/manual/pipeline/outputs/http e.g. fluent-bit -i cpu -t aa -o http://127.0.0.1:24222 -p format=json

Fluentd expects json format, but fluent-bit sends msgpack format by default.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days. Maintainers can add the exempt-stale label.

github-actions[bot] commented 1 year ago

This issue was closed because it has been stalled for 5 days with no activity.