解决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.

方案二:

重启电脑并立即开启目标软件也可以解决。

posted @ 2020-02-22 16:00  </Venus>  阅读(1683)  评论(0编辑  收藏  举报