Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Loopback connection fail

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:

-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.

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.

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.

My operating system is Windows 7 64bit, my wi-fi router is Speedport 723v.

I thank everybody in advance for answers.

like image 266
user1874894 Avatar asked Dec 04 '12 07:12

user1874894


2 Answers

It was the same problem with I2P and jre7u25

Fixed editing wrapper.config by adding -Djava.net.preferIPv4Stack=true to jawa paramenters:

wrapper.java.additional.5=-Di2p.dir.config="C:\ProgramData\Application Data\i2p" -Djava.net.preferIPv4Stack=true
like image 141
Evgenij Pashkin Avatar answered Sep 24 '22 08:09

Evgenij Pashkin


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.

Did you try looking at your JRE's policy file?

Try running your program (or wrapper; not sure exactly what you'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

like image 42
Isaac Avatar answered Sep 23 '22 08:09

Isaac