Windows解決端口占用


解決端口占用

Windows上端口占用會提示諸如以下錯誤:

Fatal error. can't bind to 127.0.0.1:10809: There may be another Privoxy 
or some other proxy running on port 10809

解決該異常方法:

  1. 打開Dos窗口輸入cmd點擊確定進入命令窗口。

  2. 使用命令netstat -ano列出所有端口的詳細信息,在列表中找到被占用的端口(也可以使用netstat -ano|findstr port列出具體端口的詳細信息)並記下PID。

    C:\Users\MECHREVO>netstat -ano|findstr 10809
      TCP    127.0.0.1:10809        0.0.0.0:0              LISTENING       19700
    
  3. 使用tasklist|findstr "PID"命令查看具體是哪個進程或者程序占用了端口(或打開任務管理器進行查看):

    C:\Users\MECHREVO>tasklist|findstr "19700"
    vmware-view.exe              19700 Console                    3     31,488 K
    
  4. 使用命令taskkill /f /t /im 映像名關閉進程(或使用任務管理器進行操作):

    C:\Users\MECHREVO>taskkill /f /t /im vmware-view.exe
    成功: 已終止 PID 11604 (屬於 PID 11612 子進程)的進程。
    成功: 已終止 PID 8080 (屬於 PID 11976 子進程)的進程。
    成功: 已終止 PID 11976 (屬於 PID 5048 子進程)的進程。
    


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM