Ubuntu 22.04-apt 503 服务不可用

Ubuntu 22.04-apt 503 服务不可用

我在使用 apt 和源列表时遇到了麻烦。尽管 URL 可以使用 curl,但我还是不断收到 503 错误。其他 repo(例如 zabbix)可以正常工作。

无需设置代理,也无需设置。欢迎提供任何有关此方面的提示。我查看了其他几篇有关 APT 503 错误的文章,但没有一篇能解决我的问题。

因此欢迎任何建议。

root@geda-zabbix:~# apt update
Ign:1 http://archive.ubuntu.com/ubuntu jammy InRelease
Ign:2 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
Ign:3 http://archive.ubuntu.com/ubuntu jammy-backports InRelease
Ign:4 http://archive.ubuntu.com/ubuntu jammy-security InRelease
Hit:5 https://repo.zabbix.com/zabbix-agent2-plugins/1/ubuntu jammy InRelease
Hit:6 https://repo.zabbix.com/zabbix/6.4/ubuntu jammy InRelease
Ign:1 http://archive.ubuntu.com/ubuntu jammy InRelease
Ign:2 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
Ign:3 http://archive.ubuntu.com/ubuntu jammy-backports InRelease
Ign:4 http://archive.ubuntu.com/ubuntu jammy-security InRelease
Ign:1 http://archive.ubuntu.com/ubuntu jammy InRelease
Ign:2 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
Ign:3 http://archive.ubuntu.com/ubuntu jammy-backports InRelease
Ign:4 http://archive.ubuntu.com/ubuntu jammy-security InRelease
Err:1 http://archive.ubuntu.com/ubuntu jammy InRelease
  503  Service Unavailable [IP: 91.189.91.39 80]
Err:2 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
  503  Service Unavailable [IP: 91.189.91.39 80]
Err:3 http://archive.ubuntu.com/ubuntu jammy-backports InRelease
  503  Service Unavailable [IP: 91.189.91.39 80]
Err:4 http://archive.ubuntu.com/ubuntu jammy-security InRelease
  503  Service Unavailable [IP: 91.189.91.39 80]
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/jammy/InRelease  503  Service Unavailable [IP: 91.189.91.39 80]
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/jammy-updates/InRelease  503  Service Unavailable [IP: 91.189.91.39 80]
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/jammy-backports/InRelease  503  Service Unavailable [IP: 91.189.91.39 80]
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/jammy-security/InRelease  503  Service Unavailable [IP: 91.189.91.39 80]
W: Some index files failed to download. They have been ignored, or old ones used instead.

该 URL 与 Curl 配合使用:

root@geda-zabbix:~# curl http://archive.ubuntu.com/ubuntu/
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
 <head>
  <title>Index of /ubuntu</title>
 </head>
 <body>
<h1>Index of /ubuntu</h1>
  <table>
   <tr><th valign="top"><img src="/icons/blank.gif" alt="[ICO]"></th><th><a href="?C=N;O=D">Name</a></th><th><a href="?C=M;O=A">Last modified</a></th><th><a href="?C=S;O=A">Size</a></th></tr>
   <tr><th colspan="4"><hr></th></tr>
<tr><td valign="top"><img src="/icons/back.gif" alt="[PARENTDIR]"></td><td><a href="/">Parent Directory</a></td><td>&nbsp;</td><td align="right">  - </td></tr>
<tr><td valign="top"><img src="/icons/folder.gif" alt="[DIR]"></td><td><a href="dists/">dists/</a></td><td align="right">2022-10-27 17:39  </td><td align="right">  - </td></tr>
<tr><td valign="top"><img src="/icons/folder.gif" alt="[DIR]"></td><td><a href="indices/">indices/</a></td><td align="right">2023-04-20 07:27  </td><td align="right">  - </td></tr>
<tr><td valign="top"><img src="/icons/compressed.gif" alt="[   ]"></td><td><a href="ls-lR.gz">ls-lR.gz</a></td><td align="right">2023-04-20 07:28  </td><td align="right"> 24M</td></tr>
<tr><td valign="top"><img src="/icons/folder.gif" alt="[DIR]"></td><td><a href="pool/">pool/</a></td><td align="right">2010-02-27 06:30  </td><td align="right">  - </td></tr>
<tr><td valign="top"><img src="/icons/folder.gif" alt="[DIR]"></td><td><a href="project/">project/</a></td><td align="right">2013-06-28 11:52  </td><td align="right">  - </td></tr>
<tr><td valign="top"><img src="/icons/folder.gif" alt="[DIR]"></td><td><a href="ubuntu/">ubuntu/</a></td><td align="right">2023-04-20 07:35  </td><td align="right">  - </td></tr>
   <tr><th colspan="4"><hr></th></tr>
