Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On an Ubuntu 12.04 server, with squid-deb-proxy installed, client machines on the network will properly contact the server when installing packages, but squid never caches packages.

From /var/log/squid-deb-proxy/access.log:

1368371692.721    485 TCP_MISS/200 20304 GET - DIRECT/ application/x-debian-package
1368371721.534    264 TCP_MISS/200 20304 GET - DIRECT/ application/x-debian-package

Both & .210 contacted the server (.210 is the server, but also has squid-deb-proxy-client installed), but .210 received TCP_MISS/200, instead of being served the cached package.

From /var/log/squid-deb-proxy/store.log:

1368371692.721 RELEASE -1 FFFFFFFF 1255C76AE7E24BA02B4ABB6A3E4AB535  200 1368371672 1293023126        -1 application/x-debian-package 19904/19904 GET
1368371721.534 RELEASE -1 FFFFFFFF 3534FA3574ED95020E8C960C75129676  200 1368371700 1293023126        -1 application/x-debian-package 19904/19904 GET

If I'm reading the store.log right, squid cached two copies of the exact same file. (I used cowsay to test; much larger files, like linux-headers-* also were never cached.)

The only changes from the default squid-deb-proxy.conf were to enable mirrors:

< http_access deny !to_ubuntu_mirrors
< #http_access allow !to_ubuntu_mirrors
> #http_access deny !to_ubuntu_mirrors
> http_access allow !to_ubuntu_mirrors
< cache deny !to_ubuntu_mirrors
< #cache allow !to_ubuntu_mirrors
> #cache deny !to_ubuntu_mirrors
> cache allow !to_ubuntu_mirrors

Lastly, the only errors I have seen in squid-specific logs are:

$ sudo cat /var/log/upstart/squid-deb-proxy.log.1
2013/05/09 09:27:05| Warning: empty ACL: acl blockedpkgs urlpath_regex "/etc/squid-deb-proxy/autogenerated/pkg-blacklist-regexp.acl"
2013/05/09 09:27:05| WARNING: (B) '::/0' is a subnetwork of (A) '::/0'
2013/05/09 09:27:05| WARNING: because of this '::/0' is ignored to keep splay tree searching predictable
2013/05/09 09:27:05| WARNING: You should probably remove '::/0' from the ACL named 'all'

Given that the clients are correctly contacting the server's proxy, why won't squid cache & return the packages?

share|improve this question
up vote 1 down vote accepted

After starting from scratch (purging & re-installing), I finally discovered the problem.

The changes to squid-deb-proxy.conf (which I thought enabled mirrors) were the culprits.

I don't understand the comments in the file, like: "# uncomment the third and fouth line to permit any unlisted domain". There are only two lines underneath that comment, and uncommenting both lines would seem (to someone unversed in squid's configuration syntax) to negate each other. Reversing the options (commenting out the originally uncommented one, and activating the originally commented one) obviously did not work.

One other point: the autogenerated files are sensitive to backup files in the *.d/ directories. I noticed that /etc/squid-deb-proxy/autogenerated/mirror-dstdomain.acl had the contents of both mirror-dstdomain.acl.d/10-default and mirror-dstdomain.acl.d/10-default~ in it.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.