• java.io.IOException: Unable to establish loopback connection


    1、错误描述

    Starting preview server on port 8080
    
    Modules:
      HTML5 (/HTML5)
    
    2017-06-17 11:13:04.823:INFO::main: Logging initialized @524ms
    2017-06-17 11:13:05.017:INFO:oejs.Server:main: jetty-9.3.9.v20160517
    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 java.nio.channels.Selector.open(Selector.java:227)
    	at org.eclipse.jetty.io.ManagedSelector.newSelector(ManagedSelector.java:96)
    	at org.eclipse.jetty.io.ManagedSelector.doStart(ManagedSelector.java:90)
    	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
    	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
    	at org.eclipse.jetty.io.SelectorManager.doStart(SelectorManager.java:273)
    	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
    	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:106)
    	at org.eclipse.jetty.server.AbstractConnector.doStart(AbstractConnector.java:260)
    	at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:81)
    	at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:235)
    	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    	at org.eclipse.jetty.server.Server.doStart(Server.java:390)
    	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    	at org.eclipse.wst.server.preview.internal.PreviewStarter.run(PreviewStarter.java:72)
    	at org.eclipse.wst.server.preview.internal.PreviewStarter.main(PreviewStarter.java:29)
    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)
    	... 25 more
    

    2、错误原因

          eclipse配置运行服务器时,使用的是HTTP Preview,但是由于本地防火墙的原因,导致报错


    3、解决办法

    (1)关闭本地防火墙

  • 相关阅读:
    别人的代码
    ZOJ 1914 Arctic Network
    今日所得 2.22
    poj 2031 Building a Space Station
    POJ 1251 Jungle Roads
    优秀的开发者 vs. 糟糕的开发者
    有关读书求知的一些想法
    开发者拒绝写技术博客的常见理由
    写代码如坐禅:你是哪一类程序员?
    [C++] c++ new() 与new[]的区别
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13313853.html
Copyright © 2020-2023  润新知