On Sat, 11 Dec 1999, Volker Wiegand wrote:
Hi,
When the data port for connections to the server is specified as 41000 - 41999, there will always be a data connection between realserver:20 and proxyserver:41000, as the ftp-proxy always uses the lowest possible port. Some ftp-servers don't seem to like this. They end up refusing to build a dataconnection half of the time. (i.e. first request works, second request doesn't, and so forth).
Okay, I admit that there is a bug in my brain, because I have not fully understood the ReUseAddr thing. :-) All you Gurus on the list out there, please help me with this: is the patch provided by Rogier, and a second one disabling the SO_REUSEADDR option (at least on the data connections) the correct way to handle the connections? I remember that when I did not have SO_REUSEADDR it was nearly impossible to use the proxy. I could open one control connection and perform one data transfer. All went well, but I could not perform a second transfer within the 180 second timeout. When I introduced the flag, I could do as many sequential transfers as I wanted. As soon as I have this sorted out, I will release a new update with all issues of the past few weeks addressed.
Anyway, I've modified the ftp-proxy to start looking for a free port at a random position in the range. This reduces the problem from occurring 50% of the time to 0.05% of the time. (range is 1000 entries). This is acceptable, as the retry will simply work.
Roger.
Volker -- Volker Wiegand Phone: +49 (0) 6196 / 50951-24 SuSE Rhein/Main AG Fax: +49 (0) 6196 / 40 96 07 Mergenthalerallee 45-47 Mobile: +49 (0) 179 / 292 66 76 D-65760 Eschborn E-Mail: Volker.Wiegand@suse.de ++ Only users lose drugs. Or was it the other way round? ++