lsof
- list open files 列出打开的文件
-i: selects the listing of files any of whose Internet address
matches the address specified in i. If no address is speci-
fied, this option selects the listing of all Internet and x.25
(HP-UX) network files
3000端口被占用:
{
code: 'EADDRINUSE',
errno: 'EADDRINUSE',
syscall: 'listen',
address: '::',
port: 3000
}
解决方案:
softwaredeMacBook-Pro:serv software$ lsof -i:3000
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
node 23353 software 32u IPv6 0x5acd86b90827ce57 0t0 TCP *:hbci (LISTEN)
node 23353 software 43u IPv6 0x5acd86b90827bd17 0t0 TCP localhost:hbci->localhost:56421 (CLOSE_WAIT)
softwaredeMacBook-Pro:serv software$ kill 23353
softwaredeMacBook-Pro:serv software$ lsof -i:3000
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。