我的公司通过 Windows IIS 托管 FTP 服务器。我们有一个客户端程序(用 C# 编程语言编写的 Windows 窗体程序),它安装在客户的服务器上,用于下载为他们准备的文件。
几个月前就出现了一个问题,今天仍然在发生。从客户端提供的打印屏幕来看,FTPWebRequest 似乎已达到超时时间,我认为大约是 1.5 分钟。从 IIS FTP 服务器,我可以获取以下日志:
2021-04-27 07:06:06 <ClientIP> 37079 - 192.9.100.187 21 USER <UserID> 331 0 0 23 21 0 48c11a4b-28e0-4d8c-a590-8ba615e78edb -
2021-04-27 07:06:06 <ClientIP> 37079 <UserID> 192.9.100.187 21 PASS *** 230 0 0 21 14 32 48c11a4b-28e0-4d8c-a590-8ba615e78edb /
2021-04-27 07:06:06 <ClientIP> 37079 <UserID> 192.9.100.187 21 OPTS utf8+on 200 0 0 58 14 0 48c11a4b-28e0-4d8c-a590-8ba615e78edb -
2021-04-27 07:06:07 <ClientIP> 37079 <UserID> 192.9.100.187 21 PWD - 257 0 0 31 5 0 48c11a4b-28e0-4d8c-a590-8ba615e78edb -
2021-04-27 07:06:07 <ClientIP> 37079 <UserID> 192.9.100.187 21 CWD Control 250 0 0 29 13 15 48c11a4b-28e0-4d8c-a590-8ba615e78edb /Control
2021-04-27 07:06:07 <ClientIP> 37079 <UserID> 192.9.100.187 21 TYPE I 200 0 0 20 8 0 48c11a4b-28e0-4d8c-a590-8ba615e78edb -
2021-04-27 07:06:07 <ClientIP> 37079 <UserID> 192.9.100.187 21 PORT <ClientIP>,146,163 200 0 0 30 28 16 48c11a4b-28e0-4d8c-a590-8ba615e78edb -
2021-04-27 07:06:07 <ClientIP> 37539 <UserID> 192.9.100.187 20 DataChannelOpened - - 0 0 0 0 0 48c11a4b-28e0-4d8c-a590-8ba615e78edb -
2021-04-27 07:06:07 <ClientIP> 37539 <UserID> 192.9.100.187 20 DataChannelClosed - - 0 0 16826 0 0 48c11a4b-28e0-4d8c-a590-8ba615e78edb -
2021-04-27 07:06:07 <ClientIP> 37079 <UserID> 192.9.100.187 21 NLST - 226 0 0 16904 6 47 48c11a4b-28e0-4d8c-a590-8ba615e78edb /Control
2021-04-27 07:06:07 <ClientIP> 37079 <UserID> 192.9.100.187 21 CWD / 250 0 0 29 7 0 48c11a4b-28e0-4d8c-a590-8ba615e78edb /
2021-04-27 07:06:07 <ClientIP> 37079 <UserID> 192.9.100.187 21 CWD Control 250 0 0 29 13 16 48c11a4b-28e0-4d8c-a590-8ba615e78edb /Control
2021-04-27 07:06:07 <ClientIP> 37079 <UserID> 192.9.100.187 21 PORT <ClientIP>,138,129 200 0 0 30 28 0 48c11a4b-28e0-4d8c-a590-8ba615e78edb -
2021-04-27 07:06:07 <ClientIP> 35457 <UserID> 192.9.100.187 20 DataChannelOpened - - 0 0 0 0 0 48c11a4b-28e0-4d8c-a590-8ba615e78edb -
2021-04-27 07:06:07 <ClientIP> 35457 <UserID> 192.9.100.187 20 DataChannelClosed - - 0 0 29462 0 0 48c11a4b-28e0-4d8c-a590-8ba615e78edb -
2021-04-27 07:06:07 <ClientIP> 37079 <UserID> 192.9.100.187 21 LIST - 226 0 0 29540 6 32 48c11a4b-28e0-4d8c-a590-8ba615e78edb /Control
2021-04-27 07:06:43 <ClientIP> 37079 <UserID> 192.9.100.187 21 CWD / 250 0 0 29 7 16 48c11a4b-28e0-4d8c-a590-8ba615e78edb /
2021-04-27 07:06:43 <ClientIP> 37079 <UserID> 192.9.100.187 21 PORT <ClientIP>,142,113 200 0 0 30 28 0 48c11a4b-28e0-4d8c-a590-8ba615e78edb -
2021-04-27 07:06:52 <ClientIP> 36465 <UserID> 192.9.100.187 20 DataChannelOpened - - 0 0 0 0 0 48c11a4b-28e0-4d8c-a590-8ba615e78edb -
2021-04-27 07:06:52 <ClientIP> 36465 <UserID> 192.9.100.187 20 DataChannelClosed - - 0 0 268 0 0 48c11a4b-28e0-4d8c-a590-8ba615e78edb -
2021-04-27 07:06:52 <ClientIP> 37079 <UserID> 192.9.100.187 21 RETR Control/<FileToBeDownloaded> 226 0 0 334 72 9187 48c11a4b-28e0-4d8c-a590-8ba615e78edb /Control/<FileToBeDownloaded>
2021-04-27 07:08:23 <ClientIP> 37079 <UserID> 192.9.100.187 21 ControlChannelClosed - - 64 0 608 270 136782 48c11a4b-28e0-4d8c-a590-8ba615e78edb -
能否从上面的日志中看出哪里出了问题?从日志中我可以看出 FTP 请求能够到达服务器,但不知何故客户端一直等到连接超时。