Tag Archives: Springboot from entry to mastery

[Solved] error when starting dev server:Error: listen EACCES: permission denied 0.0.0.0:80 at Server.set

error when starting dev server:Error: listen EACCES: permission denied 0.0.0.0:80 at Server.set

error when starting dev server:
Error: listen EACCES: permission denied 0.0.0.0:80
at Server.setupListenHandle [as _listen2] (node:net:1313:21)
at listenInCluster (node:net:1378:12)
at Server.listen (node:net:1465:7)Using cnpm install works

mac to 8090.

mac terminal port view command
View Port thread lsof -i:4700
$ lsof -i:4700
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
node 12159 yyyyyy 23u IPv4 0x76b4f5051c4983f3 0t0 TCP *:netxms-agent (LISTEN)

The PID here is the process number that occupies port 4700
kill 4700
Solution:
View mac terminal port command netstat -AaLlnW
Method 1
// Check if port 80 is occupied
sudo lsof -i :80

Method 2
netstat -anp tcp | grep 80
The following command can directly end all processes that are occupying the port.
lsof -P | grep ‘:80’ | awk ‘{print $2}’ | xargs kill -9

Ps -ef|grep program name