APT proxy repo for Ubuntu 2204 results in 502 Bad Gateway

Create the repo as a proxy APT repo. Distribution set as jammy, remote storage as hxxp://archive.ubuntu.com/ubuntu . The other settings I leave as default. Done.

On Ubuntu 22.04, I edit /etc/apt/sources.list. Replace all references to hxxp://archive.ubuntu.com/ubuntu with hxxp://mynexushost:8081/repository/jammy .

sudo apt clean
sudo apt update
This nicely updates from my repo.

If I then try to install anything. e.g. net-tools by doing sudo apt install net-tools, then this result in

502 Bad Gateway [IP: 192.168.65.11 8081]
E: Failed to fetch hxxp://mynexushost:8081/repository/jammy/pool/main/n/net-tools/net-tools_1.60%2bgit20181103.0eebece-1ubuntu5_amd64.deb 502 Bad Gateway [IP: 192.168.65.11 8081]
where the ip is the ip of mynexushost.

I have a feeling that I am missing something. But not quite what I am missing. Is it something about jammy-updates, jammy-backports and so on, or something else entirely?

Regards Niels Jespersen

PS. hxxp in this post should be http, but I’m not allowed to put more than 2 links in a post as a new user.

2 Likes

I have exactly the same error.

2 Likes

You should look at the logs on Nexus and see if they say anything.

That is a good idea. I get this. I am not sure what it means, though.

Niels Jespersen

