为了方便以后ftp透明迁移,我是用lvs给现在的ftp服务器加了个VIP。
可能是因为自带ftp helper之类的模块吧,我倒是没碰到动态端口这个问题,直接在keepalived中配置了21端口就可用了。
但是我发现另外一个问题,如果超过20s没有对ftp执行命令(比如传输文件时间超过20s后再想执行ls命令),那么就会报这个错误:
421 Service not available, remote server has closed connection
Passive mode refused. Turning off passive mode.
No control connection for command: Transport endpoint is not connected