Skip to content

http_server: built-in HTTP server deadlocks when exec input curls Fluent Bit internal endpoints #11769

@jackfletch

Description

@jackfletch

Bug Report

Describe the bug
In Fluent Bit v5.0.x, the built-in HTTP server (port 2020) deadlocks when any pipeline component makes an HTTP request to it from within the main event loop.

To Reproduce
Minimal config:

[SERVICE]
    HTTP_Server  On
    HTTP_Listen  0.0.0.0
    HTTP_Port    2020
    Flush        1

[INPUT]
    Name         exec
    Tag          test
    Command      curl -s http://127.0.0.1:2020/api/v1/metrics/prometheus
    Interval_Sec 30

[OUTPUT]
    Name  null
    Match *
  1. Start Fluent Bit, confirm the health check works:
curl http://127.0.0.1:2020/api/v1/uptime   # works fine
  1. Wait 30s for exec to fire, then try again:
curl http://127.0.0.1:2020/api/v1/uptime   # hangs forever

This works fine on v1.9.x and v4.2.x, but breaks on every v5.0.x release I've tested (v5.0.0 through v5.0.4).

Expected behavior
The built-in HTTP server should remain responsive while the in_exec plugin is running, as it did in v1.9.x and v4.2.x.

Screenshots
N/A

Your Environment

  • Version used: broken in v5.0.0 through v5.0.4, works in v1.9.10 and v4.2.2
  • Configuration: see minimal config above
  • Environment name and version: ECS Fargate (ARM64), also reproduced locally on macOS
  • Server type and version: N/A
  • Operating System and version: Amazon Linux 2023 (Fargate), macOS 15 (local)
  • Filters and plugins: in_exec, out_null (minimal repro)

Additional context
My use case is emitting Fluent Bit internal metrics out as CloudWatch metrics. The flow is (1) scrape Fluent Bit metrics endpoint with in_exec, (2) transform metrics into CloudWatch embedded metric format via filter_lua, and then (3) emit to CloudWatch as logs via out_cloudwatch_logs, which CloudWatch automatically converts to metrics.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions