Solution-interrupt IDEA, causing the port to be occupied

analysis:
    Because the project service is running in IDEA, suddenly closing IDEA (close without stopping the service) will cause the port to be still in use. Unless the computer is restarted, the original port can only be used after the previously opened port is killed.
 
solve:
 
    First look at the ports that were opened and not stopped before IDEA was interrupted-that is, the service port number that was not stopped when IDEA was closed
    Then use the command: netstat -aon|findstr to get the Pid of the corresponding TCP listening process
 
netstat -aon|findstr 【查找到的所有端口号】

例如:
netstat -aon|findstr 8001

effect:

 
Reuse taskkill -f -pid 
taskkill -f -pid 【进程号】

例如:
taskkill -f -pid 14124

effect:

 
After the above operations are completed, restart the project in IDEA and there will be no error report that the port is occupied

Guess you like

Origin blog.csdn.net/weixin_43562937/article/details/106608664