Curl won't work over FTP

1

I am trying to install Wine on my Macbook (OS X 10.9.3).

First I tried using Homebrew which lists a set of dependencies and then goes to fetch the first.

==> Installing dependencies for wine: libtiff, gd, libgphoto2, little-cms
==> Installing wine dependency: libtiff
==> Downloading ftp://ftp.remotesensing.org/pub/libtiff/tiff-4.0.3.tar.gz

It times out at this point

Frustrated, I tried using Macports instead, it similarly works out dependencies, fetches a large number of them, but fails when it reaches

Attempting to fetch MesaLib-8.0.5.tar.bz2 from ftp://ftp.freedesktop.org/pub/mesa/older-versions/8.x/8.0.5/

again the process hangs and eventually fails.


Both of these files can be downloaded through a browser or through using ftp from the command line. But, Homebrew appears to be trying to download using cUrl. Attempting to download them using cUrl like so...

curl -O ftp://ftp.remotesensing.org/pub/libtiff/tiff-4.0.3.tar.gz

Times out (edit: with error 56)


Do I have some sort of problem with my cUrl? Why can't Homebrew or Macports download files over ftp?


EDIT

Could this be a problem with openSSL? I have

OpenSSL 1.0.1g 7 Apr 2014

Edit 2

tcpdump of trying to

curl -O --ftp-pasv ftp://ftp.remotesensing.org/pub/libtiff/tiff-4.0.3.tar.gz

sorry about the length but I don't know how much of this is relevant. This is listening for traffic to host ftp.remotesensing.org.

sudo tcpdump -nS -i en0 host ftp.remotesensing.org



