do-release-upgrade crashes immediately with apt-cacher-ng proxy

Bug #1509176 reported by Nick B.
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
apt-cacher-ng (Ubuntu)
Fix Released
Undecided
Unassigned
ubuntu-release-upgrader (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

I tried launching the upgrade to 15.10 from the muon-updater window but nothing happened. So I manually ran the command and it crashes immediately.

> do-release-upgrade -m desktop -f DistUpgradeViewKDE
Checking for a new Ubuntu release
kde
kf5.kiconthemes: "Theme tree: (Breeze)"
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeFetcherKDE.py", line 157, in showReleaseNotes
    release_notes = urlopen(uri)
  File "/usr/lib/python3.4/urllib/request.py", line 161, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.4/urllib/request.py", line 469, in open
    response = meth(req, response)
  File "/usr/lib/python3.4/urllib/request.py", line 579, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python3.4/urllib/request.py", line 507, in error
    return self._call_chain(*args)
  File "/usr/lib/python3.4/urllib/request.py", line 441, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.4/urllib/request.py", line 587, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: Forbidden file type or location: http://archive.ubuntu.com/ubuntu/dists/wily-updates/main/dist-upgrader-all/current/ReleaseAnnouncement.html?lang=en_US&os=kubuntu&ver=15.10

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/do-release-upgrade", line 165, in <module>
    fetcher.run()
  File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeFetcherCore.py", line 275, in run
    if not self.showReleaseNotes():
  File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeFetcherKDE.py", line 165, in showReleaseNotes
    self._warning(primary + "<br />" + secondary)
AttributeError: 'DistUpgradeFetcherKDE' object has no attribute '_warning'

Opening the URL in a browser results in no error, so I'm not sure why it's getting a 403.

I'm currently unable to upgrade because of this.

ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: ubuntu-release-upgrader-core 1:15.04.14.2
ProcVersionSignature: Ubuntu 3.19.0-31.36-generic 3.19.8-ckt7
Uname: Linux 3.19.0-31-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.17.2-0ubuntu1.5
Architecture: amd64
CrashDB: ubuntu
CurrentDesktop: KDE
Date: Thu Oct 22 23:50:15 2015
InstallationDate: Installed on 2011-10-22 (1461 days ago)
InstallationMedia: Kubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
PackageArchitecture: all
SourcePackage: ubuntu-release-upgrader
UpgradeStatus: Upgraded to vivid on 2015-04-25 (180 days ago)

Revision history for this message
Nick B. (futurepilot) wrote :
Revision history for this message
Nick B. (futurepilot) wrote :

This is actually caused by an apt-cacher-ng proxy

Nick B. (futurepilot)
summary: - do-release-upgrade crashes immediately because of HTTP 403 error
+ do-release-upgrade crashes immediately with apt-cacher-ng proxy
Revision history for this message
Brian Murray (brian-murray) wrote :

The traceback due to _warning is documented in bug 1507885.

Revision history for this message
Maddes (maddes.b) wrote :

If you want to run "do-release-upgrade" with apt-cacher then make sure that the apt-cacher option "ubuntu_release_names" contains the new release code name you want to upgrade to.

I wanted to update Ubuntu via console from 15.04 "vivid" to 15.10 "wily" and got the following errors on console:

Checking for a new Ubuntu release
Err Upgrade tool signature
  403 Sorry, not allowed to fetch that type of file: wily.tar.gz.gpg
Err Upgrade tool
  403 Sorry, not allowed to fetch that type of file: wily.tar.gz
Fetched 0 B in 0s (0 B/s)
WARNING:root:file 'wily.tar.gz.gpg' missing
Failed to fetch
Fetching the upgrade failed. There may be a network problem.

To fix this problem I created a new config file (/etc/apt-cacher/conf.d/99ubuntu) from the default configuration (/etc/apt-cacher/apt-cacher.conf), edited it to uncomment the line and added all missing code names from http://releases.ubuntu.com/

grep '^#*ubuntu_release_names' /etc/apt-cacher/apt-cacher.conf >/etc/apt-cacher/conf.d/99ubuntu
nano /etc/apt-cacher/conf.d/99ubuntu

Then "do-release-upgrade" worked with apt-cacher.

Kind regards
Maddes

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in apt-cacher-ng (Ubuntu):
status: New → Confirmed
Changed in ubuntu-release-upgrader (Ubuntu):
status: New → Confirmed
Revision history for this message
Maddes (maddes.b) wrote :

Added a suggestion to avoid this in the future in https://bugs.launchpad.net/bugs/1548468

Revision history for this message
Nick B. (futurepilot) wrote :

This won't work for apt-cacher-ng as all the configs are completely different.

Revision history for this message
Rolf Leggewie (r0lf) wrote :

Reassigning to apt-cacher as that is what the OP is using. This has got nothing to do with acng.

affects: apt-cacher-ng (Ubuntu) → apt-cacher (Ubuntu)
summary: - do-release-upgrade crashes immediately with apt-cacher-ng proxy
+ do-release-upgrade crashes immediately with apt-cacher proxy
Revision history for this message
Nick B. (futurepilot) wrote : Re: do-release-upgrade crashes immediately with apt-cacher proxy

No. I am OP and acng /is/ what I am using.

affects: apt-cacher (Ubuntu) → apt-cacher-ng (Ubuntu)
summary: - do-release-upgrade crashes immediately with apt-cacher proxy
+ do-release-upgrade crashes immediately with apt-cacher-ng proxy
Revision history for this message
Nick B. (futurepilot) wrote :

Please read carefully. Someone posted unrelated apt-cacher stuff here.

Revision history for this message
Eduard Bloch (edi-gmx) wrote :

Ok, I made some adaptions on the current HEAD which makes, at least for me, make do-release-upgrade work properly. If anyone volunteers to test, try this:

git clone https://alioth.debian.org/anonscm/git/apt-cacher-ng/apt-cacher-ng.git
...
git checkout debian/sid
dpkg-buildpackage -us -uc
(install any build-dependencies if asked for)
Install the new package

Revision history for this message
Nick B. (futurepilot) wrote : Re: [Bug 1509176] Re: do-release-upgrade crashes immediately with apt-cacher-ng proxy

I built packages with your changes and can confirm do-release-upgrade works
properly now. The release notes are correctly fetched. Thanks!

On Wednesday, February 24, 2016 08:18:30 AM Eduard Bloch wrote:
> Ok, I made some adaptions on the current HEAD which makes, at least for
> me, make do-release-upgrade work properly. If anyone volunteers to test,
> try this:
>
> git clone
> https://alioth.debian.org/anonscm/git/apt-cacher-ng/apt-cacher-ng.git ...
> git checkout debian/sid
> dpkg-buildpackage -us -uc
> (install any build-dependencies if asked for)
> Install the new package

Changed in ubuntu-release-upgrader (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
Eduard Bloch (edi-gmx) wrote :

Actually, no, I don't agree on "Confirmed → Invalid". The stupid kind of crashing is something you still need to deal with.

Revision history for this message
Nick B. (futurepilot) wrote :

The crash itself is bug 1507885

Revision history for this message
Eduard Bloch (edi-gmx) wrote :

I released version 0.9.1 today to Debian with the fixes mentioned above.

Revision history for this message
Rolf Leggewie (r0lf) wrote :

Is this something that we should backport the fix to trusty? If clients that fetch from a proxy running on trusty might run into this issue, then yes, we should backport his.

Revision history for this message
Logan Rosen (logan) wrote :

apt-cacher-ng 0.9.1 is now in Xenial.

Changed in apt-cacher-ng (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.