IDEA 运行报错 failed to create a child event loop

背景

在IDEA中写了测试代码,但是运行的时候一直提示 java.lang.IllegalStateException: failed to create a child event loop ...
eclipse中同样的代码运行没有问题,于是搜索了一些关于这个错误的解决方法,基本上说是防火墙引起的,需要在防火墙允许应用运行中添加例外应用,添加IDEA即可。
但是,尝试了以后,还是不行......

Error:Abnormal build process termination:
C:\Condition\jdk1.8.0_171\bin\java -Xmx700m -Djava.awt.headless=true -Djava.endorsed.dirs=\"\" -Djdt.compiler.useSingleThread=true -Dpreload.project.path=G:/WS-Idea/freemarker-word -Dpreload.config.path=C:/Users/love2/.IntelliJIdea2017.2/config/options -Dcompile.parallel=false -Drebuild.on.dependency.change=true -Djava.net.preferIPv4Stack=true -Dio.netty.initialSeedUniquifier=599254584395996903 -Dfile.encoding=GBK -Djps.file.types.component.name=FileTypeManager -Duser.language=zh -Duser.country=CN -Didea.paths.selector=IntelliJIdea2017.2 "-Didea.home.path=C:\SoftWare\IntelliJ IDEA 2017.2" -Didea.config.path=C:\Users\love2\.IntelliJIdea2017.2\config -Didea.plugins.path=C:\Users\love2\.IntelliJIdea2017.2\config\plugins -Djps.log.dir=C:/Users/love2/.IntelliJIdea2017.2/system/log/build-log "-Djps.fallback.jdk.home=C:/SoftWare/IntelliJ IDEA 2017.2/jre64" -Djps.fallback.jdk.version=1.8.0_152-release -Dio.netty.noUnsafe=true -Djava.io.tmpdir=C:/Users/love2/.IntelliJIdea2017.2/system/compile-server/freemarker-word_2c2f109d/_temp_ -Djps.backward.ref.index.builder=true -Dkotlin.incremental.compilation.experimental=true -Dkotlin.daemon.enabled -Dkotlin.daemon.client.alive.path=\"C:\Users\love2\AppData\Local\Temp\kotlin-idea-7326061649601543174-is-running\" -classpath "C:/SoftWare/IntelliJ IDEA 2017.2/lib/jps-launcher.jar;C:/Condition/jdk1.8.0_171/lib/tools.jar;C:/SoftWare/IntelliJ IDEA 2017.2/lib/optimizedFileManager.jar" org.jetbrains.jps.cmdline.Launcher "C:/SoftWare/IntelliJ IDEA 2017.2/lib/asm-all.jar;C:/SoftWare/IntelliJ IDEA 2017.2/lib/jgoodies-forms.jar;C:/SoftWare/IntelliJ IDEA 2017.2/lib/forms_rt.jar;C:/SoftWare/IntelliJ IDEA 2017.2/lib/javac2.jar;C:/SoftWare/IntelliJ IDEA 2017.2/lib/jdom.jar;C:/SoftWare/IntelliJ IDEA 2017.2/lib/maven-aether-provider-3.3.9-all.jar;C:/SoftWare/IntelliJ IDEA 2017.2/lib/jps-builders-6.jar;C:/SoftWare/IntelliJ IDEA 2017.2/lib/protobuf-2.5.0.jar;C:/SoftWare/IntelliJ IDEA 2017.2/lib/aether-1.1.0-all.jar;C:/SoftWare/IntelliJ IDEA 2017.2/lib/httpcore-4.4.5.jar;C:/SoftWare/IntelliJ IDEA 2017.2/lib/aether-dependency-resolver.jar;C:/SoftWare/IntelliJ IDEA 2017.2/lib/nanoxml-2.2.3.jar;C:/SoftWare/IntelliJ IDEA 2017.2/lib/jps-builders.jar;C:/SoftWare/IntelliJ IDEA 2017.2/lib/annotations.jar;C:/SoftWare/IntelliJ IDEA 2017.2/lib/snappy-in-java-0.5.1.jar;C:/SoftWare/IntelliJ IDEA 2017.2/lib/jps-model.jar;C:/SoftWare/IntelliJ IDEA 2017.2/lib/oromatcher.jar;C:/SoftWare/IntelliJ IDEA 2017.2/lib/commons-codec-1.9.jar;C:/SoftWare/IntelliJ IDEA 2017.2/lib/slf4j-api-1.7.10.jar;C:/SoftWare/IntelliJ IDEA 2017.2/lib/jna.jar;C:/SoftWare/IntelliJ IDEA 2017.2/lib/resources_en.jar;C:/SoftWare/IntelliJ IDEA 2017.2/lib/commons-logging-1.2.jar;C:/SoftWare/IntelliJ IDEA 2017.2/lib/openapi.jar;C:/SoftWare/IntelliJ IDEA 2017.2/lib/httpclient-4.5.2.jar;C:/SoftWare/IntelliJ IDEA 2017.2/lib/jna-platform.jar;C:/SoftWare/IntelliJ IDEA 2017.2/lib/netty-all-4.1.10.Final.jar;C:/SoftWare/IntelliJ IDEA 2017.2/lib/util.jar;C:/SoftWare/IntelliJ IDEA 2017.2/lib/idea_rt.jar;C:/SoftWare/IntelliJ IDEA 2017.2/lib/log4j.jar;C:/SoftWare/IntelliJ IDEA 2017.2/lib/trove4j.jar;;C:/SoftWare/IntelliJ IDEA 2017.2/lib/gson-2.5.jar;C:/SoftWare/IntelliJ IDEA 2017.2/plugins/android/lib/jarutils.jar;C:/SoftWare/IntelliJ IDEA 2017.2/lib/guava-21.0.jar;C:/SoftWare/IntelliJ IDEA 2017.2/plugins/android/lib/android-common.jar;C:/SoftWare/IntelliJ IDEA 2017.2/plugins/gradle/lib/gradle-tooling-api-3.5.jar;C:/SoftWare/IntelliJ IDEA 2017.2/lib/gson-2.5.jar;C:/SoftWare/IntelliJ IDEA 2017.2/plugins/android/lib/jarutils.jar;C:/SoftWare/IntelliJ IDEA 2017.2/lib/guava-21.0.jar;C:/SoftWare/IntelliJ IDEA 2017.2/plugins/android/lib/android-common.jar;C:/SoftWare/IntelliJ IDEA 2017.2/plugins/gradle/lib/gradle-tooling-api-3.5.jar;C:/SoftWare/IntelliJ IDEA 2017.2/plugins/ant/lib/ant-jps-plugin.jar;C:/SoftWare/IntelliJ IDEA 2017.2/plugins/devkit/lib/devkit-jps-plugin.jar;C:/SoftWare/IntelliJ IDEA 2017.2/plugins/uiDesigner/lib/jps/ui-designer-jps-plugin.jar;C:/SoftWare/IntelliJ IDEA 2017.2/plugins/IntelliLang/lib/intellilang-jps-plugin.jar;C:/SoftWare/IntelliJ IDEA 2017.2/plugins/Groovy/lib/groovy-jps-plugin.jar;C:/SoftWare/IntelliJ IDEA 2017.2/plugins/Groovy/lib/groovy-rt-constants.jar;C:/SoftWare/IntelliJ IDEA 2017.2/plugins/eclipse/lib/eclipse-jps-plugin.jar;C:/SoftWare/IntelliJ IDEA 2017.2/plugins/eclipse/lib/common-eclipse-util.jar;C:/SoftWare/IntelliJ IDEA 2017.2/plugins/maven/lib/maven-jps-plugin.jar;C:/SoftWare/IntelliJ IDEA 2017.2/plugins/maven/lib/plexus-utils-2.0.6.jar;C:/SoftWare/IntelliJ IDEA 2017.2/plugins/osmorc/lib/osmorc-jps-plugin.jar;C:/SoftWare/IntelliJ IDEA 2017.2/plugins/osmorc/lib/bndlib-3.3.0.jar;C:/SoftWare/IntelliJ IDEA 2017.2/plugins/osmorc/lib/bnd-repository-3.3.0.jar;C:/SoftWare/IntelliJ IDEA 2017.2/plugins/osmorc/lib/bnd-resolve-3.3.0.jar;C:/SoftWare/IntelliJ IDEA 2017.2/plugins/osmorc/lib/plexus-utils-3.0.10.jar;C:/SoftWare/IntelliJ IDEA 2017.2/plugins/osmorc/lib/bundlor-all.jar;C:/SoftWare/IntelliJ IDEA 2017.2/plugins/aspectj/lib/aspectj-jps-plugin.jar;C:/SoftWare/IntelliJ IDEA 2017.2/plugins/flex/lib/flex-jps-plugin.jar;C:/SoftWare/IntelliJ IDEA 2017.2/plugins/flex/lib/flex-shared.jar;C:/SoftWare/IntelliJ IDEA 2017.2/plugins/gradle/lib/gradle-jps-plugin.jar;C:/SoftWare/IntelliJ IDEA 2017.2/plugins/JavaEE/lib/javaee-jps-plugin.jar;C:/SoftWare/IntelliJ IDEA 2017.2/plugins/JavaEE/lib/jps/jpa-jps-plugin.jar;C:/SoftWare/IntelliJ IDEA 2017.2/plugins/webSphereIntegration/lib/jps/webSphere-jps-plugin.jar;C:/SoftWare/IntelliJ IDEA 2017.2/plugins/weblogicIntegration/lib/jps/weblogic-jps-plugin.jar;C:/SoftWare/IntelliJ IDEA 2017.2/plugins/dmServer/lib/dmServer-jps-plugin.jar;C:/SoftWare/IntelliJ IDEA 2017.2/plugins/GwtStudio/lib/gwt-jps-plugin.jar;C:/SoftWare/IntelliJ IDEA 2017.2/plugins/GoogleAppEngine/lib/google-app-engine-jps-plugin.jar;C:/SoftWare/IntelliJ IDEA 2017.2/plugins/GoogleAppEngine/lib/appEngine-runtime.jar;C:/SoftWare/IntelliJ IDEA 2017.2/plugins/Grails/lib/grails-jps-plugin.jar;C:/SoftWare/IntelliJ IDEA 2017.2/plugins/Grails/lib/grails-compiler-patch.jar;C:/SoftWare/IntelliJ IDEA 2017.2/plugins/android/lib/jps/android-jps-plugin.jar;C:/SoftWare/IntelliJ IDEA 2017.2/plugins/android/lib/jps/android-gradle-jps.jar;C:/SoftWare/IntelliJ IDEA 2017.2/plugins/android/lib/android-common.jar;C:/SoftWare/IntelliJ IDEA 2017.2/plugins/android/lib/android-rt.jar;C:/SoftWare/IntelliJ IDEA 2017.2/plugins/android/lib/sdk-common.jar;C:/SoftWare/IntelliJ IDEA 2017.2/plugins/android/lib/repository.jar;C:/SoftWare/IntelliJ IDEA 2017.2/plugins/android/lib/sdklib.jar;C:/SoftWare/IntelliJ IDEA 2017.2/plugins/android/lib/jarutils.jar;C:/SoftWare/IntelliJ IDEA 2017.2/plugins/android/lib/layoutlib-api.jar;C:/SoftWare/IntelliJ IDEA 2017.2/plugins/android/lib/manifest-merger.jar;C:/SoftWare/IntelliJ IDEA 2017.2/plugins/Kotlin/lib/jps/kotlin-jps-plugin.jar;C:/SoftWare/IntelliJ IDEA 2017.2/plugins/Kotlin/lib/kotlin-runtime.jar;C:/SoftWare/IntelliJ IDEA 2017.2/plugins/Kotlin/lib/kotlin-reflect.jar;C:/SoftWare/IntelliJ IDEA 2017.2/plugins/Kotlin/lib/kotlin-plugin.jar;C:/SoftWare/IntelliJ IDEA 2017.2/plugins/Kotlin/lib/android-extensions-ide.jar;C:/SoftWare/IntelliJ IDEA 2017.2/plugins/Kotlin/lib/android-extensions-compiler.jar;C:/SoftWare/IntelliJ IDEA 2017.2/plugins/javaFX/lib/javaFX-jps-plugin.jar;C:/SoftWare/IntelliJ IDEA 2017.2/plugins/javaFX/lib/common-javaFX-plugin.jar" org.jetbrains.jps.cmdline.BuildMain 127.0.0.1 58948 c9773f86-c496-4840-9a36-cf9f6f36178d C:/Users/love2/.IntelliJIdea2017.2/system/compile-server
Build process started. Classpath: C:/SoftWare/IntelliJ IDEA 2017.2/lib/jps-launcher.jar;C:/Condition/jdk1.8.0_171/lib/tools.jar;C:/SoftWare/IntelliJ IDEA 2017.2/lib/optimizedFileManager.jarSLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Error connecting to 127.0.0.1:58948; reason: failed to create a child event loop
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:58)
    at io.netty.channel.MultithreadEventLoopGroup.<init>(MultithreadEventLoopGroup.java:52)
    at io.netty.channel.nio.NioEventLoopGroup.<init>(NioEventLoopGroup.java:87)
    at io.netty.channel.nio.NioEventLoopGroup.<init>(NioEventLoopGroup.java:82)
    at io.netty.channel.nio.NioEventLoopGroup.<init>(NioEventLoopGroup.java:63)
    at org.jetbrains.jps.cmdline.BuildMain.main(BuildMain.java:88)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.jetbrains.jps.cmdline.Launcher.main(Launcher.java:59)
