Open akirmse opened 5 years ago
Stepping through the FTPProvider code, I think maybe it's not expecting many lines of response when logging in? After many retries, one upload did eventually succeed, so this is close to working.
Here's a transcript of logging in via command-line ftp:
$ ftp ftpnos.woc.noaa.gov
Connected to kvm-east2-ftpnos.w2.wocvm.noaa.gov.
220-******** WARNING WARNING WARNING WARNING WARNING ********
220-This is a United States government computer system, which may be
220-accessed and used only for official Government business by authorized
220-personnel. Unauthorized access or use of this computer system may
220-subject violators to criminal, civil, and/or administrative action.
220-
220-All information on this computer system may be intercepted, recorded,
220-read, copied, and disclosed by and to authorized personnel for official
220-purposes, including criminal investigations. Access or use of this
220-computer system by any person whether authorized or unauthorized,
220-constitutes consent to these terms.
220-******** WARNING WARNING WARNING WARNING WARNING ********
220-Notice: All files have a storage life of 30 days. Anything older will
220-be deleted automatically. You have been warned.
220-
220 ProFTPD 1.3.3a Server (ftpnos.woc.noaa.gov) [10.21.2.65]
Name (ftpnos.woc.noaa.gov:akirmse): anonymous
331 Anonymous login ok, send your complete email address as your password
Password:
230 Anonymous access granted, restrictions apply
Remote system type is UNIX.
Using binary mode to transfer files.
After doing a little more tracing, I think the problem might be that the server sends some of the 220 responses, so FTPProvider immediately sends the login name. But then more of the initial 220 responses arrive, which the provider is incorrectly interpreting as the response to the username login.
I see there are some 0.1 sec sleeps in the code, perhaps an attempt to wait until the server has sent everything? But that doesn't seem very robust.
Not be able to download file. Every time get exception because FTP server
I am using host like ftp://12.2.3.5:22
Please help me.
Thnks
I'm trying to upload to an ftp server that requires anonymous login. Here's my code:
I'm getting 220 and 331 status messages back (see logs below), which sound like potentially there isn't really an error, but uploading has not occurred. I don't control this FTP server and can't see what's happening on the server side.