lftp and the gatling file server don't understand each other with ftp:sync-mode on. I reported this on the gatling ML first; the author thinks the problem is likely on lftp's side.
eMails from there attached below. Date: Sat, 29 Nov 2008 13:22:02 +0100 From: Maik Zumstrull <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: gatling and lftp don't like each other Environment: gatling 0.9 and libowfat 0.28 built fresh from tarballs on Debian sid i386, lftp 3.7.5 (from the Debian package) Result on the gatling side: % ./gatling -p 8080 -f -p 2121 starting_up 0 :: 8080 start_ftp 0 :: 2121 accept 7 127.0.0.1 57870 1 accept 8 127.0.0.1 57871 2 close/read0 7 close/reqdone 8 Result on the lftp side: % lftp lftp :~> debug 5 lftp :~> open ftp://localhost:2121/ ---- Resolving host address... ---- 1 address found: 127.0.0.1 ---- Connecting to localhost (127.0.0.1) port 2121 ---> FEAT <--- 220 Hi there! <--- 211-Features: <--- MDTM <--- REST STREAM <--- SIZE <--- 211 End ---> USER anonymous ---> PASS lftp@ ---> PWD <--- 230 No need for passwords, you're logged in now. <--- 230 If you insist... cd `ftp://localhost:2121/' [Waiting for response...] In this state, it just hangs, so I hit Ctrl+C once. Continuing: Interrupt lftp localhost:~> close ---> QUIT <--- 550 The heck you say. lftp localhost:~> set ftp:sync-mode on lftp localhost:~> open ftp://localhost:2121/ ---- Connecting to localhost (127.0.0.1) port 2121 <--- 220 Hi there! ---> FEAT <--- 211-Features: <--- MDTM <--- REST STREAM <--- SIZE <--- 211 End ---> USER anonymous <--- 230 No need for passwords, you're logged in now. ---> PWD <--- 257 "/" cd ok, cwd=/ The problem seems to be with lftp's default habit of sending the next command(s) without waiting for a reply to the current one. With that suppressed (sync-mode on), it works fine. Not sure if this is a gatling bug, a lftp bug, or if gatling is simply supposed to work only in sync-mode, but I thought I'd report it. Date: Sat, 29 Nov 2008 14:09:42 +0100 From: Felix von Leitner <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: Re: gatling and lftp don't like each other > gatling 0.9 and libowfat 0.28 built fresh from tarballs on > Debian sid i386, lftp 3.7.5 (from the Debian package) I just tried lftp 3.7.3 against my gatling and it works fine. > % lftp > lftp :~> debug 5 > lftp :~> open ftp://localhost:2121/ > ---- Resolving host address... > ---- 1 address found: 127.0.0.1 > ---- Connecting to localhost (127.0.0.1) port 2121 > ---> FEAT > <--- 220 Hi there! > <--- 211-Features: > <--- MDTM > <--- REST STREAM > <--- SIZE > <--- 211 End > ---> USER anonymous > ---> PASS lftp@ > ---> PWD > <--- 230 No need for passwords, you're logged in now. > <--- 230 If you insist... > cd `ftp://localhost:2121/' [Waiting for response...] This is a bug in lftp. The protocol shows that it sends user, pass and pwd, but thinks the conversation is done after just two lines. So apparently it is not counting the responses to see what response is for what command, and it assumes the 230 response which gatling gives to user (indicating it does not need a password) is the answer to pass. Try running gatling with -l and do report the bug to the lftp people. My lftp protocol looks like it is in synchronous mode by default. Felix Date: Sat, 29 Nov 2008 14:50:21 +0100 From: Maik Zumstrull <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: Re: gatling and lftp don't like each other Felix von Leitner wrote: > Try running gatling with -l Strangely, that doesn't help: ---- Connecting to localhost (127.0.0.1) port 2121 ---> FEAT <--- 220 Hi there! <--- 211-Features: <--- MDTM <--- REST STREAM <--- SIZE <--- 211 End ---> USER anonymous ---> PASS lftp@ ---> PWD <--- 331 User name OK, please use your email address as password. <--- 230 If you insist... cd `ftp://localhost:2121/' [Waiting for response...] The dialog is different, but it still gets confused. > and do report the bug to the lftp people. I will.
