栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > .Net

记一次idea启动报错--java.net.BindException: Address already in use: bind

.Net 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

记一次idea启动报错--java.net.BindException: Address already in use: bind

某天启动idea时,弹窗报出如下错误:

百度查看博客IDEA启动报错-java.net.BindException: Address already in use: bind - 蓝天上的云℡ - 博客园 (cnblogs.com)发现是idea启动时需要在端口6942~6991间找到一个可用端口并绑定(bind),但全部被占用导致的,于是按照社区建议我尝试关闭hype-v并调整端口,操作方法参考如下链接:Unable to bind ports: Docker-for-Windows & Hyper-V excluding but not using important port ranges · Issue #3171 · docker/for-win (github.com)

@veqryn 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.

但是发现无效,启动仍然报错,重装仍然如此,根据端口检查发现6000-7000的端口并未被占用,后查看另一个关于此问题的文章:Critical Internal Error on Startup of IntelliJ IDEA: "Cannot Lock System Folders" – IDEs Support (IntelliJ Platform) | JetBrains发现,有可能idea绑定端口时绑定到了不允许绑定的虚拟网络适配器上(虚拟机创建的网络适配器太多),尝试全部关闭网络适配器并重新开启后,问题得以解决,操作方法如下:

运行管理员权限的powershell
PS C:Windowssystem32> Get-NetAdapter | Disable-NetAdapter -Confirm:$false -PassThru:$true | Enable-NetAdapter 

 

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/911057.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号