解決hyper-V開啟帶來的端口問題


問題描述:

今天無法啟動intelliJ系軟件pycharm,經研究是端口問題。
目標端口未被占用但發現被保護

解決hyper-V開啟導致的端口問題:

方案一:

From https://github.com/docker/for-win/issues/3171#issuecomment-459205576

the workaround worked for me, the steps are:

Disable hyper-v (which will required a couple of restarts)
dism.exe /Online /Disable-Feature:Microsoft-Hyper-V

When you finish all the required restarts, reserve the port you want so hyper-v doesn't reserve it back
netsh int ipv4 add excludedportrange protocol=tcp startport=50051 numberofports=1

Re-Enable hyper-V (which will require a couple of restart)
dism.exe /Online /Enable-Feature:Microsoft-Hyper-V /All

when your system is back, you will be able to bind to that port successfully.

方案二:

重啟電腦並立即開啟目標軟件也可以解決。


免責聲明!

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



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