Windows Server – FTP server: “Connection closed by remote host”


To totally unlock this section you need to Log-in


Login

Scenario

When you use an FTP client to download a large file from an FTP server (based on Windows Server 2003, Enterprise and Standard editions), you receive an error message that resembles the following:

Connection closed by remote host

This problem occurs if the following conditions are true:

  • The Application Layer Gateway service is running on the FTP server.
  • The Routing and Remote Access service is running on the FTP server.

This problem occurs because the Routing and Remote Access service and the Application Layer Gateway service use the Lpnat.sys driver to create a time-out value that is 60 seconds for TCP port mappings. However, the original time-out value for TCP port mappings is 24 hours.

Solution

To work around this problem, use one of the following methods.

Method 1

Stop the Application Layer Gateway service if you do not have to use the service.

Method 2

Warning: Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall the operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.

Change a registry value to affect the behavior of Application Layer Gateway service on the FTP Server. To do this, follow these steps:

  • Click Start, click Run, type Regedit, and then click OK.
  • Locate, and then click the following registry subkey:
  • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ALG\ISV\{6E590D61-F6BC-4dad-AC21-7DC40D304059}
    

  • In the results pane, double-click PreferExternalManifest.
  • In the Value data box, type Disable, and then click OK.
  • On the File menu, click Exit to close Registry Editor.

After you change the registry value, the Application Layer Gateway service will not make port mappings for the FTP Server anymore.

1 thought on “Windows Server – FTP server: “Connection closed by remote host””

  1. Sometimes, managing a Windows Server 2003 with FTP server feature enabled, you can face a strange behaviour transferring large files to clients because they inform you that their ftp client give them an error like “Connection closed by remote host”.

    This is not an “error”, but a bad TCP port mapping timeout assigned to the FTP server logical ports.

    Read more on HeelpBook:

    Windows Server – FTP server: “Connection closed by remote host” – http://heelpbook.altervista.org/2014/windows-server-ftp-server-connection-closed-by-remote-host/ #heelpbook #ftp #server #windows #microsoft @heelpbook

Comments are closed.