R - getURL - 没有端口命令

时间:2017-08-07 13:57:23

标签: r geturl

我已经连接到ftp服务器一段时间了,但它本周已经停止工作了。

通过FileZilla Client访问时,与ftp的连接正常。但是,当我尝试通过R或Internet浏览器时(两者都在工作,直到现在)。 我确保没有防火墙阻止访问。

我正在使用Rcurl,getUrl函数来检索数据。

当我将R中的输出与Filezilla的输出日志进行比较时,我可以看到两者都成功登录,然后运行PASV命令。但是由于PASV被禁用,因此filezilla设法运行PORT命令并收集数据。

从Filezilla日志: 2017-08-07 13:57:02 2372 1命令:PASV 2017-08-07 13:57:02 2372 1响应:500 PASV命令被禁用。使用PORT命令。 2017-08-07 13:57:02 2372 1命令:PORT 10,45,9,89,222,62 2017-08-07 13:57:02 2372 1回复:200 PORT命令成功 2017-08-07 13:57:02 2372 1命令:列表 2017-08-07 13:57:02 2372 1响应:150打开ls /.

的ASCII数据连接

来自R:

  

获取url_data_grouped交易

     

库(RCurl)

加载必需的包:bitops

  

url2< -c(" ftp://"用户" @IP地址")   文件名< -getURL(url2,userpwd =" user:pwd",ftp.use.epsv = FALSE,verbose = TRUE,dirlistonly = TRUE)

*   Trying "IP"...
* Connected to "IP" ("IP") port 21 (#0)
< 220-This server is for private use only
< 220-If you do not have access to this server
< 220-Please disconnect now
< 220 Please enter your login name now.
> USER "user"
< 331 Password required for user
> PASS "Password"
< 230 User user logged in.
> PWD
< 257 "/" is current directory
* Entry path is '/'
> CWD PMA
* ftp_perform ends with SECONDARY: 0
< 250 "/PMA" is current directory.
> PASV
* Connect data stream passively
< 500 PASV command is disabled. Use PORT command.
* Bad PASV/EPSV response: 500
* Remembering we are in dir "PMA/"
* Connection #0 to host "IP" left intact
Error in function (type, msg, asError = TRUE)  : 
  Bad PASV/EPSV response: 500

有没有人对这个问题有很好的投入?

0 个答案:

没有答案