无法更新 MAAS 节点,apt-get update 失败并出现错误 503

无法更新 MAAS 节点,apt-get update 失败并出现错误 503

不确定是否相关,但我刚刚更新到 MAAS 1.9,两天以来,apt-get update 在所有 MAAS 节点上都失败了。我有其他非 MAAS 节点,它们工作正常,尽管它们使用本地存储库而不是 archive.ubuntu.com。

以下是 apt-get update 的输出。

ubuntu@machine:~$ sudo apt-get update
Ign http://archive.ubuntu.com trusty InRelease
Ign http://archive.ubuntu.com trusty-updates InRelease
Ign http://archive.ubuntu.com trusty-security InRelease
Ign http://archive.ubuntu.com trusty Release.gpg
Ign http://archive.ubuntu.com trusty-updates Release.gpg
Ign http://archive.ubuntu.com trusty-security Release.gpg
Ign http://archive.ubuntu.com trusty Release
Ign http://archive.ubuntu.com trusty-updates Release
Ign http://archive.ubuntu.com trusty-security Release
Ign http://archive.ubuntu.com trusty/main amd64 Packages/DiffIndex
Hit http://qgis.org trusty InRelease
Ign http://archive.ubuntu.com trusty/restricted amd64 Packages/DiffIndex
Ign http://archive.ubuntu.com trusty/universe amd64 Packages/DiffIndex
Ign http://archive.ubuntu.com trusty/multiverse amd64 Packages/DiffIndex
Get:1 http://archive.ubuntu.com trusty/main Translation-en [762 kB]
Hit http://qgis.org trusty/main Sources
Hit http://qgis.org trusty/main amd64 Packages
Get:2 http://archive.ubuntu.com trusty/multiverse Translation-en [102 kB]
Get:3 http://archive.ubuntu.com trusty/restricted Translation-en [3,457 B]
Get:4 http://archive.ubuntu.com trusty/universe Translation-en [4,089 kB]
Ign http://qgis.org trusty/main Translation-en_US
Ign http://qgis.org trusty/main Translation-en
Ign http://archive.ubuntu.com trusty-updates/main amd64 Packages/DiffIndex
Ign http://archive.ubuntu.com trusty-updates/restricted amd64 Packages/DiffIndex
Ign http://archive.ubuntu.com trusty-updates/universe amd64 Packages/DiffIndex
Ign http://archive.ubuntu.com trusty-updates/multiverse amd64 Packages/DiffIndex
Ign http://archive.ubuntu.com trusty-security/main amd64 Packages/DiffIndex
Ign http://archive.ubuntu.com trusty-security/restricted amd64 Packages/DiffIndex
Ign http://archive.ubuntu.com trusty-security/universe amd64 Packages/DiffIndex
Ign http://archive.ubuntu.com trusty-security/multiverse amd64 Packages/DiffIndex
Get:5 http://archive.ubuntu.com trusty-updates/main Translation-en [422 kB]
Get:6 http://archive.ubuntu.com trusty-updates/multiverse Translation-en [6,863 B]
Get:7 http://archive.ubuntu.com trusty-updates/universe Translation-en [222 kB]
Ign http://archive.ubuntu.com trusty/main Translation-en_US
Ign http://archive.ubuntu.com trusty/multiverse Translation-en_US
Ign http://archive.ubuntu.com trusty/restricted Translation-en_US
Ign http://archive.ubuntu.com trusty/universe Translation-en_US
Ign http://archive.ubuntu.com trusty-updates/main Translation-en_US
Ign http://archive.ubuntu.com trusty-updates/multiverse Translation-en_US
Ign http://archive.ubuntu.com trusty-updates/restricted Translation-en_US
Ign http://archive.ubuntu.com trusty-updates/restricted Translation-en
Ign http://archive.ubuntu.com trusty-updates/universe Translation-en_US
Ign http://archive.ubuntu.com trusty-security/main Translation-en_US
Ign http://archive.ubuntu.com trusty-security/main Translation-en
Ign http://archive.ubuntu.com trusty-security/multiverse Translation-en_US
Ign http://archive.ubuntu.com trusty-security/multiverse Translation-en
Ign http://archive.ubuntu.com trusty-security/restricted Translation-en_US
Ign http://archive.ubuntu.com trusty-security/restricted Translation-en
Ign http://archive.ubuntu.com trusty-security/universe Translation-en_US
Ign http://archive.ubuntu.com trusty-security/universe Translation-en
Err http://archive.ubuntu.com trusty/main amd64 Packages 503  Service Unavailable
Err http://archive.ubuntu.com trusty/restricted amd64 Packages 503  Service Unavailable
Err http://archive.ubuntu.com trusty/universe amd64 Packages 503  Service Unavailable
Err http://archive.ubuntu.com trusty/multiverse amd64 Packages 503  Service Unavailable
Err http://archive.ubuntu.com trusty-updates/main amd64 Packages 503  Service Unavailable
Err http://archive.ubuntu.com trusty-updates/restricted amd64 Packages 503  Service Unavailable
Err http://archive.ubuntu.com trusty-updates/universe amd64 Packages 503  Service Unavailable
Err http://archive.ubuntu.com trusty-updates/multiverse amd64 Packages 503  Service Unavailable
Err http://archive.ubuntu.com trusty-security/main amd64 Packages 503  Service Unavailable
Err http://archive.ubuntu.com trusty-security/restricted amd64 Packages 503  Service Unavailable
Err http://archive.ubuntu.com trusty-security/universe amd64 Packages 503  Service Unavailable
Err http://archive.ubuntu.com trusty-security/multiverse amd64 Packages 503  Service Unavailable
Fetched 5,607 kB in 20s (274 kB/s)
W: Failed to fetch http://archive.ubuntu.com//ubuntu/dists/trusty/main/binary-amd64/Packages  503  Service Unavailable
W: Failed to fetch http://archive.ubuntu.com//ubuntu/dists/trusty/restricted/binary-amd64/Packages 503  Service Unavailable
W: Failed to fetch http://archive.ubuntu.com//ubuntu/dists/trusty/universe/binary-amd64/Packages 503  Service Unavailable
W: Failed to fetch http://archive.ubuntu.com//ubuntu/dists/trusty/multiverse/binary-amd64/Packages 503  Service Unavailable
W: Failed to fetch http://archive.ubuntu.com//ubuntu/dists/trusty-updates/main/binary-amd64/Packages  503  Service Unavailable
W: Failed to fetch http://archive.ubuntu.com//ubuntu/dists/trusty-updates/restricted/binary-amd64/Packages  503  Service Unavailable
W: Failed to fetch http://archive.ubuntu.com//ubuntu/dists/trusty-updates/universe/binary-amd64/Packages  503  Service Unavailable
W: Failed to fetch http://archive.ubuntu.com//ubuntu/dists/trusty-updates/multiverse/binary-amd64/Packages  503  Service Unavailable
W: Failed to fetch http://archive.ubuntu.com//ubuntu/dists/trusty-security/main/binary-amd64/Packages  503  Service Unavailable
W: Failed to fetch http://archive.ubuntu.com//ubuntu/dists/trusty-security/restricted/binary-amd64/Packages  503  Service Unavailable
W: Failed to fetch http://archive.ubuntu.com//ubuntu/dists/trusty-security/universe/binary-amd64/Packages  503  Service Unavailable
W: Failed to fetch http://archive.ubuntu.com//ubuntu/dists/trusty-security/multiverse/binary-amd64/Packages  503  Service Unavailable
E: Some index files failed to download. They have been ignored, or old ones used instead.

我们可以看到,最后一个引用“//”的 URL 似乎存在问题,它来自 /etc/apt/sources.list,但这之前不是问题,因为更新工作正常,第三方 ppa 安装也工作正常。

在 sources.list 文件下方。

deb http://archive.ubuntu.com//ubuntu  trusty main restricted universe multiverse
deb http://archive.ubuntu.com//ubuntu  trusty-updates main restricted universe multiverse
deb http://archive.ubuntu.com//ubuntu  trusty-security main restricted universe multiverse
deb http://qgis.org/debian trusty main
deb-src http://qgis.org/debian trusty main

请注意,我能够看到使用 wget 失败的 url,但使用“Packages.gz”可以,而使用“Packages”则不行(使用 // 可以)。

任何帮助,将不胜感激。

答案1

显然 MAAS 1.9 升级和 apt 代理出了问题。注释掉 90curtin-aptproxy 中的代理设置行就可以解决问题。

ubuntu@machine:/etc/apt/apt.conf.d$ more 90curtin-aptproxy
#Acquire::HTTP::Proxy "http://<MAAS_IP>:8000/";

我现在可以运行 apt-get update 并根据需要升级 MAAS 节点。可能是 MAAS 中的配置没有更改并且是默认配置,这是一个错误。

相关内容