FTP failure due to network problem

Hi,

I've been searching through out this forum to find the exact message when during the on-going FTP, suddenly the network went down but i cannot find some. Could anyone provide me the exact return codes when FTP failed during FTP or prior to FTP the network went down and you still proceeded to FTP.

Below is the sample of a "successfull" FTP. I think the message after "Connection will close if idle more than 5 minutes." is what i need.

220-QTCP at test07.
220 Connection will close if idle more than 5 minutes.
331 Enter password.
230 PULSE logged on.
250  Now using naming format "1".
200 Representation type is binary IMAGE.
?Invalid command
?Invalid command
200 PORT subcommand request successful.
150 Retrieving file /xx/yyy/zzz/aaa/S0715-10
250 File transfer completed successfully.
2021 bytes received in 0.02369 seconds (83.29 Kbytes/s)
local: /home/xxx/S0715-10.txt remote: /xx/yyy/zzz/aaa/S0715-10.
txt
221 QUIT subcommand received.

Thanks

See List of FTP server return codes - Wikipedia, the free encyclopedia

In general the return n2n deals with the connection. You need to ascertain which codes you want to check. And AFAIK the message you cite is not a standard one. 4nn messages can be anything the ftp server code writers want it to be.

1 Like

Thanks I think I found what I need, the return code "426". Just need to add "grep" to get only "426" and now I can have a log for FTP failure due to network problem.

426 	Connection closed; transfer aborted.

FYI

1xx Positive Preliminary reply
The requested action is being initiated; expect another reply before proceeding with a new command. (The user-process sending another command before the completion reply would be in violation of protocol; but server-FTP processes should queue any commands that arrive while a preceding command is in progress.) This type of reply can be used to indicate that the command was accepted and the user-process may now pay attention to the data connections, for implementations where simultaneous monitoring is difficult. The server-FTP process may send at most, one 1xx reply per command.
2xx Positive Completion reply
The requested action has been successfully completed. A new request may be initiated.
3xx Positive Intermediate reply
The command has been accepted, but the requested action is being held in abeyance, pending receipt of further information. The user should send another command specifying this information. This reply is used in command sequence groups

Bryan