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
ss - Cannot open netlink socket: Protocol not supported #8232
Comments
should be @RussellSenior |
@RussellSenior Any update on this? |
The problem is here:
I tried replacing SOCK_RAW with SOCK_DGRAM but same error. From reading the man page, it would appear that NETLINK_SOCK_DIAG is the issue. No idea what to replace with though. |
Found the issue. It's a kernel problem. You need to add CONFIG_NETLINK_DIAG=y to your kernel config. On desktop distros, this is a module loaded dynamically. |
@neheb Nice! So I guess the Q now is if OpenWrt should enable that as a kernel default? |
Unlikely. That's partially what the debloat patch you linked to does. Maybe create a kernel module package and have ss depend on that. |
@neheb Perhaps @RussellSenior should see this thread then. |
@neheb Correct me if I'm wrong, but isn't that just a config option for the module named |
Dunno. If you install that, does ss work properly? |
Ah there's also a kmod-nfnetlink-queue. That one must be it. |
@neheb I already had that installed and that does not resolve it. Did you try to re-compile the module with |
On further inspection, I don't think that module is the answer. I think a new one has to be specified. Or run a custom kernel with CONFIG_NETLINK_DIAG=y |
So it's not a module? I did re-compile the kernel with that option. |
Well, the object is netlink_diag.o , which can be built as a module. I was referring to kmod-nfnetlink-queue. That one is unrelated. |
Hmm, |
There's no kmod-* package for it. One has to be specified and built. Maybe in package/kernel/linux/modules/netfilter.mk This patch as mentioned above makes it work:
Anyway, I will close this. As you mentioned, this must go in https://bugs.openwrt.org/ . |
fwiw, gmail buried my notifications on this. sorry for the awol. |
@neheb Thanks, so reompile with that enabled in the config and then reinstall the kernel? |
Maybe something like this would work. I have no idea:
|
Allows proper usage of the ss tool. Otherwise, several errors and bad data gets thrown: Cannot open netlink socket: Protocol not supported Cannot open netlink socket: Protocol not supported Cannot open netlink socket: Protocol not supported Cannot open netlink socket: Protocol not supported Cannot open netlink socket: Protocol not supported Cannot open netlink socket: Protocol not supported Cannot open netlink socket: Protocol not supported Originally reported here: openwrt/packages#8232 Signed-off-by: Rosen Penev <rosenp@gmail.com>
Allows proper usage of the ss tool. Otherwise, several errors and bad data gets thrown: Cannot open netlink socket: Protocol not supported Cannot open netlink socket: Protocol not supported Cannot open netlink socket: Protocol not supported Cannot open netlink socket: Protocol not supported Cannot open netlink socket: Protocol not supported Cannot open netlink socket: Protocol not supported Cannot open netlink socket: Protocol not supported Originally reported here: openwrt/packages#8232 Signed-off-by: Rosen Penev <rosenp@gmail.com>
Try latest master. |
Allows proper usage of the ss tool. Otherwise, several errors and bad data gets thrown: Cannot open netlink socket: Protocol not supported Cannot open netlink socket: Protocol not supported Cannot open netlink socket: Protocol not supported Cannot open netlink socket: Protocol not supported Cannot open netlink socket: Protocol not supported Cannot open netlink socket: Protocol not supported Cannot open netlink socket: Protocol not supported Originally reported here: openwrt/packages#8232 Signed-off-by: Rosen Penev <rosenp@gmail.com>
Allows proper usage of the ss tool. Otherwise, several errors and bad data gets thrown: Cannot open netlink socket: Protocol not supported Cannot open netlink socket: Protocol not supported Cannot open netlink socket: Protocol not supported Cannot open netlink socket: Protocol not supported Cannot open netlink socket: Protocol not supported Cannot open netlink socket: Protocol not supported Cannot open netlink socket: Protocol not supported Originally reported here: openwrt/packages#8232 Signed-off-by: Rosen Penev <rosenp@gmail.com>
Allows proper usage of the ss tool. Otherwise, several errors and bad data gets thrown: Cannot open netlink socket: Protocol not supported Cannot open netlink socket: Protocol not supported Cannot open netlink socket: Protocol not supported Cannot open netlink socket: Protocol not supported Cannot open netlink socket: Protocol not supported Cannot open netlink socket: Protocol not supported Cannot open netlink socket: Protocol not supported Originally reported here: openwrt/packages#8232 Signed-off-by: Rosen Penev <rosenp@gmail.com>
@neheb Shouldn't this issue be kept open? |
I think this was fixed after 19.07. master should work. |
@russelsenior
@jow- unsure if this should be opened on bugs.openwrt.org since it's part of iproute2?
The ss package reports
Cannot open netlink socket: Protocol not supported
errors when run.The last reference to this issue I found was from two years ago, marked Fixed - https://dev.archive.openwrt.org/ticket/20544.html
[strykar@i-5 ~/github/openwrt]$ grep CONFIG_NETLINK_DIAG .config
in my buildroot does not show it and the strace log looks like it's indeed the same issue.Strace shows
socket(AF_NETLINK, SOCK_RAW|SOCK_CLOEXEC, NETLINK_SOCK_DIAG) = -1 EPROTONOSUPPORT (Protocol not supported)
errors.Full strace log - https://paste.ubuntu.com/p/JnhWCNCZsH/
The text was updated successfully, but these errors were encountered: