与FTP服务器的连接有时可以正常工作而其他服

时间:2016-08-09 10:44:29

标签: ftp filezilla proftpd

我有一个运行proftpd的ubuntu服务器(在Azure上),当我尝试使用FileZilla连接到该服务器时,有时它可以正常工作,有时它不会(通常它最初没有工作......)并且我需要在它工作之前继续尝试几次......并且一旦它确实有效......),现在这是我收到它的错误FileZilla日志:

Status: Resolving address of ftp.myserver.com
Status: Connecting to xx.xx.xx.xx:21...
Status: Connection established, waiting for welcome message...
Status: Insecure server, it does not support FTP over TLS.
Command:    USER my_user
Response:   331 Password required for my_user
Command:    PASS *******
Error:  Connection timed out after 20 seconds of inactivity
Error:  Could not connect to server
Status: Waiting to retry...
Status: Resolving address of ftp.myserver.com
Status: Connecting to xx.xx.xx.xx:21...
Status: Connection established, waiting for welcome message...
Response:   220 ProFTPD 1.3.5a Server (Debian) [xx.xx.xx.xx]
Command:    AUTH TLS
Response:   500 AUTH not understood
Command:    AUTH SSL
Response:   500 AUTH not understood
Status: Insecure server, it does not support FTP over TLS.
Command:    USER my_user
Response:   331 Password required for my_user
Command:    PASS *******
Error:  Connection timed out after 20 seconds of inactivity
Error:  Could not connect to server

这就是我在proftpd日志中看到的内容:

2016-08-09 10:26:37,263 FTP proftpd[33961] 10.0.0.6 (yy.yy.yy.yy[yy.yy.yy.yy]): USER my_user: Login successful.
2016-08-09 10:26:37,264 FTP proftpd[33961] 10.0.0.6 (yy.yy.yy.yy[yy.yy.yy.yy]): FTP session closed.
2016-08-09 10:26:37,468 FTP proftpd[33970] 10.0.0.6 (yy.yy.yy.yy[yy.yy.yy.yy]): FTP session opened.

我不知道为什么服务器会在登录后关闭并重新打开连接,但我不是FTP专家......

有关如何解决这个问题的想法吗?

修改

This is the content of proftpd.conf file

1 个答案:

答案 0 :(得分:2)

使用ProFTPD登录时延迟有多种可能原因。最常见的原因是mod_delay模块(请参阅its FAQ), IdentLookupsUseReverseDNS

但是,由于在发送PASS命令后发生延迟,因此会排除IdentLookupsUseReverseDNS指令,因为这些指令属于在发送任何命令之前建立初始连接。

根据与记者的讨论,mod_delay添加的任何延迟都被排除在外。这就留下了PAM,它取决于配置({em>例如<{em}中的)和所使用的模块,可以添加自己的延迟(ProFTPD几乎无法控制)。要禁用ProFTPD使用PAM,您可以在配置中使用以下内容:

/etc/pam.d/ftp

记者提到禁用PAM确实消除了延迟 - 因此指出其中一个PAM模块是根本原因。

希望这有帮助!

相关问题