PDA

View Full Version : dnf and curl issue (curl error 65)



byteman
12th June 2015, 12:00 AM
Hi,

I've recently decided to try fedora and installed fedora 22. I used to use dnf to install and upgrade stuff with no issues but then I've added rpmfusion repositories. I'm running into a really annoying problem with dnf and curl where it can't download packages. It gets stuck for a couple of minutes trying to download and eventually it shows an error:

$ sudo dnf install strace
Last metadata expiration check performed 0:49:33 ago on Thu Jun 11 22:44:40 2015.
Dependencies resolved.
================================================== ==============================
Package Arch Version Repository Size
================================================== ==============================
Installing:
strace x86_64 4.10-2.fc22 updates 355 k

Transaction Summary
================================================== ==============================
Install 1 Package

Total download size: 355 k
Installed size: 1.2 M
Is this ok [y/N]: ytly
Downloading Packages:
[MIRROR] strace-4.10-2.fc22.x86_64.rpm: Curl error (56): Failure when receiving data from the peer for <ftp_server> [response reading failed]
[FAILED] strace-4.10-2.fc22.x86_64.rpm: Curl error (56): Failure when receiving data from the peer for <ftp_server> [response reading failed]
Error: Error downloading packages:
Curl error (56): Failure when receiving data from the peer for <ftp_server> [response reading failed]


I've googled around a bit without much luck. The only clue is if I run curl directly I get this:

