I try to download a file from server using curl command. The command usually ends successfully but I wanted to check if it can handle errors the way I intended, so I added:
--retry 10 --retry-delay 10
and pulled the
ETH cable out. When I re-executed the command, it returned after less than 3 seconds with
curl: (7) Failed to connect to 10.10.10.10 port 21: No route to host. As I understand, this error is a transient error, and so, by quoting:
If a transient error is returned when curl tries to perform a transfer, it will retry this number of times before giving up. Setting the number to 0 makes curl do no retries (which is the default). Transient error means either: a timeout, an FTP 4xx response code or an HTTP 408 or 5xx response code.
I expected it do just fine.
Why didn't it go over the required 100 seconds (10 times 10 seconds)?
curl -V curl 7.60.0 (powerpc-unknown-linux-gnu) libcurl/7.60.0 OpenSSL/0.9.8g zlib/1.2.8 libssh2/1.8.0 uname -a Linux SmartSwitch 3.4.52 #1 PREEMPT Tue Aug 21 16:41:14 IDT 2018 ppc unknown cat /etc/*-release file. Release date = Tue Aug 21 13:36:48 2018 UTC Release user = ubuntu Release host = ubuntu-desktop Release dir = /home/ubuntu/ltib-1031 SCM wtag = none SCM tag = none Release tag = none App version = 9.1.1 lsb_release -a -sh: lsb_release: command not found