端口问题诊断:Error: listen EADDRINUSE: address already in use 3000

技术运维

Windows

C:\Users\Desktop\nodejs>netstat -ano | findstr :3000

  TCP    0.0.0.0:3000           0.0.0.0:0              LISTENING       12356
  TCP    [::]:3000              [::]:0                 LISTENING       12356

C:\Users\Desktop\nodejs>taskkill /PID 12356 /F

SUCCESS: The process with PID 12356 has been terminated.

Linux

sudo lsof -i :3000
kill -9 <PID>

Post Comment