首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >鱿鱼-代理还是archive.ubuntu.com问题?

鱿鱼-代理还是archive.ubuntu.com问题?
EN

Ask Ubuntu用户
提问于 2018-02-12 11:10:21
回答 3查看 1.7K关注 0票数 1

哈洛,我有一些问题,在这6个坐骑试图更新我的桌面系统。对不起,我无法判断是archive.ubuntu.com服务器临时问题还是squid-deb-代理包中的问题。

查看/var/log/squid代理/access.log.log和apt升级输出,我看到:

来自apt的输出:

代码语言:javascript
复制
Ign:42 http://archive.ubuntu.com/ubuntu xenial-security/main amd64 libudev1 amd64 229-4ubuntu21.1                                                                                                                 
Ign:41 http://archive.ubuntu.com/ubuntu xenial-security/main amd64 libpam-systemd amd64 229-4ubuntu21.1
Ign:44 http://archive.ubuntu.com/ubuntu xenial-security/main amd64 udev amd64 229-4ubuntu21.1
Ign:43 http://archive.ubuntu.com/ubuntu xenial-security/main i386 libudev1 i386 229-4ubuntu21.1
Ign:46 http://archive.ubuntu.com/ubuntu xenial-security/main amd64 libsystemd0 amd64 229-4ubuntu21.1
Ign:45 http://archive.ubuntu.com/ubuntu xenial-security/main i386 libsystemd0 i386 229-4ubuntu21.1
Ign:48 http://archive.ubuntu.com/ubuntu xenial-security/main amd64 systemd-sysv amd64 229-4ubuntu21.1
Ign:47 http://archive.ubuntu.com/ubuntu xenial-security/main amd64 systemd amd64 229-4ubuntu21.1
Ign:50 http://archive.ubuntu.com/ubuntu xenial-security/universe amd64 chromium-codecs-ffmpeg-extra amd64 64.0.3282.140-0ubuntu0.16.04.1
Ign:49 http://archive.ubuntu.com/ubuntu xenial-proposed/main amd64 libapparmor1 amd64 2.10.95-0ubuntu2.8
Err:52 http://archive.ubuntu.com/ubuntu xenial-proposed/main i386 gcc-5-base i386 5.4.0-6ubuntu1~16.04.9
  Connessione terminata
Err:51 http://151.99.86.73:80/data/0189f472fb16f092/archive.ubuntu.com/ubuntu xenial-proposed/main amd64 gcc-5-base amd64 5.4.0-6ubuntu1~16.04.9
  403  Forbidden

发件人/var/log/squid代理/access.log.log:

代码语言:javascript
复制
1518428930.420     96 192.168.1.107 TCP_REFRESH_MODIFIED/302 445 GET http://archive.ubuntu.com/ubuntu/pool/main/s/systemd/libudev1_229-4ubuntu21.1_i386.deb - HIER_DIRECT/91.189.88.149 text/html
1518428931.389     32 192.168.1.107 TCP_DENIED/403 4233 GET http://151.99.86.73/data/028979686fecdd00/archive.ubuntu.com/ubuntu/pool/main/s/systemd/libpam-systemd_229-4ubuntu21.1_amd64.deb - HIER_NONE/- text/html
1518429050.519      0 192.168.1.107 TCP_DENIED/403 4212 GET http://151.99.86.73/data/00894e6ad5c1296b/archive.ubuntu.com/ubuntu/pool/main/s/systemd/libudev1_229-4ubuntu21.1_i386.deb - HIER_NONE/- text/html
1518429050.577     57 192.168.1.107 TCP_REFRESH_MODIFIED/302 448 GET http://archive.ubuntu.com/ubuntu/pool/main/s/systemd/libsystemd0_229-4ubuntu21.1_i386.deb - HIER_DIRECT/91.189.88.149 text/html
1518429170.721     68 192.168.1.107 TCP_REFRESH_MODIFIED/302 445 GET http://archive.ubuntu.com/ubuntu/pool/main/s/systemd/systemd_229-4ubuntu21.1_amd64.deb - HIER_DIRECT/91.189.88.152 text/html
1518429176.717     33 192.168.1.107 TCP_DENIED/403 4221 GET http://151.99.86.75/data/0089936cbd9662c9/archive.ubuntu.com/ubuntu/pool/main/s/systemd/libsystemd0_229-4ubuntu21.1_i386.deb - HIER_NONE/- text/html
1518429290.819      0 192.168.1.107 TCP_DENIED/403 4212 GET http://151.99.86.73/data/01891f6e2a6c5119/archive.ubuntu.com/ubuntu/pool/main/s/systemd/systemd_229-4ubuntu21.1_amd64.deb - HIER_NONE/- text/html
1518429290.875     56 192.168.1.107 TCP_REFRESH_MODIFIED/302 454 GET http://archive.ubuntu.com/ubuntu/pool/main/a/apparmor/libapparmor1_2.10.95-0ubuntu2.8_amd64.deb - HIER_DIRECT/91.189.88.152 text/html
1518429410.878      0 192.168.1.107 TCP_DENIED/403 4239 GET http://151.99.86.73/data/0189e8705841ea73/archive.ubuntu.com/ubuntu/pool/main/a/apparmor/libapparmor1_2.10.95-0ubuntu2.8_amd64.deb - HIER_NONE/- text/html
1518429410.969     91 192.168.1.107 TCP_REFRESH_MODIFIED/302 455 GET http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-5/gcc-5-base_5.4.0-6ubuntu1%7e16.04.9_amd64.deb - HIER_DIRECT/91.189.88.152 text/html
1518429531.019      0 192.168.1.107 TCP_DENIED/403 4244 GET http://151.99.86.73/data/0189f472fb16f092/archive.ubuntu.com/ubuntu/pool/main/g/gcc-5/gcc-5-base_5.4.0-6ubuntu1%7e16.04.9_amd64.deb - HIER_NONE/- text/html

