sportarup / ratproxy

Automatically exported from code.google.com/p/ratproxy
0 stars 0 forks source link

cannot bind to port [listen_loop(), ratproxy.c:1609] #1

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Compile on Mac OS X 10.4.11
2. Run ratproxy with $ ./ratproxy -v testout -w testoutfile -d
"http://www.domain.com" -lfscm
3. See error

What is the expected output? What do you see instead?

Should have run, instead showed the following error:
ratproxy version 1.50-beta by <lcamtuf@google.com>
SYSTEM ERROR : cannot bind to port [listen_loop(), ratproxy.c:1609]
     Message : Can't assign requested address

What version of the product are you using? On what operating system?
Mac OS X 10.4.11

Original issue reported on code.google.com by raccettu on 2 Jul 2008 at 1:17

GoogleCodeExporter commented 8 years ago
Issue is the same on 10.5.4 OSX

Original comment by doetr...@gmail.com on 2 Jul 2008 at 4:25

GoogleCodeExporter commented 8 years ago
A temporary workaround is to use the -r option. This will expose ratproxy to 
external
systems, so just be careful. 

Original comment by d.lifeha...@gmail.com on 2 Jul 2008 at 10:51

GoogleCodeExporter commented 8 years ago
This is an unusual behavior; do you have loopback interface up on the machine, 
and
configured to use 127.0.0.1?

If not, this is a system configuration error; try executing 'ifconfig lo 
127.0.0.1
netmask 255.0.0.0 up' as root.

Original comment by lcam...@gmail.com on 3 Jul 2008 at 4:37

GoogleCodeExporter commented 8 years ago
Yep, lo0 is configured and working, nothing else is listening, tried with a 
variety of ports.

lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
    inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 
    inet 127.0.0.1 netmask 0xff000000 
    inet6 ::1 prefixlen 128 
    inet6 fd39:ae47:d465:4a13:other:crap:from:v6 prefixlen 128 

Original comment by doetr...@gmail.com on 3 Jul 2008 at 5:57

GoogleCodeExporter commented 8 years ago
[Also, you almost certainly do not want to -d http://site.com; -d site.com is 
the
correct syntax]

Original comment by lcam...@gmail.com on 3 Jul 2008 at 5:57

GoogleCodeExporter commented 8 years ago
Ok, got it, I think. Can you try making the following change to ratproxy.c, 
around
line 1589:

  struct sockaddr_in saddr;

...to:

  static struct sockaddr_in saddr;

...and recompiling (make clean all)?

(According to some reports I managed to dig up, MacOS X may not always ignore
sin_zero data on INADDR_LOOPBACK bind attempts, so this is my best guess).

Original comment by lcam...@gmail.com on 3 Jul 2008 at 6:06

GoogleCodeExporter commented 8 years ago
That did it, confirmed, working on 10.5.4 - thanks!

Original comment by doetr...@gmail.com on 3 Jul 2008 at 6:18

GoogleCodeExporter commented 8 years ago
Cool, I'm gonna prepare a new tarball shortly.

Original comment by lcam...@gmail.com on 3 Jul 2008 at 6:22

GoogleCodeExporter commented 8 years ago
This should be fixed in 1.51 beta, now up.

Original comment by lcam...@gmail.com on 3 Jul 2008 at 6:32

GoogleCodeExporter commented 8 years ago
That worked for me as well on 10.4.11

Original comment by raccettu on 3 Jul 2008 at 12:37

GoogleCodeExporter commented 8 years ago
[test@nfap-fc6 ratproxy]$ ratproxy -w ratproxy.log -v 
/home/test/proxy/ratproxy/ -d 
"http://bvijayanand:8080" -xtifkgmjscael2XCr
ratproxy version 1.51-beta by <lcamtuf@google.com>
SYSTEM ERROR : cannot bind to port [listen_loop(), ratproxy.c:1609]
     Message : Address already in use

What can be done ? stuck up with this ?

am using FEDORA, ratproxy build  ratproxy-1.51.tar.gz

Original comment by vijayana...@gmail.com on 11 May 2010 at 11:13

GoogleCodeExporter commented 8 years ago
Encountering this in version 1.56-beta. I'm using Fedora 19

[root@localhost ratproxy]# ratproxy -w ratproxy.log -v /usr/local/ratproxy/ -d 
englishcentral.com
ratproxy version 1.56-beta by <lcamtuf@google.com>
SYSTEM ERROR : cannot bind to port [listen_loop(), ratproxy.c:1618]
     Message : Address already in use

Original comment by m...@englishcentral.com on 5 Feb 2015 at 9:03