Backport(v1.19): Fix #4396: Add timeout to establish_connection to prevent infinite loop (#5104) #5138
+33
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport #5104
Which issue(s) this PR fixes:
Fixes #4396
What this PR does / why we need it:
Adds timeout mechanism to
establish_connectionmethod 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 existinghard_timeoutconfiguration to break the loop, disable problematic nodes, and maintain log flow through healthy nodes.Docs Changes:
None required - uses existing
hard_timeoutconfiguration parameter.Release Note:
Fix infinite loop in out_forward handshake protocol that could cause logs to stop being flushed in unstable network environments.