IDEA启动项目报端口占用
Description:
Web server failed to start. Port 2021 was already in use.
Action:
Identify and stop the process that's listening on port 2021 or configure this application to listen on another port.
Disconnected from the target VM, address: '127.0.0.1:55877', transport: 'socket'
Process finished with exit code 1
对于上述端口占用情况可以在IDEA的Terminal窗口解决,或者电脑cmd中。
1、打开IDEA Terminal窗口。
输入以下命令:
查找占用端口的进程号: netstat -ano | findstr 2021
2021 是端口号
干掉占用端口的进程: taskkill /pid 10984 /f
看到成功字样说明成功,然后正常启动项目即可!