系统挂起等待数据。这是个众所周知的问题吗?

我的配置:来自/etc/squid-deb-proxy/mirror-dstdomain.acl.d/10-default

代码语言:javascript
复制
.dl.google.com
.ppa.launchpad.net
.downloads-distro.mongodb.org
# tutti questi sono per getdeb
.getdeb.net
.mirror.lagoon.nc
.ftp.heanet.ie
.getdeb.mirror.garr.it
.archive.getdeb.net
.getdeb.megaglest.org
.mirrors.dotsrc.org
.zulu930.server4you.de
.188.138.90.189
.ftp.yzu.edu.tw
# fine getdeb
.apt.puppetlabs.com
.deb.theforeman.org
# postgresql.org
.postgresql.org
#owncloud
.download.owncloud.org
.download.opensuse.org
#tox
.pkg.tox.chat
#variety
.151.99.86.77 

来自/etc/squid-deb-代理/squid-proxy.conf

代码语言:javascript
复制
acl allowed_networks src "/etc/squid-deb-proxy/autogenerated/allowed-networks-src.acl"

# this file contains the archive mirrors by default,
# if you use a different mirror, add it there
acl to_archive_mirrors dstdomain "/etc/squid-deb-proxy/autogenerated/mirror-dstdomain.acl"

# this contains the package blacklist
acl blockedpkgs urlpath_regex "/etc/squid-deb-proxy/autogenerated/pkg-blacklist-regexp.acl"

# default to a different port than stock squid
http_port 8000

# -------------------------------------------------
# settings below probably do not need customization

# user visible name
visible_hostname squid-deb-proxy

# we need a big cache, some debs are huge
# maximum_object_size 512 MB
# leonardo
maximum_object_size 2048 MB

# use a different dir than stock squid and default to 40G
# cache_dir aufs /var/cache/squid-deb-proxy 40000 16 256
# leonardo
cache_dir aufs /var/cache/squid-deb-proxy 100000 16 256

# use different logs
cache_access_log /var/log/squid-deb-proxy/access.log
cache_log /var/log/squid-deb-proxy/cache.log
cache_store_log /var/log/squid-deb-proxy/store.log

# tweaks to speed things up
cache_mem 200 MB
maximum_object_size_in_memory 10240 KB

# pid
pid_filename /var/run/squid-deb-proxy.pid

# refresh pattern for debs and udebs
refresh_pattern deb$   129600 100% 129600
refresh_pattern udeb$   129600 100% 129600
refresh_pattern tar.gz$  129600 100% 129600
refresh_pattern tar.xz$  129600 100% 129600
refresh_pattern tar.bz2$  129600 100% 129600

# always refresh Packages and Release files
refresh_pattern \/(Packages|Sources)(|\.bz2|\.gz|\.xz)$ 0 0% 0 refresh-ims
refresh_pattern \/Release(|\.gpg)$ 0 0% 0 refresh-ims
refresh_pattern \/InRelease$ 0 0% 0 refresh-ims
refresh_pattern \/(Translation-.*)(|\.bz2|\.gz|\.xz)$ 0 0% 0 refresh-ims

# handle meta-release and changelogs.ubuntu.com special
# (fine to have this on debian too)
refresh_pattern changelogs.ubuntu.com\/.*  0  1% 1

# only allow connects to ports for http, https
acl Safe_ports port 80
acl Safe_ports port 443 563   

# only allow ports we trust
http_access deny !Safe_ports

# do not allow to download from the pkg blacklist
http_access deny blockedpkgs

# allow access only to official archive mirrors
# uncomment the third and fouth line to permit any unlisted domain
http_access deny !to_archive_mirrors
#http_access allow !to_archive_mirrors

