A Node.js service fails to start with `Error: listen EACCES: permission denied 0.0.0.0:80`.
BeginnerTroubleshootingSockets, ports, TIME_WAIT and conntrack
Answer
Likely causes → Ports below 1024 are privileged; a non-root process needs CAP_NET_BIND_SERVICE, or the system must lower net.ipv4.ip_unprivileged_port_start.
Diagnose →
id
sysctl net.ipv4.ip_unprivileged_port_start
getcap $(which node)
Fix → Pick one:
# systemd unit
AmbientCapabilities=CAP_NET_BIND_SERVICE
# or listen on 8080 and put nginx / an LB on 80
# or (containers) run on 8080 and map -p 80:8080
Avoid setcap on the shared node binary; it grants the capability to every Node script.
Prevent → Run apps on high ports behind a reverse proxy or LB; never run them as root just to bind 80.
More on Sockets, ports, TIME_WAIT and conntrack
`dmesg` is full of `nf_conntrack: nf_conntrack: table full, dropping packet` and new connections randomly time out.Intermediate`ss -s` on a reverse proxy shows 40,000 sockets in `TIME_WAIT`. Is that a problem?BeginnerAn app server's `CLOSE_WAIT` count grows steadily until the service logs `Too many open files`.IntermediateLogs show `accept4(): Too many open files` and the service stops accepting connections.Beginner`dmesg` shows `TCP: request_sock_TCP: Possible SYN flooding on port 443. Sending cookies.`Intermediate`ss -ltn` shows the listener for port 8080 with `Recv-Q 129` and `Send-Q 128`, and clients hang on connect.Advanced