【问题标题】:curl, ftp upload huge file: Operation timed out after 240000 milliseconds with 24514592768 bytes receivedcurl,ftp上传大文件:操作在240000毫秒后超时,收到24514592768字节
【发布时间】:2012-12-28 04:44:43
【问题描述】:

我正在尝试使用 ftp 上传 250 GB 文件...我正在使用 ssh 通道进行校验和控制...

收到此错误:

curl -v -m 240 --disable-epsv --ftp-skip-pasv-ip --quote "TYPE I" -T 28.tar         ftp://ftpkxxx:xxx@213.65.123.123/2012/12/

[root@tester /opt/tester/output]# ./send-logs-to-194.sh
* About to connect() to 213.65.123.123 port 21 (#0)
*   Trying 213.65.123.123...   % Total    % Received % Xferd  Average Speed   Time      Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0connected
* Connected to 213.65.123.123 (213.65.123.123) port 21 (#0)
< 220 (vsFTPd 2.2.2)
> USER ftpkxxx
< 331 Please specify the password.
> PASS xxx
< 230 Login successful.
> PWD
< 257 "/str1/tester_data_backup"
* Entry path is '/str1/tester_data_backup'
> TYPE I
< 200 Switching to Binary mode.
> CWD 2012
< 250 Directory successfully changed.
> CWD 12
< 250 Directory successfully changed.
> PASV
* Connect data stream passively
< 227 Entering Passive Mode (217,65,190,194,29,15).
* Skips 213.65.123.123 for data connection, uses 213.65.123.123 instead
*   Trying 213.65.123.123... connected
* Connecting to 213.65.123.123 (213.65.123.123) port 7439
> TYPE I
< 200 Switching to Binary mode.
> STOR 28.tar
< 150 Ok to send data.
} [data not shown]
  9  250G    0     0    9 22.7G      0  97.3M  0:43:55  0:03:59  0:39:56  102M*         Operation timed out after 240000 milliseconds with 24514592768 bytes received
  9  250G    0     0    9 22.8G      0  97.4M  0:43:54  0:03:59  0:39:55  102M* Closing     connection #0

curl: (28) Operation timed out after 240000 milliseconds with 24514592768 bytes received

我更喜欢 ftp 而不是 scp,因为它比 scp 快...用 ftp 和校验和上传 250gb 文件的正确方法是什么?

【问题讨论】:

    标签: file-upload curl ftp libcurl ftp-client


    【解决方案1】:

    您使用 -m 指定了允许花费的最长时间(240 秒),那么当它实际上按照您的要求在 240 秒后停止时,为什么它对您来说是一个错误?

    PS。默认使用TYPE I...

    【讨论】:

    • 你是对的,“-m 240”被删除了......再试一次......这是大文件传输的正确和最快的方式吗?......你对校验和有什么建议?跨度>
    • FTP 没有处理校验和的标准方法。最好使用单独的 SSH 命令。
    猜你喜欢
    • 2017-08-31
    • 2021-07-04
    • 2020-09-07
    • 1970-01-01
    • 2014-04-24
    • 2018-04-04
    • 2017-10-28
    • 1970-01-01
    • 2013-10-03
    相关资源
    最近更新 更多