问题描述
IDEA 2021.2版本启动时卡在加载界面,无任何报错提示,等待无响应,杀进程后重试错误依旧
问题排查
打印IDEA日志
- IDEA未默认开启日志,需手动开启
- 进入IDEA安装目录,找到bin目录下的idea.bat文件,用notepad++打开,在文档末尾加入pause
:: ---------------------------------------------------------------------
:: Run the IDE.
:: ---------------------------------------------------------------------
"%JAVA_EXE%" ^
-cp "%CLASS_PATH%" ^
%ACC% ^
"-XX:ErrorFile=%USERPROFILE%\java_error_in_idea_%%p.log" ^
"-XX:HeapDumpPath=%USERPROFILE%\java_error_in_idea.hprof" ^
-Djava.system.class.loader=com.intellij.util.lang.PathClassLoader -Didea.vendor.name=JetBrains -Didea.paths.selector=IntelliJIdea2021.2 -Didea.jre.check=true -Dsplash=true ^
%IDE_PROPERTIES_PROPERTY% ^
com.intellij.idea.Main ^
%*
pause
- 关闭便捷页面,双击bat文档,查看报错日志:显示Address already in use: bind
2022-10-26 14:22:00,145 [ 2239] WARN - rationStore.ComponentStoreImpl - Path must not contains ROOT_CONFIG macro, corrected: qaplug_profiles
2022-10-26 14:22:00,355 [ 2449] WARN - com.intellij.util.xmlb.Binding - no accessors for com.intellij.bigdatatools.visualization.charts.style.ChartsConfig
2022-10-26 14:22:00,653 [ 2747] ERROR - llij.ide.plugins.PluginManager - java.net.BindException: Address already in use: bind
java.util.concurrent.CompletionException: java.net.BindException: Address already in use: bind
at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:314)
at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:319)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1702)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1692)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
Caused by: java.net.BindException: Address already in use: bind
- 分析原因,为端口被占用,hypervisior(Windows 10的Hyper-V虚拟机),把端口保留了
IDEA需要在端口6942~6991间找到一个可用端口并绑定(bind)。
解决办法
方法一
重启电脑,因为电脑启动时会随机占用端口,所以重启即可解决问题,但是也有一定的几率不能解决问题,如不常使用虚拟机,可参考方法二
方法二
打开控制面板,找到程序功能,关闭虚拟机,重启电脑问题解决
参考链接:https://blog.csdn.net/chenxizhan1995/article/details/117328731