无法连接到HAProxy后面的pyftpdlib服务器

时间:2016-12-19 17:54:00

标签: python ftp haproxy

我的FTP服务器出错了。它被放置在可以正确与FTP通信的HAProxy服务器后面。

Filezilla吐出:

Response:   257 "/" is the current directory.
Command:    TYPE I
Response:   200 Type set to: Binary.
Command:    PASV
Error:  Could not read from socket: ECONNRESET - Connection reset by peer
Error:  Disconnected from server
Error:  Failed to retrieve directory listing

我的HAProxy看起来像:

frontend ftp
        bind *:21
        mode tcp
        default_backend ftp-pool  

backend test
        balance roundrobin
        mode tcp
        server ftp-1 IP_ADDRESS:21 check

backend ftp-pool
        server ftp-1 IP_ADDRESS check port 21 inter 10s rise 1 fall 2
# Individual backends

backend ftp-1
        server ftp-1 IP_ADDRESS check port 21 inter 10s rise 1 fall 2

据我所知,在我的pyftpdlib服务器中添加handler.passive_ports = range(10001, 10250)应启用被动模式。

0 个答案:

没有答案