-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
add_host_metadata processor fails with GetNativeSystemInfo failed: invalid argument #7715
Comments
This issue also occurs with Winlogbeat (so likely all beats). |
It looks like the issue is here: On 64-bit windows, r1 gets set to 0 which then causes the logic here to proceed into an error state and return syscall.EINVAL (which gets printed as "invalid argument"). On 32-bit windows, r1 gets set to 262144 which is 0x400000 which then returns successfully. This syscall does not provide a return code per: https://msdn.microsoft.com/en-us/library/windows/desktop/ms724340(v=vs.85).aspx -- i might be misunderstanding the semantics of GO syscalls but I think checking that r1 == 0 is incorrect here. If that's the case then why does it return 0x400000 on x86.... |
Nice. I was just checking our builds in go-sysinfo to confirm that it does work there on Windows 2016 (x64). https://ci.appveyor.com/project/elastic-beats/go-sysinfo/build/40#L97 The fix will require an adjustment to this line which generates that file to tell it that the method has no return. https://github.com/elastic/go-windows/blob/5d078fa9943c7549875ad32ed0f5cc0efa9546e1/kernel32.go#L32 |
It looks like that test might be running on 2012 R2
I dont see another example of how to change it to not have a return or I'd make a PR for that -- I closed my initial PR as I didnt realize they were generated files. |
Update go-windows to resolve issue with x64 Windows and GetNativeSystemInfo. Relates elastic/beats#7715 elastic/go-windows#3
Update github.com/elastic/go-windows to fix add_host_metadata for Windows. Fixes #7715
Update github.com/elastic/go-windows to fix add_host_metadata for Windows. Fixes elastic#7715 (cherry picked from commit cbbf08d)
Update github.com/elastic/go-windows to fix add_host_metadata for Windows. Fixes elastic#7715 (cherry picked from commit cbbf08d)
Update github.com/elastic/go-windows to fix add_host_metadata for Windows. Fixes elastic#7715 (cherry picked from commit 0f78f6b)
Add the
add_host_metadata
processor to the configuration yaml for either beat and attempt to start:The x64 version of both Filebeat and Metricbeat fail with the following message:
Exiting: error initializing publisher: error initializing processors: 1 error: GetNativeSystemInfo failed: invalid argument
The x86 versions of both programs start without issue, however. I suspect this will impact all beats, but I've only tested Filebeat and Metricbeat.
Initially discovered by @strawgate
The text was updated successfully, but these errors were encountered: