【问题标题】:Failed to create a child event loop未能创建子事件循环
【发布时间】:2014-12-16 14:22:06
【问题描述】:

在 IntelliJ IDEA Community Edition 14.0.2 中,我尝试运行 Java Applet,每次尝试运行项目时,都会收到此虚拟错误。

Error: Failed to create a child event loop

我尝试过的

  1. 编译新创建的 Hello World 程序
  2. 更新 IntelliJ
  3. 卸载并重新安装
  4. 从 Windows 防火墙规则允许
  5. 禁用防病毒程序

我正在使用Windows 8.1 和防病毒程序Windows Defender

来自日志文件的错误详情:

java.lang.IllegalStateException: failed to create a child event loop
    at io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>(MultithreadEventExecutorGroup.java:81)
    at io.netty.channel.MultithreadEventLoopGroup.<init>(MultithreadEventLoopGroup.java:50)
    at io.netty.channel.nio.NioEventLoopGroup.<init>(NioEventLoopGroup.java:72)
    at io.netty.channel.nio.NioEventLoopGroup.<init>(NioEventLoopGroup.java:58)
    at org.jetbrains.io.BuiltInServer.start(BuiltInServer.java:60)
    at org.jetbrains.ide.BuiltInServerManagerImpl$1.run(BuiltInServerManagerImpl.java:111)
    at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:405)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
    at org.jetbrains.ide.PooledThreadExecutor$1$1.run(PooledThreadExecutor.java:56)
Caused by: io.netty.channel.ChannelException: failed to open a new selector
    at io.netty.channel.nio.NioEventLoop.openSelector(NioEventLoop.java:127)
    at io.netty.channel.nio.NioEventLoop.<init>(NioEventLoop.java:119)
    at io.netty.channel.nio.NioEventLoopGroup.newChild(NioEventLoopGroup.java:97)
    at io.netty.channel.nio.NioEventLoopGroup.newChild(NioEventLoopGroup.java:31)
    at io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>(MultithreadEventExecutorGroup.java:77)
    ... 12 more
Caused by: java.io.IOException: Unable to establish loopback connection
    at sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:101)
    at sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:68)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.nio.ch.PipeImpl.<init>(PipeImpl.java:170)
    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:125)
    ... 16 more
Caused by: java.net.SocketException: Network is unreachable: connect
    at sun.nio.ch.Net.connect0(Native Method)
    at sun.nio.ch.Net.connect(Net.java:457)
    at sun.nio.ch.Net.connect(Net.java:449)
    at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:647)
    at java.nio.channels.SocketChannel.open(SocketChannel.java:189)
    at sun.nio.ch.PipeImpl$Initializer$LoopbackConnector.run(PipeImpl.java:130)
    at sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:83)
    ... 24 more

【问题讨论】:

  • 有时我会收到此错误,只需重新运行它就会消失。有一次,我不得不重新启动我的电脑来摆脱这个错误。我认为这是 intellij 中的一个错误 - Issue Link
  • 我在使用 pycharm 时遇到了类似的错误

标签: intellij-idea


【解决方案1】:

重启intelliJ没有帮助,重启机器有!

【讨论】:

    【解决方案2】:

    禁用防火墙 或将 idea.exe 完整正确路径添加到防火墙的传出连接规则。
    它帮助我使用 IDEA 14.0.3

    【讨论】:

      【解决方案3】:

      当我们将应用程序部署到 Windows 服务器时,我遇到了同样的错误,但是,该服务器没有防病毒软件并且防火墙被禁用。在我们的例子中,这是由于 Astrill VPN,如果我们禁用 Astrill VPN,问题就会消失。

      【讨论】:

        【解决方案4】:

        我的操作系统是Windows,使用Pycharm 2017.3运行scrapy项目遇到了类似的问题。 今天,使用 Intellij Idea 2016.3.5 运行 spring 项目也有同样的问题。 在我的操作系统中,关闭 Windows Defender 可以解决这个问题。

        【讨论】:

          【解决方案5】:

          我们必须关闭防火墙。它解决了这个问题。即使在“eclipse”软件中关闭防火墙也效果很好。

          【讨论】:

            【解决方案6】:

            将 pycharm 更新到较新的版本对我有用,然后重新启动 pycharm ide。

            【讨论】:

              猜你喜欢
              • 2016-03-21
              • 1970-01-01
              • 1970-01-01
              • 1970-01-01
              • 2016-03-31
              • 2010-09-08
              • 1970-01-01
              • 1970-01-01
              • 1970-01-01
              相关资源
              最近更新 更多