Error running 'LocalTest': Unable to open debugger port (127.0.0.1:56999): java.net.SocketException

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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章