-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Comments
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. |
Still relevant. |
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. |
This issue was closed because it has been stalled for 5 days with no activity. |
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The text was updated successfully, but these errors were encountered: