You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What you're doing and what's happening: I was trying to setup osquery under WSL to duplicate a development environment I currently have inside an Ubuntu 18.04 VM. It appears to have a problem with configuring sockets which hinders full functionality. The osquery package used in Ubuntu 18.04 under WSL can be obtained from here:
Among the messages displayed on start will be the following:
W0423 14:31:57.658298 149 interface.cpp:269] Extensions disabled: cannot start extension manager (/tmp/osquery.em) (Could not set SO_LINGER: Invalid argument)
What's wrong / what should be happening instead: The /tmp/osquery.em domain socket does not get created as a result of this failure. The SO_LINGER with setsockopt should succeed.
Strace of the failing command, if applicable: Inside my Ubuntu 18.04 VM where this works fine the strace is as follows:
Was able to reproduce; not a dupe AFAICT. Guess SO_LINGER isn't supported with WSL's AF_UNIX. Not too surprised it never came up before since lingering around on a IPC socket is "unusual". I think (?) it might make sense in some esoteric cases. Anyway, Real Linux eats it. Probably suffice to just no-op on WSL, in a pinch.
Oddly I couldn't find it in the osquery source. Maybe it's buried down below in a library. But if you can find the line of code and just comment it out, it'll probably work fine. Probably.
This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request.
Your Windows build number: 10.0.17763.437
What you're doing and what's happening: I was trying to setup osquery under WSL to duplicate a development environment I currently have inside an Ubuntu 18.04 VM. It appears to have a problem with configuring sockets which hinders full functionality. The osquery package used in Ubuntu 18.04 under WSL can be obtained from here:
https://pkg.osquery.io/deb/osquery_3.3.2_1.linux.amd64.deb
Once installed I run the following command:
/usr/bin/osqueryd --extensions_socket=/tmp/osquery.em -logger_path=/tmp/osqueryd_log --database_path=/tmp/osqueryd_db --pidfile=/tmp/osqueryd.pid --force=true --disable_watchdog --disable_events=false --events_expiry=3600 --events_max=50000
Among the messages displayed on start will be the following:
W0423 14:31:57.658298 149 interface.cpp:269] Extensions disabled: cannot start extension manager (/tmp/osquery.em) (Could not set SO_LINGER: Invalid argument)
What's wrong / what should be happening instead: The /tmp/osquery.em domain socket does not get created as a result of this failure. The SO_LINGER with setsockopt should succeed.
Strace of the failing command, if applicable: Inside my Ubuntu 18.04 VM where this works fine the strace is as follows:
socket(AF_UNIX, SOCK_STREAM, 0) = 14
setsockopt(14, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
setsockopt(14, SOL_SOCKET, SO_LINGER, {l_onoff=0, l_linger=0}, 8) = 0
The strace of the failure inside WSL with Ubuntu 18.04 is as follows:
socket(AF_UNIX, SOCK_STREAM, 0) = 11
setsockopt(11, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
setsockopt(11, SOL_SOCKET, SO_LINGER, {l_onoff=0, l_linger=0}, 8) = -1 EINVAL (Invalid argument)
The text was updated successfully, but these errors were encountered: