Open Morgan-Li opened 1 day ago
I was able to send logs to fluent bit without errors by turning http/2 off on the fluent bit side http2 off. I'm thinking it might be a mismatch between otel and fluent bit http versions, but it seems to work when it defaults back to http1.1
[INPUT]
Name opentelemetry
Listen 0.0.0.0
Port 4318
tls On
tls.verify On
tls.ca_file /certs/fluent/tls/ca.crt
tls.crt_file /certs/fluent/tls/tls.crt
tls.key_file /certs/fluent/tls/tls.key
tls.debug 4
http2 Off
[OUTPUT]
Name stdout
Match *
Describe the bug When sending logs from the OpenTelemetry Collector to Fluent Bit over TLS, the logs initially flow without any issues and are received and outputted to standard output on Fluentbit. However, after a brief period, the following error appears repeatedly, eventually hitting max retries and stopping:
It seems like these retries are resending the same logs to Fluent Bit, as duplicated logs appear in Fluent Bit’s stdout. This issue only occurs when using HTTPS/TLS. The same configuration works without any errors when using plain HTTP.
Steps to reproduce
Set up Fluent Bit with the opentelemetry input plugin and enable TLS. fluent-bit.conf:
Configure OpenTelemetry Collector to send logs over HTTPS to Fluent Bit using the OTLP HTTP exporter. config.yaml:
Send logs from Open Liberty to Otel collector, using below configuration files:
What did you expect to see? Logs should be exported from the OpenTelemetry Collector to Fluent Bit without any "context deadline exceeded (Client.Timeout exceeded while awaiting headers)" http errors or duplicate logs being sent, even when using TLS.
What did you see instead? The following error repeatedly appears in the OpenTelemetry Collector logs:
exporterhelper/retry_sender.go:118 Exporting failed. Will retry the request after interval. {"kind": "exporter", "data_type": "logs", "name": "otlphttp", "error": "failed to make an HTTP request: Post \"https://fluent-bit.morgan-certs.svc.cluster.local:3418/v1/logs\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)"
As a result, the same logs are resent multiple times to Fluent Bit, leading to duplicates in Fluent Bit’s stdout.
What version did you use? Open Telemetry Collector v0.105.0 Fluent Bit v3.1.8
What config did you use?
Environment OpenShift kubernetes based environment v4.16.7
Additional context The OpenTelemetry Collector continues functioning after this error. The source of the logs is an Open Liberty webserver.