2022-05-27 15:34:58,591+0200 WARN [qtp224538098-39738] *UNKNOWN org.sonatype.nexus.repository.apt.orient.internal.proxy.OrientAptProxyFacet - Exception java.io.IOException: Invalid debian package: no control file checking remote for update, proxy repo jammy failed to fetch pool/main/p/pcre3/libpcre3_8.39-13ubuntu0.22.04.1_amd64.deb, content not in cache.
2022-05-27 15:35:01,357+0200 WARN [qtp224538098-39738] *UNKNOWN org.sonatype.nexus.repository.apt.orient.internal.proxy.OrientAptProxyFacet - Exception java.io.IOException: Invalid debian package: no control file checking remote for update, proxy repo jammy failed to fetch pool/main/o/openssl/libssl3_3.0.2-0ubuntu1.2_amd64.deb, content not in cache.
2022-05-27 15:35:01,498+0200 WARN [qtp224538098-39738] *UNKNOWN org.sonatype.nexus.repository.apt.orient.internal.proxy.OrientAptProxyFacet - Exception java.io.IOException: Invalid debian package: no control file checking remote for update, proxy repo jammy failed to fetch pool/main/j/json-c/libjson-c5_0.15-3~ubuntu1.22.04.1_amd64.deb, content not in cache.
2022-05-27 15:35:02,672+0200 WARN [qtp224538098-39738] *UNKNOWN org.sonatype.nexus.repository.apt.orient.internal.proxy.OrientAptProxyFacet - Exception java.io.IOException: Invalid debian package: no control file checking remote for update, proxy repo jammy failed to fetch pool/main/libx/libxml2/libxml2_2.9.13+dfsg-1ubuntu0.1_amd64.deb, content not in cache.
2022-05-27 15:35:02,844+0200 WARN [qtp224538098-39738] *UNKNOWN org.sonatype.nexus.repository.apt.orient.internal.proxy.OrientAptProxyFacet - Exception java.io.IOException: Invalid debian package: no control file checking remote for update, proxy repo jammy failed to fetch pool/main/l/logrotate/logrotate_3.19.0-1ubuntu1.1_amd64.deb, content not in cache.
2022-05-27 15:35:04,579+0200 WARN [qtp224538098-39738] *UNKNOWN org.sonatype.nexus.repository.apt.orient.internal.proxy.OrientAptProxyFacet - Exception java.io.IOException: Invalid debian package: no control file checking remote for update, proxy repo jammy failed to fetch pool/main/o/openssl/openssl_3.0.2-0ubuntu1.2_amd64.deb, content not in cache.
2022-05-27 15:35:04,735+0200 WARN [qtp224538098-39738] *UNKNOWN org.sonatype.nexus.repository.apt.orient.internal.proxy.OrientAptProxyFacet - Exception java.io.IOException: Invalid debian package: no control file checking remote for update, proxy repo jammy failed to fetch pool/main/b/bind9/bind9-host_9.18.1-1ubuntu1.1_amd64.deb, content not in cache.
2022-05-27 15:35:05,048+0200 WARN [qtp224538098-39738] *UNKNOWN org.sonatype.nexus.repository.apt.orient.internal.proxy.OrientAptProxyFacet - Exception java.io.IOException: Invalid debian package: no control file checking remote for update, proxy repo jammy failed to fetch pool/main/b/bind9/bind9-dnsutils_9.18.1-1ubuntu1.1_amd64.deb, content not in cache.
2022-05-27 15:35:07,142+0200 WARN [qtp224538098-39738] *UNKNOWN org.sonatype.nexus.repository.apt.orient.internal.proxy.OrientAptProxyFacet - Exception java.io.IOException: Invalid debian package: no control file checking remote for update, proxy repo jammy failed to fetch pool/main/b/bind9/bind9-libs_9.18.1-1ubuntu1.1_amd64.deb, content not in cache.
2022-05-27 15:35:07,314+0200 WARN [qtp224538098-39738] *UNKNOWN org.sonatype.nexus.repository.apt.orient.internal.proxy.OrientAptProxyFacet - Exception java.io.IOException: Invalid debian package: no control file checking remote for update, proxy repo jammy failed to fetch pool/main/libu/libusb-1.0/libusb-1.0-0_1.0.25-1ubuntu2_amd64.deb, content not in cache.
2022-05-27 15:35:07,424+0200 WARN [qtp224538098-39738] *UNKNOWN org.sonatype.nexus.repository.apt.orient.internal.proxy.OrientAptProxyFacet - Exception java.io.IOException: Invalid debian package: no control file checking remote for update, proxy repo jammy failed to fetch pool/main/a/apport/python3-problem-report_2.20.11-0ubuntu82.1_all.deb, content not in cache.
2022-05-27 15:35:07,643+0200 WARN [qtp224538098-39738] *UNKNOWN org.sonatype.nexus.repository.apt.orient.internal.proxy.OrientAptProxyFacet - Exception java.io.IOException: Invalid debian package: no control file checking remote for update, proxy repo jammy failed to fetch pool/main/a/apport/python3-apport_2.20.11-0ubuntu82.1_all.deb, content not in cache.
2022-05-27 15:35:07,924+0200 WARN [qtp224538098-39738] *UNKNOWN org.sonatype.nexus.repository.apt.orient.internal.proxy.OrientAptProxyFacet - Exception java.io.IOException: Invalid debian package: no control file checking remote for update, proxy repo jammy failed to fetch pool/main/a/apport/apport_2.20.11-0ubuntu82.1_all.deb, content not in cache.
2022-05-27 15:35:08,064+0200 WARN [qtp224538098-39738] *UNKNOWN org.sonatype.nexus.repository.apt.orient.internal.proxy.OrientAptProxyFacet - Exception java.io.IOException: Invalid debian package: no control file checking remote for update, proxy repo jammy failed to fetch pool/main/g/gtk+3.0/gtk-update-icon-cache_3.24.33-1ubuntu2_amd64.deb, content not in cache.
2022-05-27 15:35:08,361+0200 WARN [qtp224538098-39738] *UNKNOWN org.sonatype.nexus.repository.apt.orient.internal.proxy.OrientAptProxyFacet - Exception java.io.IOException: Invalid debian package: no control file checking remote for update, proxy repo jammy failed to fetch pool/main/o/openldap/ldap-utils_2.5.11+dfsg-1~exp1ubuntu3.1_amd64.deb, content not in cache.
2022-05-27 15:35:08,721+0200 WARN [qtp224538098-39738] *UNKNOWN org.sonatype.nexus.repository.apt.orient.internal.proxy.OrientAptProxyFacet - Exception java.io.IOException: Invalid debian package: no control file checking remote for update, proxy repo jammy failed to fetch pool/main/o/openldap/libldap-2.5-0_2.5.11+dfsg-1~exp1ubuntu3.1_amd64.deb, content not in cache.
2022-05-27 15:35:13,826+0200 WARN [qtp224538098-39738] *UNKNOWN org.sonatype.nexus.repository.apt.orient.internal.proxy.OrientAptProxyFacet - Exception java.io.IOException: Invalid debian package: no control file checking remote for update, proxy repo jammy failed to fetch pool/main/c/ceph/librados2_17.2.0-0ubuntu0.22.04.1_amd64.deb, content not in cache.
2022-05-27 15:35:14,951+0200 WARN [qtp224538098-39738] *UNKNOWN org.sonatype.nexus.repository.apt.orient.internal.proxy.OrientAptProxyFacet - Exception java.io.IOException: Invalid debian package: no control file checking remote for update, proxy repo jammy failed to fetch pool/main/c/ceph/libcephfs2_17.2.0-0ubuntu0.22.04.1_amd64.deb, content not in cache.
2022-05-27 15:35:15,389+0200 WARN [qtp224538098-39738] *UNKNOWN org.sonatype.nexus.repository.apt.orient.internal.proxy.OrientAptProxyFacet - Exception java.io.IOException: Invalid debian package: no control file checking remote for update, proxy repo jammy failed to fetch pool/main/g/gtk+3.0/libgtk-3-common_3.24.33-1ubuntu2_all.deb, content not in cache.
2022-05-27 15:35:20,092+0200 WARN [qtp224538098-39738] *UNKNOWN org.sonatype.nexus.repository.apt.orient.internal.proxy.OrientAptProxyFacet - Exception java.io.IOException: Invalid debian package: no control file checking remote for update, proxy repo jammy failed to fetch pool/main/g/gtk+3.0/libgtk-3-0_3.24.33-1ubuntu2_amd64.deb, content not in cache.
2022-05-27 15:35:20,280+0200 WARN [qtp224538098-39738] *UNKNOWN org.sonatype.nexus.repository.apt.orient.internal.proxy.OrientAptProxyFacet - Exception java.io.IOException: Invalid debian package: no control file checking remote for update, proxy repo jammy failed to fetch pool/main/g/gtk+3.0/libgtk-3-bin_3.24.33-1ubuntu2_amd64.deb, content not in cache.
2022-05-27 15:35:20,389+0200 WARN [qtp224538098-39738] *UNKNOWN org.sonatype.nexus.repository.apt.orient.internal.proxy.OrientAptProxyFacet - Exception java.io.IOException: Invalid debian package: no control file checking remote for update, proxy repo jammy failed to fetch pool/main/o/openldap/libldap-common_2.5.11+dfsg-1~exp1ubuntu3.1_all.deb, content not in cache.
2022-05-27 15:35:51,782+0200 WARN [qtp224538098-39738] *UNKNOWN org.sonatype.nexus.repository.apt.orient.internal.proxy.OrientAptProxyFacet - Exception java.io.IOException: Invalid debian package: no control file checking remote for update, proxy repo jammy failed to fetch pool/main/l/linux/linux-modules-5.15.0-33-generic_5.15.0-33.34_amd64.deb, content not in cache.
2022-05-27 15:35:52,180+0200 WARN [qtp224538098-39738] *UNKNOWN org.sonatype.nexus.repository.apt.orient.internal.proxy.OrientAptProxyFacet - Exception java.io.IOException: Invalid debian package: no control file checking remote for update, proxy repo jammy failed to fetch pool/main/l/linux-signed/linux-image-5.15.0-33-generic_5.15.0-33.34_amd64.deb, content not in cache.
2022-05-27 15:35:53,337+0200 WARN [qtp224538098-39722] *UNKNOWN org.sonatype.nexus.repository.apt.orient.internal.proxy.OrientAptProxyFacet - Exception java.io.IOException: Invalid debian package: no control file checking remote for update, proxy repo jammy failed to fetch pool/main/l/linux/linux-modules-extra-5.15.0-33-generic_5.15.0-33.34_amd64.deb, content not in cache.
2022-05-27 15:35:53,368+0200 WARN [qtp224538098-39741] *UNKNOWN org.sonatype.nexus.repository.apt.orient.internal.proxy.OrientAptProxyFacet - Exception java.io.IOException: Invalid debian package: no control file checking remote for update, proxy repo jammy failed to fetch pool/main/l/linux-meta/linux-generic_5.15.0.33.36_amd64.deb, content not in cache.
2022-05-27 15:35:53,399+0200 WARN [qtp224538098-39722] *UNKNOWN org.sonatype.nexus.repository.apt.orient.internal.proxy.OrientAptProxyFacet - Exception java.io.IOException: Invalid debian package: no control file checking remote for update, proxy repo jammy failed to fetch pool/main/l/linux-meta/linux-image-generic_5.15.0.33.36_amd64.deb, content not in cache.
2022-05-27 15:35:53,649+0200 WARN [qtp224538098-39741] *UNKNOWN org.sonatype.nexus.repository.apt.orient.internal.proxy.OrientAptProxyFacet - Exception java.io.IOException: Invalid debian package: no control file checking remote for update, proxy repo jammy failed to fetch pool/main/l/linux/linux-headers-5.15.0-33_5.15.0-33.34_all.deb, content not in cache.

I’m getting the same error. Logs look similar to what you’ve posted. I’m still digging, will respond again if I find anything.

Upgrading from 3.37.3-2 to 3.39.0-01 fixed the issue. I’m happy now.

1 Like

After upgrading to version 3.40.0-03 the problem has resolved itself.