***************************
APPLICATION FAILED TO START
***************************
Description:
Web server failed to start. Port 8080 was already in use.
Action:
Identify and stop the process that's listening on port 8080 or configure this application to listen on another port.
Disconnected from the target VM, address: '127.0.0.1:64523', transport: 'socket'
Process finished with exit code 1
当运行中的程序异常关闭后,再次启动时出现端口占用情况
原因:(异常关闭后,进程仍在运行)
解决方案(window环境):终止进程后再次启动程序
1、根据端口号(以8080为例)查询进程id
netstat -ano | findstr 8080
进程号:9460
TCP 0.0.0.0:8080 0.0.0.0:0 LISTENING 9460
TCP 127.0.0.1:8080 127.0.0.1:62659 ESTABLISHED 9460
2、根据进程id执行 taskkill /PID 进程id /F (带 /F 选项:强行终止这个进程)
taskkill /PID 9460 /F
成功: 已终止 PID 为 9460 的进程。