Bug 1257034 - Failed to synchronize cache for repo 'fedora'
Summary: Failed to synchronize cache for repo 'fedora'
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 22
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-26 06:42 UTC by Rei
Modified: 2017-05-10 18:46 UTC (History)
11 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-08-28 05:42:03 UTC
Type: Bug
Embargoed:
k.meena.genius: needinfo+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1219283 0 unspecified CLOSED temporary unavailability of fedora servers 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1252665 0 unspecified CLOSED dnf not transposing $releasever 2021-02-22 00:41:40 UTC

Internal Links: 1252665

Description Rei 2015-08-26 06:42:46 UTC
I just did a fresh install of Fedora 22 a few days ago and I could not update packages anymore since yesterday.

Steps to Reproduce: run 'dnf update'

Actual results:
Librepo version: 1.7.16 with CURL_GLOBAL_ACK_EINTR support (libcurl/7.40.0 NSS/3.18 Basic ECC zlib/1.2.8 libidn/1.29 libssh2/1.5.0)
lr_download: Target: file:///etc/dnf/dnf.conf (-)
select_next_target: Selecting mirror for: file:///etc/dnf/dnf.conf
prepare_next_transfer: URL: file:///etc/dnf/dnf.conf
add_librepo_xattr: Cannot set xattr user.Librepo.DownloadInProgress (fd: 4): Operation not supported
lr_download: Downloading started
check_transfer_statuses: Transfer finished: file:///etc/dnf/dnf.conf (Effective url: file:///etc/dnf/dnf.conf)
Error: Failed to synchronize cache for repo 'fedora' from 'https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=x86_64': Cannot prepare internal mirrorlist: file "repomd.xml" was not found in metalink

Expected results: Packages should be updated.

Comment 1 Tomas Mlcoch 2015-08-27 11:37:48 UTC
It's because "fedora-$releasever" is not a valid fedora repo.
The "$releasever" variable there is not properly expanded into your fedora version.
Could you please run:
$ rpm -q dnf librepo python-librepo
and post here the output?

Comment 2 Rei 2015-08-27 13:13:46 UTC
Here it is:

$ rpm -q dnf librepo python-librepo
dnf-1.1.0-2.fc22.noarch
package librepo is not installed
package python-librepo is not installed

What should be done in this case?

Comment 3 Rei 2015-08-28 05:42:03 UTC
Solved by installing librepo:

$ dnf install librepo --releasever=22

Comment 4 Tomas Mlcoch 2015-08-28 07:06:59 UTC
I wonder how it was possible to had installed dnf without librepo because package dnf requires python-dnf and python-dnf requires python-librepo.

Also I wonder if explicit specification of releasever by "--releasever=22" was necessary? The releasever should be auto-detected by dnf and if it isn't than it's probably a bug in dnf.

Honzo, could you or someone from your team take a quick look on this?

Comment 5 Radek Holy 2015-08-31 13:23:58 UTC
I don't think that it is possible to install dnf without librepo (using DNF). Also I believe that the output would not contain the librepo's output if it wasn't installed.

Yes, the releasever should be auto-detected. I believe that there was no package which provides this information installed at that time. I believe that when the librepo was installed, it pulled in the package providing the information.

It seems to me that the system in question was/is broken somehow. Looks like it missed a lot of packages.

Comment 6 stella 2016-01-21 23:22:50 UTC
when i run this command $ rpm -q dnf librepo python-librepo
i get this
dnf-1.0.0-1.fc22.noarch
librepo-1.7.13-1.fc22.x86_64
python-librepo-1.7.13-1.fc22.x86_64
but my fedora still show this error when i am updating and installing something

Error: Failed to synchronize cache for repo 'fedora' from 'https://mirrors.fedoraproject.org/metalink?repo=fedora-22&arch=x86_64': Cannot prepare internal mirrorlist: Curl error (6): Couldn't resolve host name for https://mirrors.fedoraproject.org/metalink?repo=fedora-22&arch=x86_64 [Could not resolve host: mirrors.fedoraproject.org]
could anyone please help.

Comment 7 Subodh Pachghare 2017-05-10 18:46:32 UTC
Just wanted to add some info, this behaviour also happens when DNS resolution is not working fine. I tried all methods to resolve before, clean cache, rebuild, etc. later on, found that DNS Server was not responding.
Maybe, we need better error reporting from dnf.

Thanks,
Subodh Pachghare


Note You need to log in before you can comment on or make changes to this bug.