freebsd / vsftpd:文件大小大于64kb上传没有完成

对于极less数客户,我们在上传大于64 kb的文件时遇到问题。 服务器的操作系统是FreeBSD,通过ssl运行vsftpd。 当我们将这些客户移到托pipe在Windows上的ftps服务器上时,他们没有任何问题。 客户端系统正在运行Windows操作系统。

我们分析了客户端和服务器端的wireshark / tcpdump trace,我们的分析是:

一旦客户端完成上传文件,它发送一个FIN,但服务器花费时间发回ACK / FIN,客户端重新启动tcp握手,并重新开始上传文件。 我们尝试closurestcp延迟确认,tcp校验和,更改服务器上的recvBuf。 这些设置都没有任何区别。

其他细节:FreeBSD 9.0版本vsFtpd 3.0.0

vsFtpd.log

Fri Jun 15 12:22:16 2012 [pid 1092] CONNECT: Client "xx.xxx.xx.xx" Fri Jun 15 12:22:16 2012 [pid 1092] DEBUG: Client "xx.xxx.xx.xx", "SSL version: TLSv1/SSLv3, SSL cipher: AES128-SHA, not reused, no cert" Fri Jun 15 12:22:16 2012 [pid 1092] FTP response: Client "xx.xxx.xx.xx", "220 (vsFTPd 3.0.0)" Fri Jun 15 12:22:16 2012 [pid 1092] FTP command: Client "xx.xxx.xx.xx", "USER ftpuser" Fri Jun 15 12:22:16 2012 [pid 1092] [ftpuser] FTP response: Client "xx.xxx.xx.xx", "331 Please specify the password." Fri Jun 15 12:22:16 2012 [pid 1092] [ftpuser] FTP command: Client "xx.xxx.xx.xx", "PASS <password>" Fri Jun 15 12:22:16 2012 [pid 1091] [ftpuser] OK LOGIN: Client "xx.xxx.xx.xx" Fri Jun 15 12:22:16 2012 [pid 1093] [ftpuser] FTP response: Client "xx.xxx.xx.xx", "230 Login successful." Fri Jun 15 12:22:16 2012 [pid 1093] [ftpuser] FTP command: Client "xx.xxx.xx.xx", "OPTS UTF8 ON" Fri Jun 15 12:22:16 2012 [pid 1093] [ftpuser] FTP response: Client "xx.xxx.xx.xx", "200 Always in UTF8 mode." Fri Jun 15 12:22:16 2012 [pid 1093] [ftpuser] FTP command: Client "xx.xxx.xx.xx", "PBSZ 0" Fri Jun 15 12:22:16 2012 [pid 1093] [ftpuser] FTP response: Client "xx.xxx.xx.xx", "200 PBSZ set to 0." Fri Jun 15 12:22:16 2012 [pid 1093] [ftpuser] FTP command: Client "xx.xxx.xx.xx", "PROT P" Fri Jun 15 12:22:16 2012 [pid 1093] [ftpuser] FTP response: Client "xx.xxx.xx.xx", "200 PROT now Private." Fri Jun 15 12:22:16 2012 [pid 1093] [ftpuser] FTP command: Client "xx.xxx.xx.xx", "CWD /usr/home/ftpuser" Fri Jun 15 12:22:16 2012 [pid 1093] [ftpuser] FTP response: Client "xx.xxx.xx.xx", "250 Directory successfully changed." Fri Jun 15 12:22:16 2012 [pid 1093] [ftpuser] FTP command: Client "xx.xxx.xx.xx", "TYPE I" Fri Jun 15 12:22:16 2012 [pid 1093] [ftpuser] FTP response: Client "xx.xxx.xx.xx", "200 Switching to Binary mode." Fri Jun 15 12:22:16 2012 [pid 1093] [ftpuser] FTP command: Client "xx.xxx.xx.xx", "PASV" Fri Jun 15 12:22:16 2012 [pid 1093] [ftpuser] FTP response: Client "xx.xxx.xx.xx", "227 Entering Passive Mode (xx,xxx,xxx,xx,xxx,xx)." Fri Jun 15 12:22:16 2012 [pid 1093] [ftpuser] FTP command: Client "xx.xxx.xx.xx", "STOR testfile.TIF" Fri Jun 15 12:22:16 2012 [pid 1093] [ftpuser] FTP response: Client "xx.xxx.xx.xx", "150 Ok to send data." Fri Jun 15 12:22:16 2012 [pid 1092] [ftpuser] DEBUG: Client "xx.xxx.xx.xx", "SSL version: TLSv1/SSLv3, SSL cipher: AES128-SHA, reused, no cert" Fri Jun 15 12:22:17 2012 [pid 1092] [ftpuser] DEBUG: Client "xx.xxx.xx.xx", "SSL shutdown state is: SSL_RECEIVED_SHUTDOWN" Fri Jun 15 12:22:17 2012 [pid 1092] [ftpuser] DEBUG: Client "xx.xxx.xx.xx", "SSL shutdown state is: 3" Fri Jun 15 12:22:37 2012 [pid 1096] CONNECT: Client "xx.xxx.xx.xx" Fri Jun 15 12:22:37 2012 [pid 1096] DEBUG: Client "xx.xxx.xx.xx", "SSL version: TLSv1/SSLv3, SSL cipher: AES128-SHA, not reused, no cert" Fri Jun 15 12:22:37 2012 [pid 1096] FTP response: Client "xx.xxx.xx.xx", "220 (vsFTPd 3.0.0)" Fri Jun 15 12:22:37 2012 [pid 1096] FTP command: Client "xx.xxx.xx.xx", "USER ftpuser" Fri Jun 15 12:22:37 2012 [pid 1096] [ftpuser] FTP response: Client "xx.xxx.xx.xx", "331 Please specify the password." Fri Jun 15 12:22:37 2012 [pid 1096] [ftpuser] FTP command: Client "xx.xxx.xx.xx", "PASS <password>" Fri Jun 15 12:22:37 2012 [pid 1095] [ftpuser] OK LOGIN: Client "xx.xxx.xx.xx" Fri Jun 15 12:22:37 2012 [pid 1097] [ftpuser] FTP response: Client "xx.xxx.xx.xx", "230 Login successful." Fri Jun 15 12:22:37 2012 [pid 1097] [ftpuser] FTP command: Client "xx.xxx.xx.xx", "OPTS UTF8 ON" Fri Jun 15 12:22:37 2012 [pid 1097] [ftpuser] FTP response: Client "xx.xxx.xx.xx", "200 Always in UTF8 mode." Fri Jun 15 12:22:37 2012 [pid 1097] [ftpuser] FTP command: Client "xx.xxx.xx.xx", "PBSZ 0" Fri Jun 15 12:22:37 2012 [pid 1097] [ftpuser] FTP response: Client "xx.xxx.xx.xx", "200 PBSZ set to 0." Fri Jun 15 12:22:37 2012 [pid 1097] [ftpuser] FTP command: Client "xx.xxx.xx.xx", "PROT P" Fri Jun 15 12:22:37 2012 [pid 1097] [ftpuser] FTP response: Client "xx.xxx.xx.xx", "200 PROT now Private." Fri Jun 15 12:22:37 2012 [pid 1097] [ftpuser] FTP command: Client "xx.xxx.xx.xx", "CWD /usr/home/ftpuser" Fri Jun 15 12:22:37 2012 [pid 1097] [ftpuser] FTP response: Client "xx.xxx.xx.xx", "250 Directory successfully changed." Fri Jun 15 12:22:38 2012 [pid 1097] [ftpuser] FTP command: Client "xx.xxx.xx.xx", "TYPE I" Fri Jun 15 12:22:38 2012 [pid 1097] [ftpuser] FTP response: Client "xx.xxx.xx.xx", "200 Switching to Binary mode." Fri Jun 15 12:22:38 2012 [pid 1097] [ftpuser] FTP command: Client "xx.xxx.xx.xx", "PASV" Fri Jun 15 12:22:38 2012 [pid 1097] [ftpuser] FTP response: Client "xx.xxx.xx.xx", "227 Entering Passive Mode (xx,xxx,xxx,xx,xxx,xxx)." Fri Jun 15 12:22:38 2012 [pid 1097] [ftpuser] FTP command: Client "xx.xxx.xx.xx", "LIST" Fri Jun 15 12:22:38 2012 [pid 1097] [ftpuser] FTP response: Client "xx.xxx.xx.xx", "150 Here comes the directory listing." Fri Jun 15 12:22:38 2012 [pid 1096] [ftpuser] DEBUG: Client "xx.xxx.xx.xx", "SSL version: TLSv1/SSLv3, SSL cipher: AES128-SHA, reused, no cert" Fri Jun 15 12:22:38 2012 [pid 1096] [ftpuser] DEBUG: Client "xx.xxx.xx.xx", "SSL shutdown state is: NONE" Fri Jun 15 12:22:38 2012 [pid 1096] [ftpuser] DEBUG: Client "xx.xxx.xx.xx", "SSL shutdown state is: SSL_SENT_SHUTDOWN" Fri Jun 15 12:22:38 2012 [pid 1096] [ftpuser] DEBUG: Client "xx.xxx.xx.xx", "SSL shutdown state is: 3" Fri Jun 15 12:22:38 2012 [pid 1097] [ftpuser] FTP response: Client "xx.xxx.xx.xx", "226 Directory send OK." Fri Jun 15 12:24:22 2012 [pid 1096] [ftpuser] DEBUG: Client "xx.xxx.xx.xx", "Connection terminated without SSL shutdown - buggy client?" Fri Jun 15 12:27:04 2012 [pid 1089] [ftpuser] DEBUG: Client "xx.xxx.xx.xx", "Connection terminated without SSL shutdown - buggy client?" Fri Jun 15 12:27:04 2012 [pid 1090] [ftpuser] FTP response: Client "xx.xxx.xx.xx", "421 Timeout." Fri Jun 15 12:27:17 2012 [pid 1093] [ftpuser] OK UPLOAD: Client "xx.xxx.xx.xx", "/usr/home/ftpuser/testfile.TIF", 109322 bytes, 0.35Kbyte/sec Fri Jun 15 12:27:17 2012 [pid 1093] [ftpuser] FTP response: Client "xx.xxx.xx.xx", "226 Transfer complete." Fri Jun 15 12:27:17 2012 [pid 1092] [ftpuser] DEBUG: Client "xx.xxx.xx.xx", "Connection terminated without SSL shutdown - buggy client?" 

谢谢Bharat