Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
6k views
in Java FTP by (160 points)
hi. We are successfully using edtFPT to access and download files from a number of sites however we are running into an issue with a new one. Our usual protocol is to send user and password and then issue a USER USERXX to get a confirm back. This works fine except for this one. We receive a 503 error

Synopsis
A 503 reply code may be sent in response to any command that requires the succesful processing of previous commands first. It is a permanent negative reply, which means the client is discouraged from immediately sending the command again since the server will respond with the same reply code. For example, a file rename requires a successful RNFR command before the RNTO command can be sent. Sending the RNTO command first will result in a 503 reply code.

any ideas about how to solve this?

2 Answers

0 votes
by (162k points)
I don't really understand why you send the second USER command ... could you explain and post a log file at the debug level?
0 votes
by (160 points)
Sorry apparently we're not sending the USER edtFTP is
As I said, the whole thing works for a lot of sites, but not the one in question.
FTPReply reply = control.SendCommand("USER " + user);

Here's the log entry

INFO SNP_CONNECTION_PARAMS Logging in
INFOExpected reply codes = [230,331]
INFO Bad sequence of commands. (code=503) : EnterpriseDT.Net.Ftp.FTPException: Bad sequence of commands. (code=503)
EnterpriseDT.Net.Ftp.FTPException: Bad sequence of commands. (code=503)
at EnterpriseDT.Net.Ftp.FTPControlSocket.ValidateReply(FTPReply reply, String[] expectedReplyCodes) in C:\Projects\BNYM.APT.DPP.FTP.root\BNYM.APT.DPP.FTP\edtftpnet-1.2.6\src\net\ftp\FTPControlSocket.cs:line 889
at EnterpriseDT.Net.Ftp.FTPClient.Login(String user, String password) in C:\Projects\BNYM.APT.DPP.FTP.root\BNYM.APT.DPP.FTP\edtftpnet-1.2.6\src\net\ftp\FTPClient.cs:line 1454
at BNYM.APT.DPP.FTP.FTPOperation.Execute(String configsectionlabel) in C:\Projects\BNYM.APT.DPP.FTP.root\BNYM.APT.DPP.FTP\BNYM.APT.DPP.FTP\BNYM.APT.DPP.FTP\FTPOperation.cs:line 52
INFO SNP_CONNECTION_PARAMS starting 5/5/2011 7:33:06 AM
INFO SNP_CONNECTION_PARAMS Logging in
INFOExpected reply codes = [230,331]
INFO Bad sequence of commands. (code=503) : EnterpriseDT.Net.Ftp.FTPException: Bad sequence of commands. (code=503)
EnterpriseDT.Net.Ftp.FTPException: Bad sequence of commands. (code=503)

Categories

...