FTP: 425 can't build data connection

sheriffporter

Member
Licensed User
Longtime User
I'm trying to get my app to send files to my ftp server, it connects and throws a "425 can't build data connection" error. I found references to this error in the forum here, but no solution. Has anyone figured this one out?
I have double-checked my syntax, and simplified my code just initialize, and ftpupload, but still same error on my server window, then it hangs and will not execute the next command (ftp.close).

I am able to login and use this server from an ftp client just fine.

B4X:
Sub Activity_Create(FirstTime As Boolean)
   Activity.LoadLayout("main")
   FTP.Initialize("FTP", "myftpserver.com", 21, "user", "pass")

Sub btnPlate_Click
FTP.UploadFile(File.DirRootExternal, "1A5AD431.ret", True, "/MCN_SEND/1A5AD431.RET")
   
   FTP.Close

end sub
 

sheriffporter

Member
Licensed User
Longtime User
Real device, Droid X2. I am able to ftp using a client app, I just can't get my b4a app to work, log shows it logs in and accepts password, then starts upload but no progress after that and it just hangs with that error. Zero bytes tranferred.
 
Upvote 0

sheriffporter

Member
Licensed User
Longtime User
Server log shows the following:

02/09/2012 14:58:07 {1} - ListenSocket Create Success (Port 21)
02/09/2012 14:58:07 {1} - ListenSocket Listen Success (Port 21)
02/09/2012 15:02:32 {4} - Attempted Connection from: 174.253.319.20
02/09/2012 15:02:32 {2} - [1] : Connection Established
02/09/2012 15:02:32 {2} - [1] : User logged in: <droid> : 174.253.319.20

The watch window says "data socket error".

Still no luck....
 
Upvote 0

sheriffporter

Member
Licensed User
Longtime User
NET version 1.20

Using GuildFTPD, I don't think it has a pasv command (doesn't accept it), not sure if I can set that mode on it.

FTP works fine from my phone if I use a market client, I just can not get b4a app to download or upload, it gives that same error.
 
Upvote 0

sheriffporter

Member
Licensed User
Longtime User
No help there. finally got sick of it and installed another FTP server (WarFTP), once I did that it works just fine. that was a lot of wasted time...

Thanks for the suggestions though... I guess some FTP servers just wont work with the current net library.
 
Upvote 0
Top