java 环回连接失败
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/13698221/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Loopback connection fail
提问by user1874894
I have probably one of the weirdest problems with Java ever. I tried to start some application say Wrapper (i.e. I2P router) and got the following:
我可能遇到了 Java 有史以来最奇怪的问题之一。我尝试启动一些应用程序,比如 Wrapper(即 I2P 路由器)并得到以下结果:
-piece of the router log-
-路由器日志的一部分-
03.12.12 21:07:31 ERROR [JobQueue 1/1] p.router.transport.UPnPManager: UPnP start failed - port conflict?
03.12.12 21:07:31 CRIT [JobQueue 1/1] ter.transport.ntcp.EventPumper: Error opening the NTCP selector
java.io.IOException: Unable to establish loopback connection
Caused by: java.net.SocketException: Permission denied: listen
-piece of the wrapper log-
-一块包装日志-
2012/12/02 14:28:29 | Unable to bind routerconsole to 127.0.0.1 port 7657: java.net.SocketException: Permission denied: listen failed
2012/12/02 14:28:29 | You may ignore this warning if the console is still available at http://localhost:7657
2012/12/02 14:28:30 | WARNING: Error starting SelectChannelConnector@::1:7657: java.io.IOException: Unable to establish loopback connection
2012/12/02 14:28:30 | java.io.IOException: Unable to establish loopback connection
2012/12/02 14:28:30 | WARNING: Error starting one or more listeners of the Router Console server.
2012/12/02 14:36:41 | CRIT [istener:7654] er.client.ClientListenerRunner: I2CP error listening to port 7654 - is another I2P instance running? Resolve conflicts and restart
On the developers forum I was told that it could be possibbly that I hadnt a loopback address at all. Which is unlikely to be. I have other application which work with the loopback address, also I switched off the IPv6, put all the neccessary options to ignore IPv6 in wrapper. Next I tried to start wrapper under the admin aacount, tried to install all the stuff including Java under the admin account - completelly useless.
在开发人员论坛上,我被告知可能根本没有回送地址。这不太可能。我有其他使用环回地址的应用程序,我也关闭了 IPv6,将所有必要的选项放在包装器中忽略 IPv6。接下来,我尝试在 admin aacount 下启动包装器,尝试在 admin 帐户下安装包括 Java 在内的所有东西 - 完全没用。
I didnt find any reasonable answer on any foruma. Always it was about the firewall. But I turned it off, I deinstalled it, switched Windows firewall off under the admin account.
我没有在任何论坛上找到任何合理的答案。总是关于防火墙。但是我把它关掉了,我卸载了它,在管理员帐户下关闭了 Windows 防火墙。
And also I opened all the necessary ports on my wi-fi router. Other programs like Privoxy work well with loopback connection and ports, but if I check online ofcourse I get a message that all my ports blocked, which I consider as to be wrong.
我还打开了 Wi-Fi 路由器上的所有必要端口。Privoxy 等其他程序在环回连接和端口上运行良好,但是如果我在线查看当然我会收到一条消息,我的所有端口都被阻止了,我认为这是错误的。
My operating system is Windows 7 64bit, my wi-fi router is Speedport 723v.
我的操作系统是 Windows 7 64 位,我的 Wi-Fi 路由器是 Speedport 723v。
I thank everybody in advance for answers.
我提前感谢大家的回答。
回答by Evgenij Pashkin
It was the same problem with I2P and jre7u25
I2P 和 jre7u25 也有同样的问题
Fixed editing wrapper.config
by adding -Djava.net.preferIPv4Stack=true
to jawa paramenters:
wrapper.config
通过添加-Djava.net.preferIPv4Stack=true
到 jawa 参数来修复编辑:
wrapper.java.additional.5=-Di2p.dir.config="C:\ProgramData\Application Data\i2p" -Djava.net.preferIPv4Stack=true
回答by Isaac
2012/12/02 14:28:29 | Unable to bind routerconsole to 127.0.0.1 port 7657: java.net.SocketException: Permission denied: listen failed
2012/12/02 14:28:29 | You may ignore this warning if the console is still available at http://localhost:7657
The problem is not that you don't have a loopback address. You have it, but your Java process is not allowed to create a socket connection. You get a Permission denied
exception, which means that your policy file doesn't allow your class to bind a socket to local port 7657.
问题不在于您没有环回地址。您拥有它,但是您的 Java 进程不允许创建套接字连接。您收到一个Permission denied
异常,这意味着您的策略文件不允许您的类将套接字绑定到本地端口 7657。
Did you try looking at your JRE's policy file?
您是否尝试查看 JRE 的策略文件?
Try running your program (or wrapper; not sure exactly whatyou're running...) with the java.security.debug
system property: http://docs.oracle.com/javase/1.5.0/docs/guide/plugin/developer_guide/debugger.html#jsdp
尝试使用系统属性运行您的程序(或包装器;不确定您正在运行什么......)java.security.debug
:http: //docs.oracle.com/javase/1.5.0/docs/guide/plugin/developer_guide/debugger .html#jsdp
回答by user1874894
Ok, I think a t least the step with establishing a loopback connection resolved.
好的,我认为至少解决了建立环回连接的步骤。
I guess this could be useful for further users who would like to suppot I2P project.
我想这对于想要支持 I2P 项目的更多用户可能很有用。
So, I downgraded JDK to 1.6, reinstalled everything and deleted completelly every entry of the firewall software (in my case Agnitum).
因此,我将 JDK 降级到 1.6,重新安装了所有内容并完全删除了防火墙软件的每个条目(在我的情况下为 Agnitum)。
After that the console was able to start.
之后,控制台就可以启动了。
回答by ajay datla
In windows, try restarting the pc, it worked for me. This error occurs when the application is trying to connect to a remote database and internet connection is lost (this is one of the reason).
在windows 中,尝试重新启动电脑,它对我有用。当应用程序尝试连接到远程数据库并且 Internet 连接丢失时会发生此错误(这是原因之一)。