Eu tenho um servidor vsftpd em execução em um host RedHat e um aplicativo que usa FTP para transferir arquivos de e para o servidor.
Algumas transferências são feitas sem problemas, mas para alguns arquivos falha com o erro 426. Eu tentei transferir os arquivos usando o FileZilla em vez do outro aplicativo (mesmos arquivos, mesmo computador cliente, mesmo destino, mesmo usuário) e funciona .
Eu não tenho controle sobre o aplicativo cliente, então usei o WireShark para tentar entender o que está acontecendo.
No. Time Source Destination Protocol Length Info
59945 53.762728 [client ip] [ftp server] FTP 71 Request: RETR Batch.func
59950 53.763219 [ftp server] [client ip] TCP 74 20→52604 [SYN] Seq=0 Win=29200 Len=0 MSS=1460 SACK_PERM=1 TSval=2261468899 TSecr=0 WS=128
59951 53.763284 [client ip] [ftp server] TCP 74 52604→20 [SYN, ACK] Seq=0 Ack=1 Win=8192 Len=0 MSS=1460 WS=256 SACK_PERM=1 TSval=54157713 TSecr=2261468899
59957 53.763868 [ftp server] [client ip] TCP 66 20→52604 [ACK] Seq=1 Ack=1 Win=29312 Len=0 TSval=2261468900 TSecr=54157713
59958 53.763868 [ftp server] [client ip] FTP 126 Response: 150 Opening BINARY mode data connection for Batch.func (305415 bytes).
59959 53.763904 [ftp server] [client ip] FTP-DATA 1514 FTP Data: 1448 bytes
59960 53.763936 [ftp server] [client ip] FTP-DATA 1514 FTP Data: 1448 bytes
59961 53.763951 [client ip] [ftp server] TCP 66 52604→20 [ACK] Seq=1 Ack=2897 Win=131584 Len=0 TSval=54157713 TSecr=2261468900
59963 53.764080 [ftp server] [client ip] FTP-DATA 1514 FTP Data: 1448 bytes
59964 53.764208 [ftp server] [client ip] FTP-DATA 1514 FTP Data: 1448 bytes
59965 53.764230 [client ip] [ftp server] TCP 66 52604→20 [ACK] Seq=1 Ack=5793 Win=131584 Len=0 TSval=54157713 TSecr=2261468900
59966 53.764354 [ftp server] [client ip] FTP-DATA 1514 FTP Data: 1448 bytes
59967 53.764492 [ftp server] [client ip] FTP-DATA 1018 FTP Data: 952 bytes
59968 53.764494 [ftp server] [client ip] FTP-DATA 1514 FTP Data: 1448 bytes
59969 53.764516 [client ip] [ftp server] TCP 66 52604→20 [ACK] Seq=1 Ack=9641 Win=131584 Len=0 TSval=54157713 TSecr=2261468900
59970 53.764524 [ftp server] [client ip] FTP-DATA 1514 FTP Data: 1448 bytes
59971 53.764526 [ftp server] [client ip] FTP-DATA 1514 FTP Data: 1448 bytes
59972 53.764527 [ftp server] [client ip] FTP-DATA 1514 FTP Data: 1448 bytes
59973 53.764541 [client ip] [ftp server] TCP 66 52604→20 [ACK] Seq=1 Ack=13985 Win=131584 Len=0 TSval=54157713 TSecr=2261468900
59977 53.764651 [client ip] [ftp server] TCP 66 52604→20 [FIN, ACK] Seq=1 Ack=13985 Win=131584 Len=0 TSval=54157713 TSecr=2261468900
59978 53.764705 [client ip] [ftp server] TCP 54 52604→20 [RST, ACK] Seq=2 Ack=13985 Win=0 Len=0
59980 53.764720 [ftp server] [client ip] FTP-DATA 1514 FTP Data: 1448 bytes
59981 53.764734 [client ip] [ftp server] TCP 54 52604→20 [RST] Seq=1 Win=0 Len=0
59982 53.764752 [ftp server] [client ip] FTP-DATA 1514 FTP Data: 1448 bytes
59983 53.764760 [client ip] [ftp server] TCP 54 52604→20 [RST] Seq=1 Win=0 Len=0
59984 53.764766 [ftp server] [client ip] FTP-DATA 1514 FTP Data: 1448 bytes
59985 53.764774 [client ip] [ftp server] TCP 54 52604→20 [RST] Seq=1 Win=0 Len=0
59986 53.764780 [ftp server] [client ip] FTP-DATA 1514 FTP Data: 1448 bytes
59987 53.764788 [client ip] [ftp server] TCP 54 52604→20 [RST] Seq=1 Win=0 Len=0
59988 53.764795 [ftp server] [client ip] FTP-DATA 1514 FTP Data: 1448 bytes
59989 53.764802 [client ip] [ftp server] TCP 54 52604→20 [RST] Seq=1 Win=0 Len=0
59991 53.764985 [ftp server] [client ip] FTP-DATA 1514 FTP Data: 1448 bytes
59992 53.764987 [ftp server] [client ip] FTP-DATA 1514 FTP Data: 1448 bytes
59993 53.765008 [client ip] [ftp server] TCP 54 52604→20 [RST] Seq=1 Win=0 Len=0
59994 53.765015 [client ip] [ftp server] TCP 54 52604→20 [RST] Seq=1 Win=0 Len=0
59995 53.765157 [ftp server] [client ip] FTP-DATA 1514 FTP Data: 1448 bytes
59996 53.765173 [client ip] [ftp server] TCP 54 52604→20 [RST] Seq=1 Win=0 Len=0
59997 53.765186 [ftp server] [client ip] FTP-DATA 1514 FTP Data: 1448 bytes
59998 53.765194 [client ip] [ftp server] TCP 54 52604→20 [RST] Seq=1 Win=0 Len=0
59999 53.765200 [ftp server] [client ip] FTP-DATA 1514 FTP Data: 1448 bytes
60000 53.765212 [client ip] [ftp server] TCP 54 52604→20 [RST] Seq=1 Win=0 Len=0
60001 53.765225 [ftp server] [client ip] FTP-DATA 1514 FTP Data: 1448 bytes
60002 53.765227 [ftp server] [client ip] FTP-DATA 1514 FTP Data: 1448 bytes
60003 53.765228 [ftp server] [client ip] FTP-DATA 1514 FTP Data: 1448 bytes
60004 53.765229 [ftp server] [client ip] FTP-DATA 1514 FTP Data: 1448 bytes
60005 53.765238 [client ip] [ftp server] TCP 54 52604→20 [RST] Seq=1 Win=0 Len=0
60006 53.765244 [client ip] [ftp server] TCP 54 52604→20 [RST] Seq=1 Win=0 Len=0
60007 53.765250 [client ip] [ftp server] TCP 54 52604→20 [RST] Seq=1 Win=0 Len=0
60008 53.765255 [client ip] [ftp server] TCP 54 52604→20 [RST] Seq=1 Win=0 Len=0
60009 53.765261 [ftp server] [client ip] FTP-DATA 1514 FTP Data: 1448 bytes
60010 53.765269 [client ip] [ftp server] TCP 54 52604→20 [RST] Seq=1 Win=0 Len=0
60015 53.765465 [ftp server] [client ip] FTP-DATA 1514 FTP Data: 1448 bytes
60016 53.765476 [client ip] [ftp server] TCP 54 52604→20 [RST] Seq=1 Win=0 Len=0
60017 53.765484 [ftp server] [client ip] FTP 91 Response: 426 Failure writing network stream.
60018 53.765504 [client ip] [ftp server] TCP 54 52602→21 [ACK] Seq=292 Ack=531 Win=130816 Len=0
60030 53.768012 [client ip] [ftp server] FTP 60 Request: QUIT
60036 53.768691 [ftp server] [client ip] FTP 68 Response: 221 Goodbye.
60037 53.768692 [ftp server] [client ip] TCP 60 21→52602 [FIN, ACK] Seq=545 Ack=298 Win=29312 Len=0
60038 53.768732 [client ip] [ftp server] TCP 54 52602→21 [ACK] Seq=298 Ack=546 Win=130816 Len=0
60042 53.768875 [client ip] [ftp server] TCP 54 52602→21 [FIN, ACK] Seq=298 Ack=546 Win=130816 Len=0
60045 53.769297 [ftp server] [client ip] TCP 60 21→52602 [ACK] Seq=546 Ack=299 Win=29312 Len=0
Aparentemente, o servidor começa a enviar dados para o cliente, mas depois de alguns pacotes, o cliente termina a transferência.
Existe alguma configuração no vsftp que eu poderia mudar para corrigir isso?
Obrigado.
FileZilla log para a mesma transferência de arquivos:
2017-09-29 08:22:15 9980 3 Command: TYPE I
2017-09-29 08:22:15 9980 3 Response: 200 Switching to Binary mode.
2017-09-29 08:22:15 9980 3 Command: PASV
2017-09-29 08:22:15 9980 3 Response: 227 Entering Passive Mode (172,16,10,192,218,176).
2017-09-29 08:22:15 9980 3 Command: RETR Batch.func
2017-09-29 08:22:15 9980 3 Response: 150 Opening BINARY mode data connection for Batch.func (305415 bytes).
2017-09-29 08:22:15 9980 3 Response: 226 Transfer complete.
2017-09-29 08:22:15 9980 3 Status: File transfer successful, transferred 305,415 bytes in 1 second