-
Notifications
You must be signed in to change notification settings - Fork 344
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
"Error listening for ICMP packets: socket: permission denied" while using this library in unprivileged ping #4
Comments
I have the same issue |
sudo sysctl -w net.ipv4.ping_group_range="0 2147483647" But I want use it in docker container... |
Unfortunately, given the nature of linux this will not be easily solved. It would be nice if a distinct error was thrown in this situation, in order to allow capturing and informing the user that permissions are wrong, or otherwise handling it automatically. |
On Mac, it could use unprivileged, but on some Linux, you should use privileged and have sudo permission. |
I am experiencing this issue on ubuntu 18.04 with or without using sudo EDIT: |
I believe the issue here is spelled out in https://github.com/sparrc/go-ping#note-on-linux-support. Unfortunately the default linux |
This library , when I am using for unprivileged ping throws "Error listening for ICMP packets: socket: permission denied" error with go version go1.7.4 .
what I am doing is-
func (p *Ping) doPing() (latency, jitter, packetLoss float64, err error) {
}
The text was updated successfully, but these errors were encountered: