Skip to content

Troubleshooting

AmirVoid12 edited this page Sep 18, 2026 · 1 revision

Troubleshooting

Cannot open ICMP socket — permission denied

Your user is not allowed to open an ICMP socket. Pick one fix:

# 1) allow unprivileged ping for all groups
sudo sysctl -w net.ipv4.ping_group_range="0 2147483647"

# 2) give node the raw socket capability
sudo setcap cap_net_raw+ep $(which node)

# 3) run as root
sudo node app.js

Check the current range with cat /proc/sys/net/ipv4/ping_group_range. The default 1 0 means nobody is allowed.

ICMP (ping) is currently supported on Linux only

You are running on Windows or macOS. Use tcp, http, https, udp or dns there. See Roadmap.

npm install fails with EBADPLATFORM

The package is limited to Linux for now, so npm blocks installation on other systems.

Failed to load native ICMP addon

The compiled .node file was not found or could not be loaded.

  • Check that gcc, make and python3 are installed
  • Rebuild: npx node-gyp rebuild
  • On Alpine (musl), a glibc prebuilt binary will not load. Build from source.

Invalid IP — hostname resolution not supported

ping accepts IP addresses only. Resolve the hostname first, see ICMP-Ping.

ERR_TIMEOUT

No echo reply arrived within 2000 ms. Common reasons:

  • The host blocks ICMP (many cloud firewalls do)
  • Packet loss or the host is down
  • A firewall on your machine drops outgoing ICMP

Compare with the system tool:

ping -c 3 1.1.1.1

ERR_SEND_FAILED:101 or :113

101 is network unreachable and 113 is no route to host. Check your network connection and routes.

ping works in the terminal but not in pingflux

The system ping binary usually has the cap_net_raw capability or the setuid bit set, so it works for normal users. Node does not. Use one of the fixes in the first section.

Inside Docker

Containers often drop NET_RAW. Add it back:

docker run --cap-add=NET_RAW your-image

Or allow unprivileged ping inside the container:

docker run --sysctl net.ipv4.ping_group_range="0 2147483647" your-image

Clone this wiki locally