Caused by: io.netty.channel.ChannelException: failed to open a new selector
    at io.netty.channel.nio.NioEventLoop.openSelector(NioEventLoop.java:175)
    at io.netty.channel.nio.NioEventLoop.<init>(NioEventLoop.java:149)
    at io.netty.channel.nio.NioEventLoopGroup.newChild(NioEventLoopGroup.java:127)
    at io.netty.channel.nio.NioEventLoopGroup.newChild(NioEventLoopGroup.java:36)
    at io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>(MultithreadEventExecutorGroup.java:84)
    ... 11 more
Caused by: java.io.IOException: Unable to establish loopback connection
    at sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:94)
    at sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:61)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.nio.ch.PipeImpl.<init>(PipeImpl.java:171)
    at sun.nio.ch.SelectorProviderImpl.openPipe(SelectorProviderImpl.java:50)
    at java.nio.channels.Pipe.open(Pipe.java:155)
    at sun.nio.ch.WindowsSelectorImpl.<init>(WindowsSelectorImpl.java:127)
    at sun.nio.ch.WindowsSelectorProvider.openSelector(WindowsSelectorProvider.java:44)
    at io.netty.channel.nio.NioEventLoop.openSelector(NioEventLoop.java:173)
    ... 15 more
Caused by: java.net.ConnectException: Connection timed out: connect
    at sun.nio.ch.Net.connect0(Native Method)
    at sun.nio.ch.Net.connect(Net.java:454)
    at sun.nio.ch.Net.connect(Net.java:446)
    at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:648)
    at java.nio.channels.SocketChannel.open(SocketChannel.java:189)
    at sun.nio.ch.PipeImpl$Initializer$LoopbackConnector.run(PipeImpl.java:127)
    at sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:76)
    ... 23 more