# don't cache domains not listed in the mirrors file
# uncomment the third and fourth line to cache any unlisted domains
cache deny !to_archive_mirrors
#cache allow !to_archive_mirrors

# allow access from our network and localhost
http_access allow allowed_networks

# And finally deny all other access to this proxy
http_access deny all

# we don't want to clash with the squid netdb state file
netdb_filename stdio:/var/log/squid-deb-proxy/netdb.state

来自squid-deb-代理/允许-网络-src.acl:

代码语言:javascript
复制
# private networks
10.0.0.0/8 
172.16.0.0/12
192.168.0.0/16
192.168.1.0/16
127.0.0.1

# IPv6 private addresses
fe80::/64
::1/128

# additional non-private networks can be added to the directory:
#  /etc/squid-deb-proxy/allowed-networks-src.acl.d

来自/etc/squid-deb-proxy/allowed-networks-src.acl.d/10-default

代码语言:javascript
复制
188.138.90.189/17

我不知道该怎么办。

EN

回答 3

Ask Ubuntu用户

回答已采纳

发布于 2018-07-21 07:53:25

问题解决了,但原因却是个谜。

在我的/etc/squid-deb-proxy/mirror-dstdomain.acl.d/10-default上,我必须添加一些ip:

  • 151.99.86.73
  • 151.99.86.75
  • 151.99.86.77
  • 151.99.86.79

大部分都是必要的,因为有些人在archive.ubuntu.com解析上下载到151.99.86.x/data//archive.ubuntu.com/ubuntu/...

因此,当出现一个新的错误报告151.99.86.x时,我将向acl文件添加一个新ip。

我喜欢理解为什么不使用域地址,除非151.99.86.x,我想了解是否有更好的解决方案比在问题出现时添加一个IP更好。

你好,莱昂纳多

票数 0
EN

Ask Ubuntu用户

发布于 2018-06-16 10:05:18

相关部分似乎与IP 151.99.86.73有关。

代码语言:javascript
复制
Err:51 http://151.99.86.73:80/data/0189f472fb16f092/archive.ubuntu.com/ubuntu xenial-proposed/main amd64 gcc-5-base amd64 5.4.0-6ubuntu1~16.04.9      403  Forbidden
代码语言:javascript
复制
1518428931.389     32 192.168.1.107 TCP_DENIED/403 4233 GET http://151.99.86.73/data/028979686fecdd00/archive.ubuntu.com/ubuntu/pool/main/s/systemd/libpam-systemd_229-4ubuntu21.1_amd64.deb - HIER_NONE/- text/html
1518429050.519      0 192.168.1.107 TCP_DENIED/403 4212 GET http://151.99.86.73/data/00894e6ad5c1296b/archive.ubuntu.com/ubuntu/pool/main/s/systemd/libudev1_229-4ubuntu21.1_i386.deb - HIER_NONE/- text/html
1518429176.717     33 192.168.1.107 TCP_DENIED/403 4221 GET http://151.99.86.75/data/0089936cbd9662c9/archive.ubuntu.com/ubuntu/pool/main/s/systemd/libsystemd0_229-4ubuntu21.1_i386.deb - HIER_NONE/- text/html
1518429290.819      0 192.168.1.107 TCP_DENIED/403 4212 GET http://151.99.86.73/data/01891f6e2a6c5119/archive.ubuntu.com/ubuntu/pool/main/s/systemd/systemd_229-4ubuntu21.1_amd64.deb - HIER_NONE/- text/html
1518429410.878      0 192.168.1.107 TCP_DENIED/403 4239 GET http://151.99.86.73/data/0189e8705841ea73/archive.ubuntu.com/ubuntu/pool/main/a/apparmor/libapparmor1_2.10.95-0ubuntu2.8_amd64.deb - HIER_NONE/- text/html
1518429531.019      0 192.168.1.107 TCP_DENIED/403 4244 GET http://151.99.86.73/data/0189f472fb16f092/archive.ubuntu.com/ubuntu/pool/main/g/gcc-5/gcc-5-base_5.4.0-6ubuntu1%7e16.04.9_amd64.deb - HIER_NONE/- text/html

这些请求被拒绝,因为目标(151.99.86.73)没有被列为允许的域。将这个IP添加到/etc/squid-deb-proxy/mirror-dstdomain.acl.d/10-default应该会修复它。添加一行

代码语言:javascript
复制
151.99.86.73

你就完蛋了。

票数 0
EN

Ask Ubuntu用户

发布于 2018-06-20 10:41:33

在/etc/squid-deb-代理/镜像-dstdomain.acl上,我删除了点‘’。在领域的前面。

就像这个.archive.ubuntu.com变成-> archive.ubuntu.com

第一次测试进行得很顺利。

我尝试了一段时间,直到看到错误是否再次出现为止。

票数 0
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1005423

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档