$ curl -v <ftp_server>* Trying 212.219.56.184...
* Connected to <ftp_server> (212.219.56.184) port 21 (#0)
< 220-----------------------------------------------------------------------------
< 220-Welcome to the University of Kent's UK Mirror Service.
< 220-
< 220-More information can be found at our web site: ...
< 220-Please send comments or questions to ...
< 220-----------------------------------------------------------------------------
< 220
> USER anonymous
< 331 Please specify the password.
> PASS ftp@example.com
< 230 Login successful.
> PWD
< 257 "/"
* Entry path is '/'
> CWD sites
* ftp_perform ends with SECONDARY: 0
< 250 Directory successfully changed.
> CWD dl.fedoraproject.org
< 250 Directory successfully changed.
> CWD pub
< 250 Directory successfully changed.
> CWD fedora
< 250 Directory successfully changed.
> CWD linux
< 250 Directory successfully changed.
> CWD updates
< 250 Directory successfully changed.
> CWD 22
< 250 Directory successfully changed.
> CWD x86_64
< 250 Directory successfully changed.
> CWD s
< 250 Directory successfully changed.
> EPSV
* Connect data stream passively
421 Timeout.ng Extended Passive Mode (|||8305|)
* Connection time-out
* Failed EPSV attempt. Disabling EPSV
> PASV
* response reading failed
* Closing connection 0
curl: (56) response reading failed


However if I add the --disable-epsv option it manages to download the file:

$ curl -v --disable-epsv <ftp_server> >> ~/tmp/txt
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 212.219.56.184...
* Connected to <ftp_server> (212.219.56.184) port 21 (#0)
< 220-----------------------------------------------------------------------------
< 220-Welcome to the University of Kent's UK Mirror Service.
< 220-
< 220-More information can be found at our web site: ...
< 220-Please send comments or questions to ...
< 220-----------------------------------------------------------------------------
< 220
> USER anonymous
< 331 Please specify the password.
> PASS ftp@example.com
< 230 Login successful.
> PWD
< 257 "/"
* Entry path is '/'
> CWD sites
* ftp_perform ends with SECONDARY: 0
< 250 Directory successfully changed.
> CWD dl.fedoraproject.org
< 250 Directory successfully changed.
> CWD pub
< 250 Directory successfully changed.
> CWD fedora
< 250 Directory successfully changed.
> CWD linux
< 250 Directory successfully changed.
> CWD updates
< 250 Directory successfully changed.
> CWD 22
< 250 Directory successfully changed.
> CWD x86_64
< 250 Directory successfully changed.
> CWD s
< 250 Directory successfully changed.
> PASV
* Connect data stream passively
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0< 227 Entering Passive Mode (212,219,56,184,76,182).
* Trying 212.219.56.184...
* Connecting to 212.219.56.184 (212.219.56.184) port 19638
* Connected to <ftp_server> (212.219.56.184) port 21 (#0)
> TYPE I
< 200 Switching to Binary mode.
> SIZE strace-4.10-2.fc22.x86_64.rpm
< 213 363248
> RETR strace-4.10-2.fc22.x86_64.rpm
< 150 Opening BINARY mode data connection for strace-4.10-2.fc22.x86_64.rpm (363248 bytes).
* Maxdownload = -1
* Getting file with size: 363248
{ [5744 bytes data]
* Remembering we are in dir "sites/dl.fedoraproject.org/pub/fedora/linux/updates/22/x86_64/s/"
< 226 Transfer complete.
100 354k 100 354k 0 0 491k 0 --:--:-- --:--:-- --:--:-- 491k
* Connection #0 to host <ftp_server> left intact


I'm not convinced if adding rpmfusion broke things. If I remove them it doesn't get any better. I've reinstalled fedora twice now and every time dnf broke after installing the rpmfusion package.

I have removed all links from the output above because I can't post it otherwise.
Any help would be greatly appreciated.

vallimar
12th June 2015, 05:00 AM
This may just be a problem with that particular mirror?
Try creating a /root/.curlrc file with 'disable-epsv' in it?

You might also try editing /etc/dnf/dnf.conf and adding
a 'fastestmirror=true' line to see if that will try a different
mirror that may not exhibit the issue?

If this is only happening after installing the rpmfusion package,
what exactly are you installing?

byteman
17th June 2015, 08:26 PM
It has nothing to do with rpmfusion. I re-installed it and it exhibits the same symptoms freshly installed.
I tried both your suggestions but unfortunately it didn't work.
Creating .curlrc in /root/ has no effect on dnf but it does add the disable-epsv option by default to curl -v <ftp>
Right now it fails while doing dnf update:

Error: Failed to synchronize cache for repo 'fedora' from 'https://mirrors.fedoraproject.org/metalink?repo=fedora-22&arch=x86_64': Cannot download repomd.xml: Curl error (56): Failure when receiving data from the peer for ftp://fedora.mirrors.ovh.net/download.fedora.redhat.com/linux/releases/22/Everything/x86_64/os/repodata/repomd.xml [response reading failed]

Can someone please help? Right now fedora is practically unusable for me.

I was abroad the past weekend and it seemed to work flawlessly. Maybe there's something wrong with my network?

marko
18th June 2015, 12:50 AM
What librepo package version do you have? If dnf is really broken badly try:
yum-deprecated update
To get your system updated, there was a bug fixed recently in librepo for this

lsatenstein
18th June 2015, 03:42 AM
It might have something to do with ipv6. Try sudo dnf -4 install | update | whatever

pgbross
18th June 2015, 09:56 AM
Hi,

I am experiencing the same problem and have the same frustrations with Fedora 22 and DNF.

I have posted on the bug https://bugzilla.redhat.com/show_bug.cgi?id=1219283 where I state that I believe the trouble is with some mirrors and the use of epsv by curl.

As a workaround, I have found that installing "yumex" (not yumex-dnf) works without issue and helps minimize the frustration.

--philip

lsatenstein
18th June 2015, 04:34 PM
Did you have problems using dnf -4 to block ipv6 ?

byteman
18th June 2015, 09:12 PM
Same issue with dnf -4


yum-deprecated works eventually (because it tries other mirrors after a few minutes):

fedora/22/x86_64/primary_db FAILED
ftp://ftp.mirrorservice.org/sites/dl.fedoraproject.org/pub/fedora/linux/releases/22/Everything/x86_64/os/repodata/b941ac3062960a055752e82e23b77f2adcec24202b1f5c1451 521615cf0fe45b-primary.sqlite.xz: [Errno 14] curl#56 - "response reading failed"
Trying other mirror.
updates/22/x86_64/primary_db FAILED
ftp://ftp.mirrorservice.org/sites/dl.fedoraproject.org/pub/fedora/linux/updates/22/x86_64/repodata/12f5c9f2e5981366a6819dcb7368fdbd19186aa77ffbc2c980 574e7992dc5be0-primary.sqlite.xz: [Errno 14] curl#56 - "response reading failed"
Trying other mirror.
(3/4): updates/22/x86_64/primary_db | 2.3 MB 00:03


librepo version:

Python 2.7.10 (default, May 27 2015, 18:11:38)
[GCC 5.1.1 20150422 (Red Hat 5.1.1-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import librepo
>>> librepo.VERSION
'1.7.16'


yum-deprecaded seems to work fine now, I think it started using a different mirror by default.