3

I have server with installed squid-deb-proxy. Let's say that its IP is 10.13.3.7.
I have installed squid-deb-proxy-client on other machines (let's name them clients). Server and clients are in the same network and run Ubuntu 16.04.6 LTS.

The repositories to be mirrored are correctly defined in /etc/squid-deb-proxy/mirror-dstdomain.acl to suite clients requirements:

archive.canonical.com
archive.ubuntu.com
changelogs.ubuntu.com
cloud.r-project.org
ddebs.ubuntu.com
deb.opera.com
dl.google.com
dl.winehq.org
download.opensuse.org
downloads.sourceforge.net
download.virtualbox.org
extras.ubuntu.com
mirrors.ubuntu.com
ports.ubuntu.com
ppa.launchpad.net
private-ppa.launchpad.net
ru.archive.ubuntu.com
security.ubuntu.com
typora.io

All clients have the same list of repositories.

The server is working normally - I see both TCP_MEM_HIT/200 and TCP_HIT/200 in /var/log/squid-deb-proxy/access.log on the request of deb-packages.

Yesterday night I have downloaded all updates from one of the clients (ran sudo apt-get update followed by sudo apt-get dist-upgrade). So I expect that Squid Deb cache is filled with headers and packages.

On today morning there is no internet because of WAN (ISP) maintenance. I can't ping anything outside the LAN. I can ping 10.13.3.7 from clients.

Thus when I run sudo apt update on clients I see the following messages:

0% [Working]
0% [Waiting for headers]
Err:N http://archive.ubuntu.com/ubuntu release InRelease
Connection failed [IP: 10.13.3.7 8000]
...
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/release/InRelease Connection failed [IP: 10.13.3.7 8000]
... W: Some index files failed to download. They have been ignored, or old ones used instead.

and same for sudo apt upgrade or sudo apt install ...:

0% [Waiting for headers]
Err:N http://archive.ubuntu.com/ubuntu xenial/pocket arch name arch version
Connection failed [IP: 10.13.3.7 8000]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/....deb Connection failed [IP: 10.13.3.7 8000]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

Is it possible to work without internet and get packages from local squid-deb-proxy cache?

Update: setting offline_mode on in /etc/squid3/squid.conf does not help - I get 503 service unavailable errors for some objects during apt-get update. Moreover this options prevents cache update if I have internet access on the server.

1 Answer 1

0

It won't work without an Internet connection if the specific .deb package that your client is trying to fetch is in a repository that wasn't cached before. Could also be new dependencies that needs fetching. You should be able to check this file /etc/squid-deb-proxy/mirror-dstdomain.acl for cached repos/domains.

2
  • Thank you for your comment. But I have already set up correct (and same) repositories on client and server. So both the sources.list and mirror-dstdomain.acl are correctly defined in correspondence of each other.
    – N0rbert
    Apr 1, 2019 at 15:58
  • While package files are cached the meta data is probably not ... it gets an extra http header from the upstream servers to prevent that. Cache-Control: max-age=0, proxy-revalidate. Mar 1, 2021 at 10:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .