Skip to content

Conversation

@Watson1978
Copy link
Contributor

@Watson1978 Watson1978 commented Nov 4, 2025

Backport #5104

Which issue(s) this PR fixes:
Fixes #4396

What this PR does / why we need it:
Adds timeout mechanism to establish_connection method to prevent infinite loop when handshake protocol gets stuck. In unstable network environments with proxy components, if connection drops during handshake after TLS establishment, Fluentd gets stuck in infinite loop causing logs to stop being flushed. This fix uses existing hard_timeout configuration to break the loop, disable problematic nodes, and maintain log flow through healthy nodes.

Docs Changes:
None required - uses existing hard_timeout configuration parameter.

Release Note:
Fix infinite loop in out_forward handshake protocol that could cause logs to stop being flushed in unstable network environments.

…op (#5104)

**Which issue(s) this PR fixes**:
Fixes #4396

**What this PR does / why we need it**:
Adds timeout mechanism to `establish_connection` method to prevent
infinite loop when handshake protocol gets stuck. In unstable network
environments with proxy components, if connection drops during handshake
after TLS establishment, Fluentd gets stuck in infinite loop causing
logs to stop being flushed. This fix uses existing `hard_timeout`
configuration to break the loop, disable problematic nodes, and maintain
log flow through healthy nodes.

**Docs Changes**:
None required - uses existing `hard_timeout` configuration parameter.

**Release Note**:
Fix infinite loop in out_forward handshake protocol that could cause
logs to stop being flushed in unstable network environments.

Signed-off-by: Ian Driver <[email protected]>
Co-authored-by: Ian Driver <[email protected]>
Signed-off-by: Shizuo Fujita <[email protected]>
@daipom daipom added this to the v1.16.11 milestone Nov 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants