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 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
  • @ClsForCookies - What Ubuntu version are you using ? – Soren A Oct 8 '18 at 8:12
  • Not sure. I tried all the commands from unix.stackexchange.com/questions/88644/… but all I got was the uname -a I already added in the post – CIsForCookies Oct 8 '18 at 8:20
  • 1
    So what did lsb_release -a say ? – Soren A Oct 8 '18 at 8:22
  • its a in-house version of ubuntu. Could this somehow affect the curl retry feature? I thought only the curl version is relevant here – CIsForCookies Oct 8 '18 at 8:25
  • That depends on how it was build. But since "an in-house version" isn't an official Ubuntu variant, it might be off topic on this site. – Soren A Oct 8 '18 at 8:33

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.