Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic: [DE] [gelöst] xz-Fehler bei apt-get update  (Read 5217 times)

Offline dieres

  • User
  • Posts: 786
[DE] [gelöst] xz-Fehler bei apt-get update
« on: 2014/04/12, 00:45:57 »
apt-get update schließt  z.Zt. immer mit folgendem Fehler:


Code: [Select]
Holen: 31 ftp://ftp2.de.debian.org unstable/non-free i386 Packages [88,0 kB]   
Es wurden 13,8 MB in 15 s geholt (869 kB/s).                                   
W: Fehlschlag beim Holen von xz:/var/lib/apt/lists/partial/ftp2.de.debian.org_debian_dists_unstable_main_binary-i386_Packages  Hash-Summe stimmt nicht überein


E: Einige Indexdateien konnten nicht heruntergeladen werden. Sie wurden ignoriert oder alte an ihrer Stelle benutzt.


wie bekomme ich das weg?
« Last Edit: 2014/04/16, 00:43:44 by musca »

Offline devil

  • Administrator
  • User
  • *****
  • Posts: 4.838
Re: fehler bei apt-get update
« Reply #1 on: 2014/04/12, 02:28:05 »
Versuch nen anderen Server anstelle von ftp2


greetz
devil





Offline melmarker

  • User
  • Posts: 2.799
    • g-com.eu
Re: fehler bei apt-get update
« Reply #2 on: 2014/04/12, 12:00:12 »
oder  besser: konfiguriere apt so um, dass gzip genutzt wird, xz ist momentan ein wenig sehr fehlerhaft
Those who would give up essential Liberty, to purchase a little temporary Safety, deserve neither Liberty nor Safety. (Benjamin Franklin, November 11, 1755)
Never attribute to malice that which can be adequately explained by stupidity. (Hanlons razor)

Offline dieres

  • User
  • Posts: 786
Re: fehler bei apt-get update
« Reply #3 on: 2014/04/12, 12:19:39 »
der Fehler hat sich von selbst erledigt  ;D

Offline melmarker

  • User
  • Posts: 2.799
    • g-com.eu
Re: fehler bei apt-get update
« Reply #4 on: 2014/04/12, 12:27:13 »
dieres: musca hatte da was gefunden und schreibt das hoffentlich ins wiki. is irgend was mysteriösen mit abschneiden von daten aus den übertragenen sachen. DonKult hat das auch schon auf dem Schirm, sicherer wäre das umstellen auf gzip für die Listen, ansonsten ist und bleibt das Roulette
Those who would give up essential Liberty, to purchase a little temporary Safety, deserve neither Liberty nor Safety. (Benjamin Franklin, November 11, 1755)
Never attribute to malice that which can be adequately explained by stupidity. (Hanlons razor)

Offline dieres

  • User
  • Posts: 786
Re: fehler bei apt-get update
« Reply #5 on: 2014/04/13, 11:15:10 »
Wo finde ich wie man die Listen auf gzip umstellt? Wird das im nächsten Relaese gleich mit gzip realisiert?

Offline melmarker

  • User
  • Posts: 2.799
    • g-com.eu
Re: fehler bei apt-get update
« Reply #6 on: 2014/04/13, 16:18:22 »
wenn die Fehler in xz bis dahin nicht behoben sind - ja. Es ist halt das Wesen von sid, dass manchmal Dinge kaputtgehen. Und auch gefixt werden. Und ich denke, dass die Lösung dieses Probems nicht allzulange auf sich warten lässt, da ja genau bekannt ist, was zu welchem Zeitpunkt schiefgeht.
Those who would give up essential Liberty, to purchase a little temporary Safety, deserve neither Liberty nor Safety. (Benjamin Franklin, November 11, 1755)
Never attribute to malice that which can be adequately explained by stupidity. (Hanlons razor)

Offline Geier0815

  • User
  • Posts: 586
Re: fehler bei apt-get update
« Reply #7 on: 2014/04/14, 22:17:01 »
Starte mal ein dist-upgrade und guck ob Du eine neue Version von apt bekommen sollst. War bei mir der Fall und nach dem d-u funktionierte apt-get update auch wieder richtig. Kann selbstverständlich auch nur Zufall gewesen sein. Es besteht natürlich immer ein Risiko, von daher auf jeden Fall genau hingucken was das d-u machen will!
Der wahrscheinlich sicherere Weg wäre per apt-cache policy und apt-get install. Aber wie gesagt: Ich weiß nicht ob es an der neueren Version von apt lag, an etwas anderem beim d-u oder einfach nur Zufall war.
Wenn Windows die Lösung ist...
kann ich dann bitte das Problem zurück haben?

