FTP Connection Issues

I’m attempting to use the ‘Use FTP Connection’ activity in Studio to connect to a remote FTP server. I have configured the Properties like so:


When I attempt to run I get this error: Use FTP Connection: No such host is known.

I have also created a Power Shell script to access the ftp site and download the files I need locally. This works great when run from the command line. Unfortunately when I try to run the script via Invoke Power Shell, it downloads the files, but they are all oddly blank i.e. 0KB.

Does anyone have any suggestions on how I can download files from an ftp site?

Hi @Cox_Cameron_M_TS_CI3129_I

For your host unknown error, could you please check below points?

  1. Double-check the FTP hostname for typos.
  2. Try resolving the hostname via ping from the same environment UiPath is running in.
  3. Make sure there are no proxy/firewall/DNS issues blocking the connection.

And for powershell script, can you show how you have configured your activity?

May be when you run from UiPath, files are not yet downloaded but control moves on already in UiPath.

Also would be worth checking if there are any relative paths there instead of absolute paths.

Also, check the port number that the server has opened to listen to connections

By default SFTP works on port 22

Hope it helps!

1 Like
  1. I’ve checked the hostname, password and port 21 are correct(all connect to Filezilla without issue)
  2. will check
  3. will check

powershell script is configured as such:

I have used delays to make sure the files are done loading before moving to the next activity, but still got the blank files. When executing the PS script manually, it takes a couple of seconds to download and I put in a few minute delays in UiPath so I don’t think that is it.

Check if you provided the correct host.

Example:
If in FileZilla you have sftp://localhost, that means in UiPath Studio, it will be localhost.

Hi @Cox_Cameron_M_TS_CI3129_I

Please check the host, and try removing the prefix “sftp://”. After removing it, the scope should begin to function correctly.

If helpful, mark as solution. Happy automation with UiPath

Still no luck changing the port to 22 and trying to hit the ip address and the hostname without stfp/ftp. I’m getting a different error that the host failed to respond

Try playing with the properties of the activity.
Check with the FTP server admin if the configuration is correctly set in UiPath Studio for you.

I’ve checked every single combination possible within the activity. Still no luck

In the FTP Server where you have the FileZilla, allow SFTP through the firewall:

New-NetFirewallRule -DisplayName "OpenSSH SFTP" -Direction Inbound -Protocol TCP -LocalPort 22 -Action Allow

In the Studio, you will need to do the same, but including Outbound.

Make sure the port is correct.

Try with FTPS Mode set to No.

If you have a Proxy to reach your FTP, it is not reachable yet in the current, latest stable version of the package.

UPDATE: I finally got it working. I had to uncheck Use SFTP and prefix the host with “ftp://”

1 Like

Yes, the port 21 threw me when looking at the screen shots.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.