Ask Your Question
3

Why doesn't DNF synchronize cache with mirrors?

asked 2019-01-23 17:44:53 -0500

dact gravatar image

updated 2019-01-24 05:05:33 -0500

I'm trying to do dnf upgrade, but I get this error:

Error: Failed to synchronize cache for repo 'updates'

The output of dnf upgrade -v:

https://paste.fedoraproject.org/paste...

It seems DNF is trying to download these files:

repodata/7a737b2a4e04cb82cb8834e503ac35ba290dd31cb5307e1b46c1380b31098762-primary.xml.gz
repodata/eba79ee4d9f268a0670161f815de23208b28e5cd00522ba2b6072375c53d3958-filelists.xml.gz
repodata/e1f99bfa7a27acd1b91ca6bc35482294d0cc112ff1c8900637ebb8f07fa4676f-prestodelta.xml.gz
repodata/b0dd9c08528406506fcd41b7b981b0a04b1a1d5e41457ae5ec3875512612287a-updateinfo.xml.xz

But they are not in the repos. The repomd.xml lists files with a different hash.

DNF output also contains this line:

Cannot download 'https://mirrors.fedoraproject.org/metalink?repo=updates-released-f29&arch=x86_64'

It makes me infer that DNF is using fallback hashes. My Internet connection is working, and I manually downloaded metalink from the URL above to check mirrors and timestamps. They seem correct.

Then I wonder why DNF cannot download the mirrors metalink.

P. S.: Neither --refresh nor dnf clean solves my issue.

UPDATE: The error lasted more than 24 hours, but it's now solved. I think it was some conflict between Fedora Mirror Manager and my geographic location because DNF was able to sync cache while connected to a VPN. Maybe mirrors near my location were outdated. It seems Mirror Manager doesn't check status before providing mirror list.

edit retag flag offensive close merge delete

Comments

1

It seems to be a temporary problem. Does the problem persist?

simmon gravatar imagesimmon ( 2019-01-23 20:57:25 -0500 )edit

try a sudo dnf clean all && sudo dnf update and see if it works again. Usually hiccups with the mirrors are solved within a few hours.

florian gravatar imageflorian ( 2019-01-24 02:14:31 -0500 )edit

3 Answers

Sort by » oldest newest most voted
1

answered 2019-01-24 05:21:31 -0500

villykruse gravatar image

If the problem persists, that is, it consistently fails to synchronize the repository you might try to edit the file

/etc/yum.repos.d/fedora-updates.repo

Remove the "#" character from

#baseurl=http://download.fedoraproject.org/pub/fedora/linux/updates/$releasever/Everything/$basearch/

and at the "#" character at the beginning of the line

metalink=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f$releasever&arch=$basearch

This is a work-around, and the problem should be reported to Redhat bugzilla.

Disabling the updates repository would be the same as not running updates at all, as only the updates repository provides updates to your packages.

edit flag offensive delete link more

Comments

Thanks for your answer. Using ´baseurl´ makes sense. If I get the same problem again, I'll try your workaround.

dact gravatar imagedact ( 2019-01-24 09:56:00 -0500 )edit

Either you get the problem always or just once in a while. If it is only once in a while, just try again later. If it is always, the work-around could be tried. And don't forget to report it to bugzilla.

The server might by busy synchronizing with the master repository and therefore temporarily not working.

villykruse gravatar imagevillykruse ( 2019-01-24 10:53:10 -0500 )edit
0

answered 2019-01-26 15:14:34 -0500

lovepump gravatar image

I would just like to add this is also happening to me.

I installed Fedora 29 in early November.

dnf (4.0.x) worked properly for 1 week.

Once it updated to dnf 4.0.9.1 I started getting these messages as well, however they were also accompanied by another message regarding "failovermethod" being an invalid option (as seen in each repo config file in /etc/yum.repos.d/"reponame")

Subsequent updates to version 4.0.9.2 have continued to produce both of these errors.

I have put a bug against dnf and fedora 29, here:

https://bugzilla.redhat.com/show_bug....

edit flag offensive delete link more

Comments

florian gravatar imageflorian ( 2019-01-28 07:31:13 -0500 )edit
-1

answered 2019-01-23 21:00:54 -0500

updated 2019-01-24 04:04:37 -0500

It is necessary to check whether the internet or network is working properly. The problem may be temporary and may be caused by network condition.

If you are experiencing a persistent error related to the problem, please let me know about the status error.

 [root@cugar simmon]# dnf upgrade --best --allowerasing
 [root@cugar simmon]# dnf clean all

I would like to get another answer from the answerer's perspective. How can I fix the problem? image description

I am in the same situation and looking for the answer. Do not look at the consequences of the problem, but hope it is a place where we solve problems using Fedora together.

The answer I got from F29 showed how to solve the problem in real screen. Such nonsense may be shown to me, but do not you think that the problem in actual operation may not be all that? Some people may see different results.

image description

Voting is not important. It is important that the interrogator or the respondent give the proper answer. If it's a really important issue, let's add it and let's understand that Fedora is leading the way in the right direction, even if the language we use is not perfect.

edit flag offensive delete link more

Comments

1

—allowerasing has really nothing to do with the issue here. OP also stated that dnf clean didn’t fix the problem.

florian gravatar imageflorian ( 2019-01-24 00:23:25 -0500 )edit

@florian.....Then answer the solution!!

simmon gravatar imagesimmon ( 2019-01-24 00:39:57 -0500 )edit
2

In most cases the solution is to wait an hour or so and then retry.

villykruse gravatar imagevillykruse ( 2019-01-24 02:02:59 -0500 )edit

I tend to think positively about any answer. But this does not seem to be that way.

simmon gravatar imagesimmon ( 2019-01-24 02:05:44 -0500 )edit
2

I upvoted your suggestion above. I would even upvote your answer here but dnf upgrade --allowerasing followed by dnf clean all makes no sense.

florian gravatar imageflorian ( 2019-01-24 02:07:55 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2019-01-23 14:30:48 -0500

Seen: 178 times

Last updated: Jan 26