[Rd] download.file() yields incomplete files with method="internal"

Bill Dunlap bill at insightful.com
Thu Jun 15 23:16:58 CEST 2006


On Thu, 15 Jun 2006 Jan.Kleinn at partnerre.com wrote:

> as the bug # 7991 is flagged not-reproducible, let me give you some pieces
> of code, as I have the same or similar problem. The problem always shows up
> with the first example (a small text file) and only sometimes (but without
> obvious pattern) with the second example, which is a binary file.
>
> > download.file("ftp://ftp.nhc.noaa.gov/pub/atcf/btk/bal012006.dat",
> "C:/temp/bal012006.dat", method = 'internal', mode = 'w', cacheOK = FALSE)
> trying URL 'ftp://ftp.nhc.noaa.gov/pub/atcf/btk/bal012006.dat'
> ftp data connection made, file length 5110 bytes
> opened URL
> downloaded 0 bytes
>
> Warning message:
> downloaded length 0 != reported length 5110

Two versions of curl (7.10.6 and 7.15.1) on my Linux
box fail on this ftp server also.  They timeout when
starting "Extended Passive Mode".  Does this sort of
failure indicate a firewall is getting in the way?

   % curl --version
   curl 7.10.6 (i386-redhat-linux-gnu) libcurl/7.10.6 OpenSSL/0.9.7a ipv6 zlib/1.1.4
   Protocols: ftp gopher telnet dict ldap http file https ftps
   Features: IPv6 SSL libz NTLM
   % /usr/bin/curl --verbose --output /tmp/junk ftp://ftp.nhc.noaa.gov/pub/atcf/btk/bal012006.dat
   * About to connect() to ftp.nhc.noaa.gov:21
   * Connected to dogfish.nhc.noaa.gov (140.90.48.37) port 21
   ... login warning messages and PWD's ...
    < 229 Entering Extended Passive Mode (|||36993|)
   * About to connect() to ftp.nhc.noaa.gov:36993
   ... long wait ...
    * socket error: 110
   * Connected the data stream with PASV!
   curl: (7) socket error: 110
   * Closing connection #0

This doesn't look like a good site for testing.  It login
message starts with

   < 220-**WARNING**WARNING**WARNING**
   < 220-
   < 220-This is a United States (DOC/NOAA/NCEP) computer system, which may be
   < 220-accessed and used only for official Government business by authorized
   < 220-personnel. Unauthorized access or use of this computer system may
   < 220-subject violators to criminal, civil, and/or administrative action.

>
> >
> download.file("ftp://ftp.nhc.noaa.gov/pub/atcf/aid_public/aal012006.dat.gz",
>  "C:/temp/aal012006.dat.gz", method = 'internal', mode = 'wb', cacheOK =
> FALSE)
> trying URL 'ftp://ftp.nhc.noaa.gov/pub/atcf/aid_public/aal012006.dat.gz'
> ftp data connection made, file length 173760 bytes
> opened URL
> downloaded 155Kb
>
> Warning message:
> downloaded length 159140 != reported length 173760
>
>
> Finally, is the spec of the system I'm working on:
> > version
>                _
> platform       i386-pc-mingw32
> arch           i386
> os             mingw32
> system         i386, mingw32
> status
> major          2
> minor          3.1
> year           2006
> month          06
> day            01
> svn rev        38247
> language       R
> version.string Version 2.3.1 (2006-06-01)
> > win.version()
> [1] "Windows XP Professional (build 2600) Service Pack 2.0"
>
>
> Many thanks in advance and best regards,
> Jan
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

----------------------------------------------------------------------------
Bill Dunlap
Insightful Corporation
bill at insightful dot com
360-428-8146

 "All statements in this message represent the opinions of the author and do
 not necessarily reflect Insightful Corporation policy or position."



More information about the R-devel mailing list