打开IDEA报错及解决方案

报错内容

Internal error. Please refer to https://jb.gg/ide/critical-startup-errors

com.intellij.ide.plugins.StartupAbortedException: Cannot start app
    at com.intellij.idea.StartupUtil.lambda$start$15(StartupUtil.java:263)
    at java.base/java.util.concurrent.CompletableFuture.uniExceptionally(CompletableFuture.java:986)
    at java.base/java.util.concurrent.CompletableFuture$UniExceptionally.tryFire(CompletableFuture.java:970)
    at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506)
    at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1705)
    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.lang.IllegalStateException: failed to create a child event loop
    at io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>(MultithreadEventExecutorGroup.java:88)
    at io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>(MultithreadEventExecutorGroup.java:60)
    at io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>(MultithreadEventExecutorGroup.java:49)
    at io.netty.channel.MultithreadEventLoopGroup.<init>(MultithreadEventLoopGroup.java:59)
    at io.netty.channel.nio.NioEventLoopGroup.<init>(NioEventLoopGroup.java:87)
    at io.netty.channel.nio.NioEventLoopGroup.<init>(NioEventLoopGroup.java:82)
    at org.jetbrains.io.BuiltInServerKt.multiThreadEventLoopGroup(BuiltInServer.kt:158)
    at org.jetbrains.io.BuiltInServerKt.access$multiThreadEventLoopGroup(BuiltInServer.kt:1)
    at org.jetbrains.io.BuiltInServer$Companion.start(BuiltInServer.kt:58)
    at com.intellij.idea.SocketLock.lambda$lockAndTryActivate$2(SocketLock.java:150)
    at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
    ... 6 more
Caused by: io.netty.channel.ChannelException: failed to open a new selector
    at io.netty.channel.nio.NioEventLoop.openSelector(NioEventLoop.java:178)
    at io.netty.channel.nio.NioEventLoop.<init>(NioEventLoop.java:145)
    at io.netty.channel.nio.NioEventLoopGroup.newChild(NioEventLoopGroup.java:183)
    at io.netty.channel.nio.NioEventLoopGroup.newChild(NioEventLoopGroup.java:38)
    at io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>(MultithreadEventExecutorGroup.java:84)
    ... 16 more
Caused by: java.io.IOException: Unable to establish loopback connection
    at java.base/sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:94)
    at java.base/sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:61)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/sun.nio.ch.PipeImpl.<init>(PipeImpl.java:171)
    at java.base/sun.nio.ch.SelectorProviderImpl.openPipe(SelectorProviderImpl.java:50)
    at java.base/java.nio.channels.Pipe.open(Pipe.java:155)
    at java.base/sun.nio.ch.WindowsSelectorImpl.<init>(WindowsSelectorImpl.java:142)
    at java.base/sun.nio.ch.WindowsSelectorProvider.openSelector(WindowsSelectorProvider.java:44)
    at io.netty.channel.nio.NioEventLoop.openSelector(NioEventLoop.java:176)
    ... 20 more
Caused by: java.net.ConnectException: Connection refused: connect
    at java.base/sun.nio.ch.Net.connect0(Native Method)
    at java.base/sun.nio.ch.Net.connect(Net.java:483)
    at java.base/sun.nio.ch.Net.connect(Net.java:472)
    at java.base/sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:692)
    at java.base/java.nio.channels.SocketChannel.open(SocketChannel.java:194)
    at java.base/sun.nio.ch.PipeImpl$Initializer$LoopbackConnector.run(PipeImpl.java:127)
    at java.base/sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:76)
    ... 28 more

-----
Your JRE: 11.0.14.1+1-b2043.45 amd64 (JetBrains s.r.o.)
C:\Program Files\JetBrains\IntelliJ IDEA 2022.1.1\jbr

解决

参考jetbrain社区给出的方案
https://youtrack.jetbrains.com/issue/IDEA-238995
加上 -Djava.net.preferIPv4Stack=true

还是没用,打算下载个旧点的版本看看
https://www.jetbrains.com/idea/download/other.html

旧版的没有这种问题,估计是win10更新后,导致的IDEA的bug

你可能感兴趣的:(技术杂谈,intellij-idea,java,maven)