Offline musca

  • User
  • Posts: 725
  • sid, fly high!
Gelöst: fehler bei apt-get update
« Reply #8 on: 2014/04/15, 12:33:19 »
Hello,

Since many years i see people asking why their update fails, and the answer always has been the mirror was faulty and they could wait or change their sources.list to an other mirror. So i continously have been playing around and used a lot of different tricks. E.g. in the beginning the siduction repos were delivered as FTP-Links and we changed the protocol for the ftp-servers to http. Shortly after this episode the redirector method of http.debian.net became popular. The redirector checks its mirrors every three minutes and so greatly enhances the quality of updates. I happily used it through the year 2013.
 But after haveing only very occasionally an issue in 2013 the service remarkably increased the number of failures in december 2013 and i began to jump back and forward between two mirrors again. Another successful strategy was waiting: Sometimes the bug just vanishes over night.  Eventually i noticed that after changing my sources a download of the whole package lists from the new mirror occured. So i suspected the Pdiffs to be faulty and i worked out things like this in the beginning of 2014:
Code: [Select]
LANG=C apt-get update || LANG=C apt-get -o Acquire::Pdiffs=false update && LANG=C apt-get -dy dist-upgrade
|| is the lazy evaluating boolean OR in bash: so only if the first "apt-get update" fails it is repeated by omitting the pdiffs and thus downloading the whole lists.

Later I was told that apt-get would not always give correct return values und so i wrote this little check in bash to match the word "Failed" or "failed" and then try again.
Code: [Select]
RegEx='*[Ff]ailed*' ; if output=$(LANG=C apt-get update 2>&1) && [[ $output == $RegEx ]] ; then apt-get -o "Acquire::Pdiffs=false" update ; else echo -e "$output" ; fi

Even the opposite was true: avoiding pdiffs and downloading the complete lists wouldn't safe you from the bug. But then you could switch to using Pdiffs and your update would succeed. WTF is going on here?

[solved]

This recent bug report apt-get corrupts ..on running unxz has a predecessor Hash Sum mismatch. I like it how the bug report starts with " Could you please fix this soon. " because it has been opened three years ago on 2011/04/26. Apparently it was never solved but rather hijacked in january 2014 and used for tracking the xz bug.

Suggested workarounds have been in two similar forms:

Code: [Select]
LANG=C apt-get -o 'Acquire::CompressionTypes::Order::="gz"' update
LANG=C apt-get -o 'Acquire::CompressionTypes::Order::={"gz";}' update

If -o doesn't help, then you still can try to add this line to /etc/apt/apt.conf:
Code: [Select]
Acquire::CompressionTypes::Order:: "gz"
While testing theese workarounds you might want to increase the verbosity by addding this debug option:
Code: [Select]
-o 'Debug::Acquire::http=true'
Apparently the bug was finally fixed with apt version 1.0 on 2014/04/01 (no fool's joke).

And so I would like to conclude with a citation from the #debian-next irc channel on irc.oftc.net:
<SynrG> i had commented earlier "i don't know if long-term this does anything but move the problem around" or something to that effect.

In other words: All workarounds just tend to push the real issue behind the event horizon.

greetings
musca


P.S. I have seen several hash sum mismatches this week. The bug may live long and prosper!

« Last Edit: 2014/04/15, 21:13:42 by musca »
„Es irrt der Mensch, solang er strebt.“  (Goethe, Faust)

Offline melmarker

  • User
  • Posts: 2.799
    • g-com.eu
Re: fehler bei apt-get update
« Reply #9 on: 2014/04/15, 13:40:59 »
Im speziellen meinte ich diese Antwort auf die Fragen aller Fragen - was karpott gehen kann, kaputt gehen wird - und was wahrscheinlich gefixt ist :)

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=624122#141
Those who would give up essential Liberty, to purchase a little temporary Safety, deserve neither Liberty nor Safety. (Benjamin Franklin, November 11, 1755)
Never attribute to malice that which can be adequately explained by stupidity. (Hanlons razor)