2013-04-29 107 views
2

我正在運行一個Java socket.io服務器(com.corundumstudio.socketio實現),它用於工作正常,但現在,剛啓動後( )的服務器,我得到這個錯誤信息:無法創建選擇器/無法建立環回連接/連接超時

Exception in thread "main" org.jboss.netty.channel.ChannelException: Failed to c 
reate a selector. 
     at org.jboss.netty.channel.socket.nio.AbstractNioSelector.openSelector(A 
bstractNioSelector.java:338) 
     at org.jboss.netty.channel.socket.nio.AbstractNioSelector.<init>(Abstrac 
tNioSelector.java:96) 
     at org.jboss.netty.channel.socket.nio.AbstractNioWorker.<init>(AbstractN 
ioWorker.java:51) 
     at org.jboss.netty.channel.socket.nio.NioWorker.<init>(NioWorker.java:45 
) 
     at org.jboss.netty.channel.socket.nio.NioWorkerPool.createWorker(NioWork 
erPool.java:45) 
     at org.jboss.netty.channel.socket.nio.NioWorkerPool.createWorker(NioWork 
erPool.java:28) 
     at org.jboss.netty.channel.socket.nio.AbstractNioWorkerPool.newWorker(Ab 
stractNioWorkerPool.java:99) 
     at org.jboss.netty.channel.socket.nio.AbstractNioWorkerPool.init(Abstrac 
tNioWorkerPool.java:69) 
     at org.jboss.netty.channel.socket.nio.NioWorkerPool.<init>(NioWorkerPool 
.java:39) 
     at org.jboss.netty.channel.socket.nio.NioWorkerPool.<init>(NioWorkerPool 
.java:33) 
     at org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory.<ini 
t>(NioServerSocketChannelFactory.java:149) 
     at org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory.<ini 
t>(NioServerSocketChannelFactory.java:131) 
     at org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory.<ini 
t>(NioServerSocketChannelFactory.java:115) 
     at com.corundumstudio.socketio.SocketIOServer.start(SocketIOServer.java: 
76) 
     at biu_nlp_net.CommonSocketIOServer.start(CommonSocketIOServer.java:67) 
     at biu_nlp_net.LexicalEntailmentServer.main(LexicalEntailmentServer.java 
:188) 
**Caused by: java.io.IOException: Unable to establish loopback connection** 
     at sun.nio.ch.PipeImpl$Initializer.run(Unknown Source) 
     at sun.nio.ch.PipeImpl$Initializer.run(Unknown Source) 
     at java.security.AccessController.doPrivileged(Native Method) 
     at sun.nio.ch.PipeImpl.<init>(Unknown Source) 
     at sun.nio.ch.SelectorProviderImpl.openPipe(Unknown Source) 
     at java.nio.channels.Pipe.open(Unknown Source) 
     at sun.nio.ch.WindowsSelectorImpl.<init>(Unknown Source) 
     at sun.nio.ch.WindowsSelectorProvider.openSelector(Unknown Source) 
     at java.nio.channels.Selector.open(Unknown Source) 
     at org.jboss.netty.channel.socket.nio.AbstractNioSelector.openSelector(A 
bstractNioSelector.java:336) 
     ... 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(Unknown Source) 
     at sun.nio.ch.Net.connect(Unknown Source) 
     at sun.nio.ch.SocketChannelImpl.connect(Unknown Source) 
     at java.nio.channels.SocketChannel.open(Unknown Source) 
     ... 25 more 

我用Java 7的Windows 2003上

+2

這個問題幫助我解決了我的同樣的問題。我確定存在與我的VPN相關的網絡配置問題。重新啓動窗口也解決了我的問題。 – Jpnh 2014-11-13 22:10:44

+0

@Jpnh很高興看到即使是「過於本地化」的問題仍然可以幫助未來的訪問者... – 2014-11-14 06:27:34

回答

0

重新啓動Windows機器後問題解決。可能是一個累了的服務器...

0

這可能是因爲防火牆問題運行這個......你需要詳細檢查這裏。

+0

我不這麼認爲,因爲有時它確實工作。 – 2013-05-01 04:53:16

+1

絕對不是。選擇器不使用任何網絡資源,除了在我認爲127.0.0.2上創建的本地套接字。與任何防火牆無關。 – EJP 2013-05-02 10:45:00

相關問題