12:15:34.249112 IP 192.168.1.76.60796 > 140.211.15.132.21: Flags [.], ack 3593778514, win 8235, options [nop,nop,TS val 52293163 ecr 726108029], length 0
12:15:34.467541 IP 140.211.15.132.21 > 192.168.1.76.60796: Flags [P.], seq 3593778514:3593778562, ack 1751566815, win 114, options [nop,nop,TS val 726108084 ecr 52293163], length 48
12:15:34.467577 IP 192.168.1.76.60796 > 140.211.15.132.21: Flags [.], ack 3593778562, win 8232, options [nop,nop,TS val 52293325 ecr 726108084], length 0
12:15:34.467622 IP 192.168.1.76.60796 > 140.211.15.132.21: Flags [P.], seq 1751566815:1751566831, ack 3593778562, win 8232, options [nop,nop,TS val 52293325 ecr 726108084], length 16
12:15:34.688464 IP 140.211.15.132.21 > 192.168.1.76.60796: Flags [.], ack 1751566831, win 114, options [nop,nop,TS val 726108138 ecr 52293325], length 0
12:15:34.688465 IP 140.211.15.132.21 > 192.168.1.76.60796: Flags [P.], seq 3593778562:3593778596, ack 1751566831, win 114, options [nop,nop,TS val 726108138 ecr 52293325], length 34
12:15:34.688548 IP 192.168.1.76.60796 > 140.211.15.132.21: Flags [.], ack 3593778596, win 8230, options [nop,nop,TS val 52293484 ecr 726108138], length 0
12:15:34.688595 IP 192.168.1.76.60796 > 140.211.15.132.21: Flags [P.], seq 1751566831:1751566853, ack 3593778596, win 8230, options [nop,nop,TS val 52293484 ecr 726108138], length 22
12:15:34.939547 IP 140.211.15.132.21 > 192.168.1.76.60796: Flags [P.], seq 3593778596:3593778619, ack 1751566853, win 114, options [nop,nop,TS val 726108202 ecr 52293484], length 23
12:15:34.939592 IP 192.168.1.76.60796 > 140.211.15.132.21: Flags [.], ack 3593778619, win 8228, options [nop,nop,TS val 52293665 ecr 726108202], length 0
12:15:34.939648 IP 192.168.1.76.60796 > 140.211.15.132.21: Flags [P.], seq 1751566853:1751566858, ack 3593778619, win 8228, options [nop,nop,TS val 52293665 ecr 726108202], length 5
12:15:35.159850 IP 140.211.15.132.21 > 192.168.1.76.60796: Flags [P.], seq 3593778619:3593778628, ack 1751566858, win 114, options [nop,nop,TS val 726108256 ecr 52293665], length 9
12:15:35.159878 IP 192.168.1.76.60796 > 140.211.15.132.21: Flags [.], ack 3593778628, win 8228, options [nop,nop,TS val 52293827 ecr 726108256], length 0
12:15:35.159996 IP 192.168.1.76.60796 > 140.211.15.132.21: Flags [P.], seq 1751566858:1751566867, ack 3593778628, win 8228, options [nop,nop,TS val 52293827 ecr 726108256], length 9
12:15:35.377961 IP 140.211.15.132.21 > 192.168.1.76.60796: Flags [P.], seq 3593778628:3593778665, ack 1751566867, win 114, options [nop,nop,TS val 726108311 ecr 52293827], length 37
12:15:35.377989 IP 192.168.1.76.60796 > 140.211.15.132.21: Flags [.], ack 3593778665, win 8226, options [nop,nop,TS val 52293987 ecr 726108311], length 0
12:15:35.378089 IP 192.168.1.76.60796 > 140.211.15.132.21: Flags [P.], seq 1751566867:1751566880, ack 3593778665, win 8226, options [nop,nop,TS val 52293987 ecr 726108311], length 13
12:15:35.600672 IP 140.211.15.132.21 > 192.168.1.76.60796: Flags [P.], seq 3593778665:3593778702, ack 1751566880, win 114, options [nop,nop,TS val 726108366 ecr 52293987], length 37
12:15:35.600705 IP 192.168.1.76.60796 > 140.211.15.132.21: Flags [.], ack 3593778702, win 8223, options [nop,nop,TS val 52294148 ecr 726108366], length 0
12:15:35.600751 IP 192.168.1.76.60796 > 140.211.15.132.21: Flags [P.], seq 1751566880:1751566886, ack 3593778702, win 8223, options [nop,nop,TS val 52294148 ecr 726108366], length 6
12:15:35.823766 IP 140.211.15.132.21 > 192.168.1.76.60796: Flags [P.], seq 3593778702:3593778749, ack 1751566886, win 114, options [nop,nop,TS val 726108421 ecr 52294148], length 47
12:15:35.823792 IP 192.168.1.76.60796 > 140.211.15.132.21: Flags [.], ack 3593778749, win 8220, options [nop,nop,TS val 52294313 ecr 726108421], length 0
12:16:53.020888 IP 192.168.1.76.60796 > 140.211.15.132.21: Flags [.], ack 3593778749, win 8220, length 0
12:16:53.235782 IP 140.211.15.132.21 > 192.168.1.76.60796: Flags [.], ack 1751566886, win 114, options [nop,nop,TS val 726127776 ecr 52294313], length 0
12:18:14.221005 IP 192.168.1.76.60796 > 140.211.15.132.21: Flags [.], ack 3593778749, win 8220, length 0
12:18:14.444259 IP 140.211.15.132.21 > 192.168.1.76.60796: Flags [.], ack 1751566886, win 114, options [nop,nop,TS val 726148075 ecr 52294313], length 0
12:19:33.654871 IP 192.168.1.76.60796 > 140.211.15.132.21: Flags [.], ack 3593778749, win 8220, length 0
12:19:33.855813 IP 140.211.15.132.21 > 192.168.1.76.60796: Flags [.], ack 1751566886, win 114, options [nop,nop,TS val 726167933 ecr 52294313], length 0
12:20:35.830462 IP 140.211.15.132.21 > 192.168.1.76.60796: Flags [P.], seq 3593778749:3593778763, ack 1751566886, win 114, options [nop,nop,TS val 726183421 ecr 52294313], length 14
12:20:35.830464 IP 140.211.15.132.21 > 192.168.1.76.60796: Flags [F.], seq 3593778763, ack 1751566886, win 114, options [nop,nop,TS val 726183421 ecr 52294313], length 0
12:20:35.830512 IP 192.168.1.76.60796 > 140.211.15.132.21: Flags [.], ack 3593778763, win 8219, options [nop,nop,TS val 52521432 ecr 726183421], length 0
12:20:35.830512 IP 192.168.1.76.60796 > 140.211.15.132.21: Flags [.], ack 3593778764, win 8219, options [nop,nop,TS val 52521432 ecr 726183421], length 0
12:20:35.830576 IP 192.168.1.76.60796 > 140.211.15.132.21: Flags [P.], seq 1751566886:1751566892, ack 3593778764, win 8219, options [nop,nop,TS val 52521432 ecr 726183421], length 6
12:20:35.830769 IP 192.168.1.76.60796 > 140.211.15.132.21: Flags [F.], seq 1751566892, ack 3593778764, win 8219, options [nop,nop,TS val 52521432 ecr 726183421], length 0
12:20:36.051447 IP 140.211.15.132.21 > 192.168.1.76.60796: Flags [R], seq 3593778766, win 0, length 0

Max

Posted 2014-05-27T20:44:31.020

Reputation: 111

Answers

0

Try to use passive mode, e.g. --ftp-pasv option to curl. If this works you can also specify this in the config file of curl ($HOME/.curlrc, see man-page for details).

Steffen Ullrich

Posted 2014-05-27T20:44:31.020

Reputation: 3 897

Thank you for your suggestion but unfortunately the same thing happens in passive mode, (56) Recv failure: Operation timed out – Max – 2014-05-28T10:11:02.567

Hard to say. The commands work from here. Do you have firewall in the network and does the browser use a proxy (which handles ftp differently)? OpenSSL version should not be the problem, because there should be no SSL involved. – Steffen Ullrich – 2014-05-28T11:12:05.027

No firewall issue that I know of, no proxy. This is just over my domestic internet connection, has worked fine in the past. – Max – 2014-05-28T11:16:49.367

A tcpdump of the connection attempt would then maybe helpful to see whats going on on the wire. – Steffen Ullrich – 2014-05-28T12:47:53.477

I have put a tcpdump in the question. Thanks for your continuing help! – Max – 2014-05-29T11:37:01.307

Can you please do it with -s65535 and write it to a file (-w file). From just the text dump one cannot see anything. And it is important to not restrict it to port 21, because in this case the data connection is affected, which does not use port 21. – Steffen Ullrich – 2014-05-29T12:58:16.453

Thanks for your help Steffen, turns out that you hit the nail on the head a while ago, tried this through a different internet connection and it worked, so it must be something going on at my end. – Max – 2014-05-31T14:35:47.747