0

I have an Ubuntu 18.04 server running apt-cacher (Version: 1.7.16) for our environment which is a mix of Ubuntu 16, 18 and 20 hosts. Our Ubuntu 20.04 hosts are having trouble patching when using our apt-cacher host. Patching direct to the internet works fine but it's against our policy. I'm seeing not allowed to fetch that type of file errors:

admin7@template:~# apt-get update
Hit:1 http://archive.ubuntu.com/ubuntu focal InRelease
Get:2 http://archive.ubuntu.com/ubuntu focal-updates InRelease [107 kB]
Get:3 http://archive.ubuntu.com/ubuntu focal-backports InRelease [98.3 kB]
Get:4 http://archive.ubuntu.com/ubuntu focal-security InRelease [107 kB]
Get:5 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [147 kB]
Get:6 http://archive.ubuntu.com/ubuntu focal-updates/main Translation-en [54.8 kB]
Get:7 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 c-n-f Metadata [3560 B]
Get:7 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 c-n-f Metadata [3560 B]
Get:7 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 c-n-f Metadata [3560 B]
Get:7 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 c-n-f Metadata [3560 B]
Get:7 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 c-n-f Metadata [3560 B]
Get:7 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 c-n-f Metadata [3560 B]
Ign:7 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 c-n-f Metadata
Get:14 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 c-n-f Metadata [2608 B]
Get:14 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 c-n-f Metadata [2608 B]
Ign:14 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 c-n-f Metadata
Ign:17 http://archive.ubuntu.com/ubuntu focal-backports/universe amd64 c-n-f Metadata
Ign:7 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 c-n-f Metadata
Ign:14 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 c-n-f Metadata
Ign:17 http://archive.ubuntu.com/ubuntu focal-backports/universe amd64 c-n-f Metadata
Ign:7 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 c-n-f Metadata
Ign:14 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 c-n-f Metadata
Ign:17 http://archive.ubuntu.com/ubuntu focal-backports/universe amd64 c-n-f Metadata
Err:7 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 c-n-f Metadata
  403  Sorry, not allowed to fetch that type of file: caa2bcaedd682ba4d80d0710baf3d9fc5e451692820011530d55b767636e4c34 [IP: 10.1.2.3 3142]
Ign:14 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 c-n-f Metadata
Err:17 http://archive.ubuntu.com/ubuntu focal-backports/universe amd64 c-n-f Metadata
  403  Sorry, not allowed to fetch that type of file: 925b094241232d03a4765ecf2eadf174dfa8838476e49191e2f0d8e33980c953 [IP: 10.1.2.3 3142]
Get:18 http://archive.ubuntu.com/ubuntu focal-security/main amd64 Packages [89.4 kB]
Get:19 http://archive.ubuntu.com/ubuntu focal-security/main Translation-en [33.9 kB]
Get:20 http://archive.ubuntu.com/ubuntu focal-security/main amd64 c-n-f Metadata [2384 B]
Get:20 http://archive.ubuntu.com/ubuntu focal-security/main amd64 c-n-f Metadata [2384 B]
Get:20 http://archive.ubuntu.com/ubuntu focal-security/main amd64 c-n-f Metadata [2384 B]
Get:20 http://archive.ubuntu.com/ubuntu focal-security/main amd64 c-n-f Metadata [2384 B]
Get:20 http://archive.ubuntu.com/ubuntu focal-security/main amd64 c-n-f Metadata [2384 B]
Get:20 http://archive.ubuntu.com/ubuntu focal-security/main amd64 c-n-f Metadata [2384 B]
Ign:20 http://archive.ubuntu.com/ubuntu focal-security/main amd64 c-n-f Metadata
Ign:27 http://archive.ubuntu.com/ubuntu focal-security/universe amd64 c-n-f Metadata
Ign:20 http://archive.ubuntu.com/ubuntu focal-security/main amd64 c-n-f Metadata
Ign:27 http://archive.ubuntu.com/ubuntu focal-security/universe amd64 c-n-f Metadata
Ign:20 http://archive.ubuntu.com/ubuntu focal-security/main amd64 c-n-f Metadata
Ign:27 http://archive.ubuntu.com/ubuntu focal-security/universe amd64 c-n-f Metadata
Err:20 http://archive.ubuntu.com/ubuntu focal-security/main amd64 c-n-f Metadata
  403  Sorry, not allowed to fetch that type of file: 8d1b06044b073a6d834a31b177e3da5028e29170ea7aacab20143e2a516ee602 [IP: 10.1.2.3 3142]
Ign:27 http://archive.ubuntu.com/ubuntu focal-security/universe amd64 c-n-f Metadata
Fetched 312 kB in 2s (133 kB/s)
Reading package lists... Done
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal-updates/main/cnf/Commands-amd64  403  Sorry, not allowed to fetch that type of file: caa2bcaedd682ba4d80d0710baf3d9fc5e451692820011530d55b767636e4c34 [IP: 10.1.2.3 3142]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal-backports/universe/cnf/Commands-amd64  403  Sorry, not allowed to fetch that type of file: 925b094241232d03a4765ecf2eadf174dfa8838476e49191e2f0d8e33980c953 [IP: 10.1.2.3 3142]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal-security/main/cnf/Commands-amd64  403  Sorry, not allowed to fetch that type of file: 8d1b06044b073a6d834a31b177e3da5028e29170ea7aacab20143e2a516ee602 [IP: 10.1.2.3 3142]
E: Some index files failed to download. They have been ignored, or old ones used instead.

I've seen multiple posts complaining of similar issues and they are almost always resolved by editing the package_files_regexp setting. However, those posts refer to a specific file extension. In my case the problem files do not appear to have a particular file extension, just a long string of hexidecimal characters. Also, those hex strings differ from file to file. At this point I don't know the correct procedure on how to resolve this issue. Is there way to edit the package_files_regexp so it allows these hexidecimal strings?

1

I just solved this issue on my Ubuntu MATE 20.04 :

apt remove command-not-found
apt clean
apt auto-remove
apt install command-not-found
New contributor
Daniel Debaste is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
0

I've made some progress. The output from apt-get update states at the very end:

Some index files failed to download. They have been ignored, or old ones used instead.

I went in to the apt-cacher config file and temporarily set:

index_files_regexp = ^(.*)

apt-get update now works on the Ubuntu 20.04 hosts. I do not want to leave it set like this. Still looking for the correct solution but at least I have a temporarily workaround. I have verified the problem is the name of the index files and the apt-cacher configuration file is not set to allow some of those file names.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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