rcurlftprcurlftps

RCurl Failed to connect to port 21 FTP Timed out


I'm in R trying to pull csv data from multiple FTP servers. So far, my code works fine in two of the servers and I'm able to gather the data I need, but a third one throws the folling error:

Error in function (type, msg, asError = TRUE)  : 
  Failed to connect to ftp.ekeystone.com port 21 after 21191 ms: Timed out

Here's my code:

# required packages
library(RCurl)

# credentials
url <- "ftp.ekeystone.com"
pwd <- "xxxxxxx:yyyyyyyy"

#  recover raw files
rawFiles <- getURL(url = url, userpwd = pwd, ftp.use.epsv = FALSE)

It has worked with ftp://154.49.142.233 and ftp.motorstateftp.com, but not with ftp.ekeystone.com.

Here is a screenshot that was provided to me as a reference to implement this code. enter image description here


Solution

  • The "Require implicit FTP over TLS" is the problem. I do not see TLS enabled in your code, let only the implicit TLS (which uses port 990).

    I do not known RCurl. But I'd start with

    url <- "ftps://ftp.ekeystone.com"