-
Notifications
You must be signed in to change notification settings - Fork 55
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
hsflowd[2344]: SFF8036 ethtool ioctl failed: No such device #46
Comments
It seems that ethtool must be reporting the presence of that kind of optical module. If you run with debug logging you may see the message from here: host-sflow/src/Linux/readInterfaces.c Line 475 in dc692de
To run with debug output: (Add more ‘d’s for more debug detail) You could probably run ethtool at the command line to see the same info (not sure what the ethtool option is). Let me know if tou see something we can fix in hsflowd. |
Yes, it does. And it is really optical module, but I do not understand, why ioctl fails with "no such device" error. |
What do you get for this Linux command? % sudo ethtool -m enp43s0f1 I wonder if the problem is just that hsflowd needs to retain root permissions for these requests? You could try running with: % sudo hsflowd -dd -p The -p option prevents hsflowd from dropping root privileges. (You could also run ethtool without sudo to see if it fails) |
You are right, when running ethtool from nobody (as it does for hsflowd), I get following error: |
So the immediate workaround is probably to edit /lib/systemd/system/hsflowd.service and add "-p" to the ExecStart line. Please confirm that this works, and that you start to see those optical counters in the sflow output (e.g. run sflowtool and grep for "sfp_*"). Looking ahead, we could either (1) keep the socket file descriptor that was opened the first time readInterfaces() was called (when root privileges have not been dropped yet) and use it again for all subsequent ethtool ioctl calls, or (2) call retainRootRequest() the first time we detect the presence of an optical module, so that permissions are not relinquished. Neither of those are particularly tempting, but first we should check the ethtool sources to see if (1) is likely to work, and see which capability is actually needed for the optical module ioctl. |
After running |
I'm using hsflowd to performance metrics using the sFlow protocol but facing error "hsflowd[2344]: SFF8036 ethtool ioctl failed: No such device" in /var/log/syslog. hsflowd is working properly but the error is being logged almost every 23 minutes
Any Idea?
The text was updated successfully, but these errors were encountered: