IDEA在調試程序的時候出現:
Error running 'LocalTest': Address localhost:8080 is already in use以及
Error running 'LocalTest': Unable to open debugger port (127.0.0.1:56999): java.net.SocketException "Interrupted function call: accept failed"
使用如下方案解決:
1.管理員身份運行CMD
2.在CMD中使用如下命令:
netstat -ano|findstr 8080
找出佔用你程序端口的程序(我的程序使用的是8080端口,根據你程序部署時候設置的值,將8080修改爲對應的):
3.可以看到,8080端口被pid爲4188的程序佔用了,根據PID將其殺掉:
taskkill -pid 4188 –f