Exiting.

解决策略

万般无奈之下,萌生了卸载,重新安装的念头,还好坚持了一下,在Stack overflow 找了一下资料。最终,还是找到了解决办法。刚开始直接强制关闭防火墙,此时IDEA可以正常运行程序。既然这样,就可以确定的确是和防火墙有关!但是也不能一直关闭防火墙呀,所以,还是只能添加IDEA防火墙例外应用。
之前添加例外应用时,位置我指定的是IDEA的安装目录bin中的idea.exe,不起作用。位置指定到开始菜单应用程序IDEA,是可以的。具体原因不知道了......

Stack overflow参考资料链接:https://stackoverflow.com/questions/27506788/failed-to-create-a-child-event-loop

原文地址:https://www.cnblogs.com/lyc-smile/p/10523628.html

时间: 2024-10-11 05:29:28

IDEA 运行报错 failed to create a child event loop的相关文章

InteliJ IDEA 启动应用出现 Error:failed to create a child event loop 解决方案

1.首先检查自己电脑是否能够联网 2.打开电脑防火墙允许 InteliJ IDEA 进行通信如下图所示 原文地址:https://www.cnblogs.com/pythoncd/p/10264542.html

MyEclipse打开 HTML 报错Failed to create the part&#39;s controls

拷贝代码时有时会弹出这个错误,页面仍然可以访问,但是无法编辑很郁闷. MyEclipse默认打开编辑页面是MyEclipse visual html designer 右击html页面选择open with,点击 MyEclipse html Editer即可. MyEclipse打开 HTML 报错Failed to create the part's controls

