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

flb_errno printing wrong error codes on windows #3146

Open
simonvanbernem opened this issue Mar 3, 2021 · 4 comments · May be fixed by #10017
Open

flb_errno printing wrong error codes on windows #3146

simonvanbernem opened this issue Mar 3, 2021 · 4 comments · May be fixed by #10017

Comments

@simonvanbernem
Copy link

On windows, the flp_errno routine does not print the error codes of the errors that actually happen.

For example: in dlb_io.c:255, net_io_write_async can return, because FLB_WOULDBLOCK detected the socket would block by looking at WSAGetLastError. The caller (flb_http_client.c:1161) notices the error and tries to do error reporting with flb_errno. However, flb_errno only checks errno, not WSAGetLastError, which contains the appropriate error code windows. Consequently, the error messages look like this:

[2021/03/02 12:29:00] [error] [O:\fluent-bit\src\flb_http_client.c:1161 errno=0] No error

Not very helpful. I expect the error routine to output the actual error from WSAGetLastError.

To reproduce, tail a file to an elasticsearch output where the host is unreachable on windows.

@github-actions
Copy link
Contributor

github-actions bot commented Apr 3, 2021

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Apr 3, 2021
@simonvanbernem
Copy link
Author

Still relevant.

@github-actions github-actions bot removed the Stale label Apr 4, 2021
@github-actions
Copy link
Contributor

github-actions bot commented May 5, 2021

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label May 5, 2021
@github-actions
Copy link
Contributor

This issue was closed because it has been stalled for 5 days with no activity.

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 a pull request may close this issue.

2 participants