背景

在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

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

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

    1.首先检查自己电脑是否能够联网 2.打开电脑防火墙允许 InteliJ IDEA 进行通信如下图所示

  2. windows安装anaconda 报错failed to create anacoda menu ?

    windows安装anaconda 报错failed to create anacoda menu ? 装了无数次,每次都是 failed to create anacoda menu然后无选择忽略, ...

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

    tomcat运行报错Failed to start component [StandardEngine[Catalina].StandardHost[localhost].多半情况是找不到jar包 解 ...

  4. 【Python】pyinstaller打包运行报错failed to execute script main

    前言 最近用pyinstaller打包的时候一直报"failed to execute script main". 最终使用"pyinstaller --hidden-i ...

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

    电脑:2G内存,WIN7 32位. 启动adt-bundle-windows-x86-20140702\eclipse\eclipse.exe时,报错[Failed to create the Jav ...

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

    由于OracleJDK马上就要收费了,公司要求更换OpenJDK,结果安装后Eclipse及Eclipse为基础的App启动报错:“Failed to create the Java Virtual ...

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

    我安装的是Myeclipse 10.7.1.装上好久没用,今天启动突然报错:Failed to create the Java Virtual Machine. 检查Myeclipse安装好使用时好的 ...

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

    我安装的是Myeclipse 10.7.1.装上好久没用,今天启动突然报错:Failed to create the Java Virtual Machine. 检查Myeclipse安装好使用时好的 ...

  9. MyEclipse打不开jsp文件 报错“Failed to create the part's controls"

    本来写好了一套网站html代码,需要移植到myeclipse的jsp页面中,当复制代码完毕后,也是可以运行的并不报错,但一直有弹框提示有空指针,当关闭页面后再次打开就歇菜了,提示 我预感到这可能是my ...

随机推荐

  1. linux服务器nginx的卸载和安装

    刚接触的linux服务器上,nginx配置乱的有点令人发指,就把老的卸载了重新装一下. 卸载 linux有一系列的软件管理器,比如常见的linux下的yum.Ubuntu下的apt-get等等.通过这 ...

  2. poj3718 Facer's Chocolate Dream

    题目链接 正解:组合数+$dp$. 今天考试的题,考试的时候感觉自己有点脑残过头了.. 似乎发现了所有$1$其实都是一样的,然后不知道怎么强制每种物品只选一个.. 然后就写了一个所有物品可以选任意个的 ...

  3. linux mint gcc 编译第一个c程序

    GCC是Linux操作系统下一个非常重要的源代码编译工具,有着许多重要的选项,支持许多不同语言的编译,如C.C++.Ada. Fortran.Objective.Perl.Python.Ruby以及J ...

  4. 5、Web Service-整合CXF

    1.工程准备 继续使用之前的服务端:https://www.cnblogs.com/Mrchengs/p/10562458.html 2.jar准备 前去apache官网下载响应的jar:http:/ ...

  5. HTML5本地存储(Local Storage) 的前世今生

    长久以来本地存储能力一直是桌面应用区别于Web应用的一个主要优势.对于桌面应用(或者原生应用),操作系统一般都提供了一个抽象层用来帮助应用程序保存其本地数据 例如(用户配置信息或者运行时状态等). 常 ...

  6. [Python 多线程] Timer定时器/延迟执行、Event事件 (七)

    Timer继承子Thread类,是Thread的子类,也是线程类,具有线程的能力和特征.这个类用来定义多久执行一个函数. 它的实例是能够延迟执行目标函数的线程,在真正执行目标函数之前,都可以cance ...

  7. 401. Binary Watch 回溯

    A binary watch has 4 LEDs on the top which represent the hours (0-11), and the 6 LEDs on the bottom ...

  8. springboot项目用gradle打jar包

    C:\1_work_files\workspace_sts\HR\psn\build\libs

  9. ORACLE NLS_LENGTH_SEMANTICS 参数的用途

    NLS_LENGTH_SEMANTICS参数是一个专为创建CHAR和VARCHAR2两种字符型的列时,指定使用的字节长度,还是使用字符长度的定义方式,有byte和char两种值,默认为byte. 当设 ...

  10. PAT——1024. 科学计数法

    科学计数法是科学家用来表示很大或很小的数字的一种方便的方法,其满足正则表达式[+-][1-9]"."[0-9]+E[+-][0-9]+,即数字的整数部分只有1位,小数部分至少有1位 ...