tomcat运行报错Failed to start component [StandardEngine[Catalina].StandardHost[localhost].

tomcat运行报错Failed to start component [StandardEngine[Catalina].StandardHost[localhost].多半情况是找不到jar包 解决办法: 右键项目-> 属性->添加lib 原文地址:https://www.cnblogs.com/firstdream/p/8401626.html

启动Myeclipse报错“Failed to create the Java Virtual Machine”的解决办法

我安装的是Myeclipse 10.7.1.装上好久没用,今天启动突然报错:Failed to create the Java Virtual Machine. 检查Myeclipse安装好使用时好的啊,近期也没用,可能是近期升级了本地单独安装的jre版本导致的吧(Myeclipse使用自己的jre的). 整理了如下2个解决办法,可以选择一个使用,我选择的是第2个.经测试都ok. 方法一: 找到Myeclpise路径下的myeclipse.ini文件: 编辑将Xmx(JVM Heap最大允许的尺

解决Eclipse启动报错Failed to create the Java Virtual Machine

电脑:2G内存,WIN7 32位. 启动adt-bundle-windows-x86-20140702\eclipse\eclipse.exe时,报错[Failed to create the Java Virtual Machine].点确定后,Eclipse自动关闭 解决方法如下: 修改Eclipse目录下的配置文件[eclipse.iniadt-bundle-windows-x86-20140702\eclipse\eclipse.ini] 将下面两个值改为原来的0.5倍,然后保存,重新启

Eclipse及Eclipse为基础的App报错“Failed to create the Java Virtual Machine”的解决办法

由于OracleJDK马上就要收费了,公司要求更换OpenJDK,结果安装后Eclipse及Eclipse为基础的App启动报错:"Failed to create the Java Virtual Machine" 根据理解和经验此文特地整理了有关修复方法. 方法一:找到eclpise路径下的eclipse.ini文件,编辑将Xmx(JVM Heap最大允许的尺寸)修改为原值一半大小.比如原值为512,则修改为256. 此方法是比较老的方法,也是目前网上流行的方法.一些新的版本可能不

Oracle Rac root.sh报错 Failed to create keys in the OLR, rc = 127 libcap.so.1

环境交待: Linux 6.3 Oracle Rac 11.2.0.4 [[email protected] grid]# /u01/app/11.2.0/grid/root.sh Performing root user operation for Oracle 11g The following environment variables are set as: ORACLE_OWNER= grid ORACLE_HOME=  /u01/app/11.2.0/grid Enter the f

Flutter 工程报错 Failed to create provisioning profile.

Failed to create provisioning profile. There are no devices registered in your account on the developer website. Plug in and select a device to have Xcode register it. 在网上找了很多解决方法之后,调试了很多设置都不行 最后原来是需要选择你的真机,如果你的xcode没有连接到真机 请重新插拔,然后重新选择你的真机,就能解决这个问题

Simulink 运行时报错failed to create files 的解决方法

机器由于长时间没有重新安装系统,特别卡,就安装了固态硬盘,让老机器也发挥点余热.没有到回到建模工作学习中遇到执行文件错误的问题.经过分析和查找,终于解决. 问题的根本原因是不同的系统.编译器等MATLAB生成中间代码是不一样的,stateflow, matlab function等模块会生成一个临时编译代码放在当前的目录下的slprj文件夹中,文件夹一般情况下是隐藏的.该文件夹为的拒绝新编译的访问引发错误. 解决方法: 删除该文件夹,重新执行运行,问题解决. 另外给出mathworks官方指导W