</table>
<address>Apache/2.4.29 (Ubuntu) Server at archive.ubuntu.com Port 80</address>
</body></html>
root@geda-zabbix:~#

我也尝试过切换到本地镜像 (ftp.belnet.be),但遇到了同样的问题。所以我切换回来,但保留了本地镜像的评论。

来源列表:


deb http://archive.ubuntu.com/ubuntu/ jammy main restricted
#deb http://ftp.belnet.be/ubuntu/ jammy main restricted
# deb-src http://archive.ubuntu.com/ubuntu jammy main restricted


deb http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted
#deb http://ftp.belnet.be/ubuntu/ jammy-updates main restricted

# deb-src http://archive.ubuntu.com/ubuntu jammy-updates main restricted

deb http://archive.ubuntu.com/ubuntu/ jammy universe
#deb http://ftp.belnet.be/ubuntu/ jammy universe
# deb-src http://archive.ubuntu.com/ubuntu jammy universe

deb http://archive.ubuntu.com/ubuntu/ jammy-updates universe
#deb http://ftp.belnet.be/ubuntu/ jammy-updates universe
# deb-src http://archive.ubuntu.com/ubuntu jammy-updates universe

deb http://archive.ubuntu.com/ubuntu/ jammy multiverse
#deb http://ftp.belnet.be/ubuntu/ jammy multiverse
# deb-src http://archive.ubuntu.com/ubuntu jammy multiverse
deb http://archive.ubuntu.com/ubuntu/ jammy-updates multiverse
#deb http://ftp.belnet.be/ubuntu/ jammy-updates multiverse
# deb-src http://archive.ubuntu.com/ubuntu jammy-updates multiverse

deb http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse
#deb http://ftp.belnet.be/ubuntu/ jammy-backports main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu jammy-backports main restricted universe multiverse

deb http://archive.ubuntu.com/ubuntu/ jammy-security main restricted
#deb http://ftp.belnet.be/ubuntu/ jammy-security main restricted
# deb-src http://archive.ubuntu.com/ubuntu jammy-security main restricted

deb http://archive.ubuntu.com/ubuntu/ jammy-security universe
#deb http://ftp.belnet.be/ubuntu/ jammy-security universe
# deb-src http://archive.ubuntu.com/ubuntu jammy-security universe

deb http://archive.ubuntu.com/ubuntu/ jammy-security multiverse
#deb http://ftp.belnet.be/ubuntu/ jammy-security multiverse
# deb-src http://archive.ubuntu.com/ubuntu jammy-security multiverse

当我使用 wget 从 repo 手动下载包时,它有效:

root@geda-zabbix:~#  wget http://archive.ubuntu.com/ubuntu/pool/universe/n/net-snmp/libnetsnmptrapd40_5.9.1+dfsg-1ubuntu2.6_amd64.deb
--2023-04-20 10:17:10--  http://archive.ubuntu.com/ubuntu/pool/universe/n/net-snmp/libnetsnmptrapd40_5.9.1+dfsg-1ubuntu2.6_amd64.deb
Resolving archive.ubuntu.com (archive.ubuntu.com)... 185.125.190.39, 185.125.190.36, 91.189.91.38, ...
Connecting to archive.ubuntu.com (archive.ubuntu.com)|185.125.190.39|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 24936 (24K) [application/x-debian-package]
Saving to: ‘libnetsnmptrapd40_5.9.1+dfsg-1ubuntu2.6_amd64.deb’

libnetsnmptrapd40_5.9.1+dfsg-1ubuntu2.6_amd64.deb  100%[=============================================================================================================>]  24.35K  --.-KB/s    in 0.02s

2023-04-20 10:17:10 (1.48 MB/s) - ‘libnetsnmptrapd40_5.9.1+dfsg-1ubuntu2.6_amd64.deb’ saved [24936/24936]

root@geda-zabbix:~#

相关内容