gpt4 book ai didi

logging - Fluentd - "incoming chunk is broken"

转载 作者:行者123 更新时间:2023-12-04 11:34:24 24 4
gpt4 key购买 nike

我在 docker 容器上运行 fluentd 图像。当我使用 telnet(或 netcat)打开 TCP 连接并发送“消息”字符串时,会出现以下消息:

2017-01-24 10:22:00 +0000 [warn]: incoming chunk is broken: source="host: 192.168.99.1, 
addr: 192.168.99.1, port: 12345" msg=109

2017-01-24 10:22:00 +0000 [warn]: incoming chunk is broken: source="host: 192.168.99.1,
addr: 192.168.99.1, port: 12345" msg=101

2017-01-24 10:22:00 +0000 [warn]: incoming chunk is broken: source="host: 192.168.99.1,
addr: 192.168.99.1, port: 12345" msg=115

2017-01-24 10:22:00 +0000 [warn]: incoming chunk is broken: source="host: 192.168.99.1,
addr: 192.168.99.1, port: 12345" msg=115

2017-01-24 10:22:00 +0000 [warn]: incoming chunk is broken: source="host: 192.168.99.1,
addr: 192.168.99.1, port: 12345" msg=97

2017-01-24 10:22:00 +0000 [warn]: incoming chunk is broken: source="host: 192.168.99.1,
addr: 192.168.99.1, port: 12345" msg=103

2017-01-24 10:22:00 +0000 [warn]: incoming chunk is broken: source="host: 192.168.99.1,
addr: 192.168.99.1, port: 12345" msg=101

我不明白为什么我的“消息”是逐个字符发送的,并且在流利的一侧显示为这样。如何整体显示我的“消息”?

此外,当我发送 JSON 格式的字符串时,我仍然收到“传入块已损坏”警告。我该如何解决这个问题?

最佳答案

我在使用 fluent-bit 作为客户端时遇到了这个问题,因为发送的内容与预期的格式不匹配。
以下为我解决了它(两个配置都需要为http设置):
fluent-bit.conf

[INPUT]
name cpu
tag cpu.local
interval_sec 2

[OUTPUT]
Name http
Match *
Host 12.345.678.9
Port 1234
URI /tagname
Format json
td-agent.conf
<source>
@type http
port 1234
<parse>
@type json
</parse>
</source>

<match tagname>
@type copy
<store>
@type stdout
@id output_stdout
</store>
</match>

关于logging - Fluentd - "incoming chunk is broken",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41822406/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com