Azure VM - 为什么 FTP 传输导致完全断开连接?

Azure VM - why FTP transfers lead to complete disconnect?

我有一个配置了 FTP 服务器的虚拟机。 我在 ACTIVE 模式下传输文件,在随机文件时我断开了连接。

我无法重新连接到 FTP 服务器,也无法远程连接到机器。 我必须重新启动机器并等待一段时间才能重新访问。

在这种情况下我该怎么做才能防止完全断开连接?


我最终使用了被动模式,尽管它不适合我,因为主动模式一直失败。

您很可能需要在 VM 上打开 FTP 端点:此答案将为您提供一些关于如何添加端点的背景信息:How to Setup FTP on Azure VM

您还可以使用 powershell 添加端点:Add Azure Endpoint

您需要的不仅仅是打开这两个端口 - FTP(被动或主动)的设计是 FTP 服务器将在随机范围的端口上发回数据(请参阅: http://slacksite.com/other/ftp.html) which presents a problem when using a stateless service like Azure's Load Balancing that requires Endpoints that must be explicitly opened. This setup guide is best to see how to achieve what you want on an Azure VM: http://itq.nl/walkthrough-hosting-ftp-on-iis-7-5-a-windows-azure-vm-2/(并且链接自 Grady 引用的 SO post)。