Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
mithatOffline
Post subject: apt Hash Sum mismatch  PostPosted: 17.02.2014, 19:55



Joined: 2011-12-15
Posts: 23

Status: Offline
For at least a week now, I've been bitten by Debian bug #624122, e.g.:
      Code:
Failed to fetch http://cdn.debian.net/debian/dists/sid/main/binary-i386/PackagesIndex  Hash Sum mismatch


A few messages in the bug report suggest a temporary suggestion of deleting /var/lib/apt/lists. I did that, and it worked.

Now I'm wondering about a permanent solution. Does the latest apt fix this? If not, am I best off with de-commenting:
      Code:
// Acquire::PDiffs "0";
in my 80aptosid file, or with adding:
      Code:
APT::Get::List-Cleanup false
to that or another file (e.g., 90local), or with some other solution?
 
 View user's profile Send private message  
Reply with quote Back to top
slhOffline
Post subject: RE: apt Hash Sum mismatch  PostPosted: 17.02.2014, 23:57



Joined: 2010-08-25
Posts: 724

Status: Offline
cdn.debian.net is a way to provide some level of load balancing for the Debian repos in use, rather than directing all users to a single mirror and thereby both overloading it and potentially pushing users around half the world to reach it. The technology behind it is a round-robin DNS with regional steering, which means no one of us (from different regions/ using different ISPs) can reproduce which mirror you end up with.

As such it is always better to replace the generic cdn.debian.net entry explicitly with a local mirror from Debian's mirror network, please follow our manual for the details.
 
 View user's profile Send private message  
Reply with quote Back to top
dorinOffline
Post subject: RE: apt Hash Sum mismatch  PostPosted: 18.02.2014, 10:17



Joined: 2011-01-20
Posts: 18
Location: Vatra Dornei, Romania
Status: Offline
Try this http://http.debian.net/
I use-it for few weeks and look promises.
 
 View user's profile Send private message  
Reply with quote Back to top
DonKultOffline
Post subject: RE: apt Hash Sum mismatch  PostPosted: 18.02.2014, 12:24
Team Member


Joined: 2010-09-02
Posts: 481

Status: Offline
It is likely that you don't need to do anything at all.

99% of these hashsum mismatches are temporary in nature as you hit them then a mirror is syncing. This can be multiple GB's of data the mirror has to pull from an other mirror to update itself which can take quiet a while. The sync process tries to minimize the window in which users are served with conflicting information (= you get some files and some new files), but that window isn't non-existing, so sometimes users are hit. This depends HEAVILY on the mirror you use, the version of the sync-script (as it is improved all the time, but not all mirror admins install new versions regularly – or at all…) and the time of the day you try to update.

http.debian.net is in so far better than cdn.debian.net as it reduces the set of mirrors to those which have a recent sync-script and are "behaving" well in other areas too (which is still a lot of mirrors), but it isn't bulletproof either. Temporary mismatches can happen with it, too.

What usually help regardless of mirror chosen is waiting a few minutes and running "apt-get update" again. It usually succeeds then…


btw: DON'T disable list-cleanup. It was exactly the problem leading to the recent activity in the bugreport. Keep it as it is by default (which is enabled for good reason). Also, you don't have to disable pdiffs. They were slow in the past (which was the main reason people disabled them), but they are for a few weeks now a lot faster (which also fixes the cpu and failing part of the comment in this file).


Disclaimer: I am "David K." in this bugreport and I am responsible for most of the bugs in apt in the last few years – and sometimes I am even fixing them Wink

_________________
MfG. DonKult
"I never make stupid mistakes. Only very, very clever ones." ~ The Doctor
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 12 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by Zafenio