RCurl 无法连接端口 21 FTP 超时

问题描述 投票:0回答:1

我在 R 中尝试从多个 FTP 服务器提取 csv 数据。到目前为止,我的代码在其中两台服务器上运行良好,并且我能够收集所需的数据,但第三台服务器抛出以下错误:

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

这是我的代码:

# 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)

它适用于

ftp://154.49.142.233
ftp.motorstateftp.com
,但不适用于
ftp.ekeystone.com

这是提供给我的屏幕截图,作为实现此代码的参考。

r curl ftp rcurl ftps
1个回答
0
投票

“需要通过 TLS 进行隐式 FTP” 就是问题所在。我没有看到您的代码中启用了 TLS,仅启用了隐式 TLS(使用端口 990)。

我不知道 RCurl。但我会从

开始

url <- "ftps://ftp.ekeystone.com"
    
© www.soinside.com 2019 - 2024. All rights reserved.