我经常使用wget
下载大文件(> 100GB)。通常,它工作正常,但我也经常遇到如下连接问题:
...
50449750K .......... .......... .......... .......... .......... 29% 1.31M 1h44m
50449800K .......... .......... .......... .......... .......... 29% 12.8M 1h44m
50449850K .......... .......... .......... .......... .......... 29% 1.27M 1h44m
50449900K .......... .......... .......... .......... .......... 29% 3.90M 1h44m
50449950K .......... .......... .......... .......... .......... 29% 10.5M 1h44m
50450000K .......... .......... .......... .......... .......... 29% 11.8M 1h44m
50450050K .......... .......... .......... .......... .......... 29% 1.35M 1h44m
50450100K .......... .......... .......... .......... .......... 29% 1.34M 1h44m
50450150K 29% 928G=44m44s
2018-08-16 11:48:55 (18.4 MB/s) - Read error at byte 51660954098/172689731772 (Connection reset by peer).
我从
开始下载wget --no-check-certificate -O /path/to/out.txt -c "https://XXX.s3.amazonaws.com/XXX"
我知道可能会发生连接问题,但是我认为wget
会再次尝试下载文件吗?为什么这里没有发生这种情况?
This question显示wget
错误后重试的Connection reset by peer
的输出。
整个上下文:我实际上是从这样的Python脚本运行此命令
shouldContinue = "-c"
wget = 'wget --no-check-certificate -O {outputPath} {shouldContinue} "{url}"'.format(
outputPath=outputPath,
shouldContinue=shouldContinue,
url=url
)
proc = subprocess.Popen(wget, shell=True)
proc.wait()
$ wget --version | head -1
GNU Wget 1.14 built on linux-gnu