Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

out_forward: do not use SO_LINGER on Windows #2398

Merged
merged 1 commit into from
Apr 25, 2019

Conversation

fujimotos
Copy link
Member

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

What this PR does / why we need it:

There is an obscure bug in out_forward that prevents events from
being sent to a remote node. It occures only on Windows, and is
reproducable only when SSL/TLS is enabled.

The root cause is not fully investigated yet, but disabling
SO_LINGER is confirmed to fix the issue. So this implements it.

Docs Changes:

Not required

Release Note:

"out_forward: fix data loss when SSL/TLS is enabled on Windows "

There is an obscure bug in out_forward that prevents events from
being sent to a remote node. It occures only on Windows, and is
reproducable only when SSL/TLS is enabled.

The root cause is not fully investigated yet, but disabling
SO_LINGER is confirmed to fix the issue. So this implements it.

Signed-off-by: Fujimoto Seiji <[email protected]>
@repeatedly repeatedly merged commit 30ee851 into fluent:master Apr 25, 2019
@repeatedly
Copy link
Member

Thanks!

@michaelsteiner
Copy link

This fix is included in Fluentd 1.5.0 according to https://github.com/fluent/fluentd/blob/master/CHANGELOG.md.
According to https://support.treasuredata.com/hc/en-us/articles/360001479187-The-td-agent-ChangeLog, td-agent (.msi package for Windows) 3.4.1 is still based on Fluentd 1.4.2.

=> When will an .msi package for Windows be available that includes this fix? (Say, newer than td-agent-3.4.1-0-x64.msi that is currently available on https://td-agent-package-browser.herokuapp.com/3/windows )

@repeatedly
Copy link
Member

Next td-agent, 3.5.0, will be released late july or early august.
If you want to use newer version in msi package, gem update is one way.

@michaelsteiner
Copy link

Next td-agent, 3.5.0, will be released late july or early august.
If you want to use newer version in msi package, gem update is one way.

Thanks a lot for your fast response. The following update worked for me:

Download https://rubygems.org/downloads/fluentd-1.5.2-x64-mingw32.gem and install it with
fluent-gem install --force --local *.gem

cosmo0920 added a commit that referenced this pull request Mar 9, 2020
[The previous commit](7d16531) solved linger_timeout member types glitch.
In the previous linger_timeout behavior is always occurring dropping data.
But the fixing member type glitches, Fluentd can handle linger_timeout on Windows.
This type glitch causes overflow and then linger_timeout should be 0.
So, this is why specifying linger_timeout causes data loss on Windows.

LIBC: { int l_onoff; int l_linger; } # I!I!
Winsock: { u_short l_onoff; u_short l_linger; } #S!S!

Really fixes for #1968.
Reverted #2398

Signed-off-by: Hiroshi Hatake <[email protected]>
@fujimotos fujimotos deleted the sf/forward-tls-win32 branch October 9, 2022 06:17
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.

Encryption support on out_forwarder plugin in Windows (Fluentd 1.0.2)
3 participants