sendto:不允许操作:netsnmp
我从 net-snmp 库执行 snmp get 时收到错误,该错误表明
Operation not permitted error from sendto.
我想知道什么可能导致 sendto(2)
系统调用因此错误而失败。
请注意,这是一个间歇性错误,因此我认为它不是由防火墙问题引起的,除非防火墙可能会间歇性地导致此错误。
I get an error from the net-snmp library doing an snmp get that says
Operation not permitted error from sendto.
I am wondering what could make the sendto(2)
system call fail with this error.
Note, this is an intermittent error so I didn't think it was caused by a firewall issue, unless a firewall could cause this intermittently.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
今天发生在我身上,就我而言,问题是由于 conntrack 表已满。
其他症状是系统日志中出现大量“
nf_conntrack:表已满,丢弃数据包
”。如果是这种情况,解决方案是将net.ipv4.netfilter.ip_conntrack_max
(又名net.netfilter.nf_conntrack_max
)设置为更高的值,例如:对于其他人来说,可能还有其他可能的原因,例如 SELinux 或 AppArmor 策略。 YMMV。
Happened to me today, in my case the problem was due to conntrack table being full.
Additional symptom is lots of "
nf_conntrack: table full, dropping packet
" in syslog. If this is the case, the solution is to setnet.ipv4.netfilter.ip_conntrack_max
(akanet.netfilter.nf_conntrack_max
) to a higher value, for example:As said by others, there could be other possible reasons for this, like SELinux or AppArmor policies. YMMV.
如果错误代码为 EPERM,则您正在以非 root 用户身份使用特权端口
Use ports > 1024
if the error code is EPERM, you are using privileged port as non-root user
Use ports > 1024