[Bug 940825] Re: apt-get update reporting "not acceptable"
Sebastian Marsching
sebastian at marsching.com
Sat Sep 7 21:14:46 UTC 2013
This problem seems to appear when a file has been partially downloaded
to /var/lib/apt/lists/partial and the server does not support request
ranges. Here is the error I got when running "aptitude update" and the
corresponding HTTP requests / responses:
[...]
Err http://de.archive.ubuntu.com precise-updates/universe i386 Packages
406 Not Acceptable [IP: 141.30.13.20 80]
[...]
W: Failed to fetch http://de.archive.ubuntu.com/ubuntu/dists/precise-updates/universe/binary-i386/Packages 406 Not Acceptable [IP: 141.30.13.20 80]
E: Some index files failed to download. They have been ignored, or old
ones used instead.
The HTTP requests and responses for this file are:
GET /ubuntu/dists/precise-updates/universe/binary-i386/Packages.bz2 HTTP/1.1
Host: de.archive.ubuntu.com
Connection: keep-alive
Cache-Control: max-age=0
Range: bytes=15556-
If-Range: Fri, 06 Sep 2013 23:35:00 GMT
User-Agent: Debian APT-HTTP/1.3 (0.8.16~exp12ubuntu10.12)
HTTP/1.1 416 Requested Range Not Satisfiable
Date: Sat, 07 Sep 2013 17:51:48 GMT
Connection: keep-alive
Server: ATS/3.0.5
Content-Length: 0
GET /ubuntu/dists/precise-updates/universe/binary-i386/Packages.gz HTTP/1.1
Host: de.archive.ubuntu.com
Connection: keep-alive
Cache-Control: max-age=0
Range: bytes=15556-
If-Range: Fri, 06 Sep 2013 23:35:00 GMT
User-Agent: Debian APT-HTTP/1.3 (0.8.16~exp12ubuntu10.12)
HTTP/1.1 416 Requested Range Not Satisfiable
Date: Sat, 07 Sep 2013 17:51:48 GMT
Connection: keep-alive
Server: ATS/3.0.5
Content-Length: 0
GET /ubuntu/dists/precise-updates/universe/binary-i386/Packages HTTP/1.1
Host: de.archive.ubuntu.com
Connection: keep-alive
Cache-Control: max-age=0
Accept: text/*
Range: bytes=15556-
If-Range: Fri, 06 Sep 2013 23:35:00 GMT
User-Agent: Debian APT-HTTP/1.3 (0.8.16~exp12ubuntu10.12)
HTTP/1.1 406 Not Acceptable
Date: Sat, 07 Sep 2013 17:51:48 GMT
Server: ATS/3.0.5
Alternates: {"Packages.bz2" 1 {type application/x-bzip2} {length 219035}}, {"Packages.gz" 1 {type application/x-gzip} {length 279396}}
Vary: negotiate,accept,Accept-Encoding
TCN: list
Content-Length: 576
Content-Type: text/html; charset=iso-8859-1
Age: 0
Connection: keep-alive
[... response body omitted ...]
In this case the file /var/lib/apt/lists/partial/de.archive.ubuntu
.com_ubuntu_dists_precise-updates_universe_binary-i386_Packages had a
size of 15557 bytes.
So I think the following thing happens: Apt finds a partially downloaded
file, so it tries to continue downloading this file by sending a request
with the "Range" header set. The server cannot serve this request
(either because it does not support ranges or because the specified
range is invalid). Thus it sends a 416 response. Now Apt makes a
mistake: Instead of sending the request again without the "Range"
header, it proceeds to the next file (Packages.gz after Packages.bz2
failed and finally Packages). Funnily it uses the same range there.
I think there are two bugs regarding the download of partially download
files:
1) The start for the "Range" header is calculated from the file size on disk. However correct start depends on the type of the compression used. In my example, the file on disk was gzip compressed but the bzip2 version is requested first. Obviously Apt should only try to continue downloading a file with the same compression.
2) When a 416 error occurs, Apt proceeds to the next type of compression instead of trying to download the complete file again. This leads to problems when the server does not support ranges or the range specified is invalid for some reason. Apt should detect a 416 error and proceed with trying to download the complete file.
Maybe someone knowing the Apt code better can dig into it and find the
place where these changes need to be made.
As a workaround, when you are experiencing a 406 error, you can delete
the corresponding file(s) in /var/lib/apt/lists/partial. This fixed the
problem in my case.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/940825
Title:
apt-get update reporting "not acceptable"
Status in “apt” package in Ubuntu:
Confirmed
Bug description:
# apt-get update
Ign http://de.archive.ubuntu.com precise InRelease
Ign http://archive.canonical.com precise InRelease
Ign http://de.archive.ubuntu.com precise-updates InRelease
Ign http://ppa.launchpad.net oneiric InRelease
Ign http://ppa.launchpad.net oneiric InRelease
Ign http://ppa.launchpad.net oneiric InRelease
Ign http://us.archive.ubuntu.com precise InRelease
Ign http://us.archive.ubuntu.com precise-updates InRelease
Ign http://us.archive.ubuntu.com precise-backports InRelease
Ign http://de.archive.ubuntu.com precise-backports InRelease
Hit http://archive.canonical.com precise Release.gpg
Ign http://ppa.launchpad.net precise InRelease
Hit http://ppa.launchpad.net oneiric Release.gpg
Ign http://de.archive.ubuntu.com precise-security InRelease
Ign http://us.archive.ubuntu.com precise-security InRelease
Hit http://us.archive.ubuntu.com precise Release.gpg
Hit http://de.archive.ubuntu.com precise Release.gpg
Hit http://archive.canonical.com precise Release
Hit http://ppa.launchpad.net oneiric Release.gpg
Get:1 http://ppa.launchpad.net oneiric Release.gpg [316 B]
Hit http://us.archive.ubuntu.com precise-updates Release.gpg
Hit http://us.archive.ubuntu.com precise-backports Release.gpg
Hit http://de.archive.ubuntu.com precise-updates Release.gpg
Hit http://packages.medibuntu.org oneiric InRelease
Hit http://ppa.launchpad.net precise Release.gpg
Hit http://us.archive.ubuntu.com precise-security Release.gpg
Hit http://de.archive.ubuntu.com precise-backports Release.gpg
Hit http://archive.canonical.com precise/partner amd64 Packages
Hit http://ppa.launchpad.net oneiric Release
Hit http://ppa.launchpad.net oneiric Release
Hit http://us.archive.ubuntu.com precise Release
Hit http://us.archive.ubuntu.com precise-updates Release
Hit http://archive.canonical.com precise/partner i386 Packages
Ign http://archive.canonical.com precise/partner TranslationIndex
Hit http://ppa.launchpad.net oneiric Release
Hit http://us.archive.ubuntu.com precise-backports Release
Hit http://de.archive.ubuntu.com precise-security Release.gpg
Ign http://ppa.launchpad.net oneiric Release
Hit http://packages.medibuntu.org oneiric/free amd64 Packages
Hit http://ppa.launchpad.net precise Release
Hit http://us.archive.ubuntu.com precise-security Release
Hit http://ppa.launchpad.net oneiric/main amd64 Packages
Hit http://ppa.launchpad.net oneiric/main i386 Packages
Ign http://ppa.launchpad.net oneiric/main TranslationIndex
Hit http://ppa.launchpad.net oneiric/main amd64 Packages
Hit http://ppa.launchpad.net oneiric/main i386 Packages
Hit http://de.archive.ubuntu.com precise Release
Hit http://us.archive.ubuntu.com precise/main amd64 Packages
Hit http://us.archive.ubuntu.com precise/restricted amd64 Packages
Hit http://us.archive.ubuntu.com precise/universe amd64 Packages
Hit http://us.archive.ubuntu.com precise/multiverse amd64 Packages
Hit http://us.archive.ubuntu.com precise/main i386 Packages
Ign http://ppa.launchpad.net oneiric/main TranslationIndex
Hit http://us.archive.ubuntu.com precise/restricted i386 Packages
Hit http://us.archive.ubuntu.com precise/universe i386 Packages
Hit http://de.archive.ubuntu.com precise-updates Release
Ign http://ppa.launchpad.net oneiric/main amd64 Packages/DiffIndex
Ign http://ppa.launchpad.net oneiric/main i386 Packages/DiffIndex
Ign http://ppa.launchpad.net oneiric/main TranslationIndex
Hit http://ppa.launchpad.net precise/main Sources
Hit http://ppa.launchpad.net precise/main amd64 Packages
Hit http://us.archive.ubuntu.com precise/multiverse i386 Packages
Hit http://us.archive.ubuntu.com precise/main TranslationIndex
Hit http://us.archive.ubuntu.com precise/multiverse TranslationIndex
Hit http://us.archive.ubuntu.com precise/restricted TranslationIndex
Hit http://us.archive.ubuntu.com precise/universe TranslationIndex
Hit http://us.archive.ubuntu.com precise-updates/main amd64 Packages
Hit http://us.archive.ubuntu.com precise-updates/restricted amd64 Packages
Hit http://de.archive.ubuntu.com precise-backports Release
Hit http://packages.medibuntu.org oneiric/non-free amd64 Packages
Hit http://us.archive.ubuntu.com precise-updates/universe amd64 Packages
Hit http://ppa.launchpad.net precise/main i386 Packages
Ign http://ppa.launchpad.net precise/main TranslationIndex
Hit http://de.archive.ubuntu.com precise-security Release
Hit http://us.archive.ubuntu.com precise-updates/multiverse amd64 Packages
Hit http://us.archive.ubuntu.com precise-updates/main i386 Packages
Hit http://us.archive.ubuntu.com precise-updates/restricted i386 Packages
Hit http://us.archive.ubuntu.com precise-updates/universe i386 Packages
Hit http://us.archive.ubuntu.com precise-updates/multiverse i386 Packages
Hit http://de.archive.ubuntu.com precise/main amd64 Packages
Hit http://ppa.launchpad.net oneiric/main amd64 Packages
Hit http://ppa.launchpad.net oneiric/main i386 Packages
Hit http://us.archive.ubuntu.com precise-updates/main TranslationIndex
Hit http://us.archive.ubuntu.com precise-updates/multiverse TranslationIndex
Hit http://us.archive.ubuntu.com precise-updates/restricted TranslationIndex
Hit http://us.archive.ubuntu.com precise-updates/universe TranslationIndex
Hit http://de.archive.ubuntu.com precise/restricted amd64 Packages
Hit http://us.archive.ubuntu.com precise-backports/main amd64 Packages
Hit http://us.archive.ubuntu.com precise-backports/restricted amd64 Packages
Hit http://us.archive.ubuntu.com precise-backports/universe amd64 Packages
Hit http://us.archive.ubuntu.com precise-backports/multiverse amd64 Packages
Hit http://us.archive.ubuntu.com precise-backports/main i386 Packages
Hit http://packages.medibuntu.org oneiric/free i386 Packages
Hit http://de.archive.ubuntu.com precise/universe amd64 Packages
Hit http://us.archive.ubuntu.com precise-backports/restricted i386 Packages
Hit http://de.archive.ubuntu.com precise/multiverse amd64 Packages
Hit http://us.archive.ubuntu.com precise-backports/universe i386 Packages
Hit http://us.archive.ubuntu.com precise-backports/multiverse i386 Packages
Hit http://us.archive.ubuntu.com precise-backports/main TranslationIndex
Hit http://us.archive.ubuntu.com precise-backports/multiverse TranslationIndex
Hit http://us.archive.ubuntu.com precise-backports/restricted TranslationIndex
Hit http://de.archive.ubuntu.com precise/main i386 Packages
Hit http://us.archive.ubuntu.com precise-backports/universe TranslationIndex
Hit http://us.archive.ubuntu.com precise-security/main amd64 Packages
Hit http://us.archive.ubuntu.com precise-security/restricted amd64 Packages
Hit http://us.archive.ubuntu.com precise-security/universe amd64 Packages
Hit http://us.archive.ubuntu.com precise-security/multiverse amd64 Packages
Hit http://us.archive.ubuntu.com precise-security/main i386 Packages
Hit http://us.archive.ubuntu.com precise-security/restricted i386 Packages
Hit http://us.archive.ubuntu.com precise-security/universe i386 Packages
Hit http://us.archive.ubuntu.com precise-security/multiverse i386 Packages
Hit http://de.archive.ubuntu.com precise/restricted i386 Packages
Hit http://packages.medibuntu.org oneiric/non-free i386 Packages
Hit http://us.archive.ubuntu.com precise-security/main TranslationIndex
Hit http://us.archive.ubuntu.com precise-security/multiverse TranslationIndex
Hit http://us.archive.ubuntu.com precise-security/restricted TranslationIndex
Hit http://us.archive.ubuntu.com precise-security/universe TranslationIndex
Hit http://us.archive.ubuntu.com precise/main Translation-en
Hit http://us.archive.ubuntu.com precise/main Translation-de
Hit http://de.archive.ubuntu.com precise/multiverse i386 Packages
Hit http://us.archive.ubuntu.com precise/multiverse Translation-en
Hit http://us.archive.ubuntu.com precise/multiverse Translation-de
Hit http://us.archive.ubuntu.com precise/restricted Translation-en
Hit http://us.archive.ubuntu.com precise/restricted Translation-de
Hit http://us.archive.ubuntu.com precise/universe Translation-en
Hit http://us.archive.ubuntu.com precise/universe Translation-de
Hit http://us.archive.ubuntu.com precise-updates/main Translation-en
Hit http://us.archive.ubuntu.com precise-updates/multiverse Translation-en
Hit http://us.archive.ubuntu.com precise-updates/restricted Translation-en
Hit http://de.archive.ubuntu.com precise/main TranslationIndex
Ign http://packages.medibuntu.org oneiric/free TranslationIndex
Hit http://us.archive.ubuntu.com precise-updates/universe Translation-en
Hit http://de.archive.ubuntu.com precise/multiverse TranslationIndex
Hit http://us.archive.ubuntu.com precise-backports/main Translation-en
Hit http://us.archive.ubuntu.com precise-backports/multiverse Translation-en
Hit http://us.archive.ubuntu.com precise-backports/restricted Translation-en
Hit http://us.archive.ubuntu.com precise-backports/universe Translation-en
Hit http://us.archive.ubuntu.com precise-security/main Translation-en
Hit http://de.archive.ubuntu.com precise/restricted TranslationIndex
Hit http://us.archive.ubuntu.com precise-security/multiverse Translation-en
Hit http://us.archive.ubuntu.com precise-security/restricted Translation-en
Hit http://us.archive.ubuntu.com precise-security/universe Translation-en
Hit http://de.archive.ubuntu.com precise/universe TranslationIndex
Ign http://packages.medibuntu.org oneiric/non-free TranslationIndex
Hit http://de.archive.ubuntu.com precise-updates/main amd64 Packages
Ign http://archive.canonical.com precise/partner Translation-en_US
Hit http://de.archive.ubuntu.com precise-updates/restricted amd64 Packages
Hit http://de.archive.ubuntu.com precise-updates/universe amd64 Packages
Hit http://de.archive.ubuntu.com precise-updates/multiverse amd64 Packages
Ign http://archive.canonical.com precise/partner Translation-en
Hit http://de.archive.ubuntu.com precise-updates/main i386 Packages
Ign http://ppa.launchpad.net oneiric/main Translation-en_US
Ign http://ppa.launchpad.net oneiric/main Translation-en
Ign http://archive.canonical.com precise/partner Translation-de
Hit http://de.archive.ubuntu.com precise-updates/restricted i386 Packages
Hit http://de.archive.ubuntu.com precise-updates/universe i386 Packages
Hit http://de.archive.ubuntu.com precise-updates/multiverse i386 Packages
Ign http://ppa.launchpad.net oneiric/main Translation-de
Ign http://ppa.launchpad.net oneiric/main Translation-en_US
Ign http://ppa.launchpad.net oneiric/main Translation-en
Ign http://ppa.launchpad.net oneiric/main Translation-de
Ign http://ppa.launchpad.net oneiric/main Translation-en_US
Ign http://ppa.launchpad.net oneiric/main Translation-en
Hit http://de.archive.ubuntu.com precise-updates/main TranslationIndex
Hit http://de.archive.ubuntu.com precise-updates/multiverse TranslationIndex
Ign http://ppa.launchpad.net oneiric/main Translation-de
Ign http://ppa.launchpad.net precise/main Translation-en_US
Ign http://ppa.launchpad.net precise/main Translation-en
Ign http://ppa.launchpad.net precise/main Translation-de
Hit http://de.archive.ubuntu.com precise-updates/restricted TranslationIndex
Hit http://de.archive.ubuntu.com precise-updates/universe TranslationIndex
Hit http://de.archive.ubuntu.com precise-backports/main amd64 Packages
Hit http://de.archive.ubuntu.com precise-backports/restricted amd64 Packages
Hit http://de.archive.ubuntu.com precise-backports/universe amd64 Packages
Hit http://de.archive.ubuntu.com precise-backports/multiverse amd64 Packages
Hit http://de.archive.ubuntu.com precise-backports/main i386 Packages
Hit http://de.archive.ubuntu.com precise-backports/restricted i386 Packages
Hit http://de.archive.ubuntu.com precise-backports/universe i386 Packages
Hit http://de.archive.ubuntu.com precise-backports/multiverse i386 Packages
Hit http://de.archive.ubuntu.com precise-backports/main TranslationIndex
Hit http://de.archive.ubuntu.com precise-backports/multiverse TranslationIndex
Hit http://de.archive.ubuntu.com precise-backports/restricted TranslationIndex
Hit http://de.archive.ubuntu.com precise-backports/universe TranslationIndex
Hit http://de.archive.ubuntu.com precise-security/main amd64 Packages
Hit http://de.archive.ubuntu.com precise-security/restricted amd64 Packages
Hit http://de.archive.ubuntu.com precise-security/universe amd64 Packages
Hit http://de.archive.ubuntu.com precise-security/multiverse amd64 Packages
Hit http://de.archive.ubuntu.com precise-security/main i386 Packages
Hit http://de.archive.ubuntu.com precise-security/restricted i386 Packages
Hit http://de.archive.ubuntu.com precise-security/universe i386 Packages
Hit http://de.archive.ubuntu.com precise-security/multiverse i386 Packages
Hit http://de.archive.ubuntu.com precise-security/main TranslationIndex
Hit http://de.archive.ubuntu.com precise-security/multiverse TranslationIndex
Hit http://de.archive.ubuntu.com precise-security/restricted TranslationIndex
Hit http://de.archive.ubuntu.com precise-security/universe TranslationIndex
Hit http://de.archive.ubuntu.com precise/main Translation-en
Hit http://de.archive.ubuntu.com precise/main Translation-de
Hit http://de.archive.ubuntu.com precise/multiverse Translation-en
Hit http://de.archive.ubuntu.com precise/multiverse Translation-de
Hit http://de.archive.ubuntu.com precise/restricted Translation-en
Hit http://de.archive.ubuntu.com precise/restricted Translation-de
Hit http://de.archive.ubuntu.com precise/universe Translation-en
Hit http://de.archive.ubuntu.com precise/universe Translation-de
Hit http://de.archive.ubuntu.com precise-updates/main Translation-en
Hit http://de.archive.ubuntu.com precise-updates/multiverse Translation-en
Hit http://de.archive.ubuntu.com precise-updates/restricted Translation-en
Hit http://de.archive.ubuntu.com precise-updates/universe Translation-en
Hit http://de.archive.ubuntu.com precise-backports/main Translation-en
Hit http://de.archive.ubuntu.com precise-backports/multiverse Translation-en
Hit http://de.archive.ubuntu.com precise-backports/restricted Translation-en
Hit http://de.archive.ubuntu.com precise-backports/universe Translation-en
Hit http://de.archive.ubuntu.com precise-security/main Translation-en
Hit http://de.archive.ubuntu.com precise-security/multiverse Translation-en
Hit http://de.archive.ubuntu.com precise-security/restricted Translation-en
Hit http://de.archive.ubuntu.com precise-security/universe Translation-en
Err http://de.archive.ubuntu.com precise/universe i386 Packages
406 Not Acceptable [IP: 141.30.13.30 80]
Ign http://packages.medibuntu.org oneiric/free Translation-en_US
Ign http://packages.medibuntu.org oneiric/free Translation-en
Ign http://packages.medibuntu.org oneiric/free Translation-de
Ign http://packages.medibuntu.org oneiric/non-free Translation-en_US
Ign http://packages.medibuntu.org oneiric/non-free Translation-en
Ign http://packages.medibuntu.org oneiric/non-free Translation-de
Fetched 316 B in 4s (66 B/s)
W: Failed to fetch http://de.archive.ubuntu.com/ubuntu/dists/precise/universe/binary-i386/Packages 406 Not Acceptable [IP: 141.30.13.30 80]
E: Some index files failed to download. They have been ignored, or old
ones used instead.
But then trying using wget:
# wget -nd http://de.archive.ubuntu.com/ubuntu/dists/precise/universe/binary-i386/Packages
--2012-02-25 09:32:06-- http://de.archive.ubuntu.com/ubuntu/dists/precise/universe/binary-i386/Packages
Resolving de.archive.ubuntu.com (de.archive.ubuntu.com)... 141.30.13.20, 141.30.13.10, 141.30.13.30
Connecting to de.archive.ubuntu.com (de.archive.ubuntu.com)|141.30.13.20|:80... connected.
HTTP request sent, awaiting response... 406 Not Acceptable
2012-02-25 09:32:06 ERROR 406: Not Acceptable.
# wget -nd http://de.archive.ubuntu.com/ubuntu/dists/precise/universe/binary-i386/Packages
--2012-02-25 09:29:15-- http://de.archive.ubuntu.com/ubuntu/dists/precise/universe/binary-i386/Packages
Resolving de.archive.ubuntu.com (de.archive.ubuntu.com)... 141.30.13.30, 141.30.13.10, 141.30.13.20
Connecting to de.archive.ubuntu.com (de.archive.ubuntu.com)|141.30.13.30|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4806777 (4,6M) [application/x-bzip2]
Saving to: `Packages'
100%[==================================================================================>]
4.806.777 1,30M/s in 3,5s
2012-02-25 09:29:19 (1,30 MB/s) - `Packages' saved [4806777/4806777]
I don't know whom to contact about this error (141.30.13.30 is
working, 141.30.13.20 is not)
ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: apt 0.8.16~exp12ubuntu4
ProcVersionSignature: Ubuntu 3.2.0-17.26-generic 3.2.6
Uname: Linux 3.2.0-17-generic x86_64
ApportVersion: 1.93-0ubuntu2
Architecture: amd64
Date: Sat Feb 25 09:30:19 2012
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Beta amd64 (20110901)
SourcePackage: apt
UpgradeStatus: Upgraded to precise on 2012-02-21 (3 days ago)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/940825/+subscriptions
More information about the foundations-bugs
mailing list