Unable to list packages for Ubuntu 20.04


We are using Foreman 1.24.3 version in production. RedHat and CentOS distributions are working as expected. However, we started to use Ubuntu 20.04 but unable to list the packages in client machines.

  1. Ubuntu 20.4 product created, Content View published for “focal main” repository
  2. Registered the Ubuntu client to foreman server and subscription identity shows all good.

@client:/home/ubuntu# subscription-manager identity
system identity: a22f28ff-7396-42f0-a8ab-3e25fbc83d29
name: servername
org name: dummy_comp
org ID: dummy_comp
environment name: Dev/Ubuntu_20_04_new

  1. But when i try to do $apt update on the client. It shows the below errors.

Ign:4 katello://dummy_server/pulp/deb/Eurofins/Dev/Ubuntu_20_04_new/custom/Ubuntu_Server_LTS_20_04_new/http_de_archive_ubuntu_com_ubuntu default/all all Packages
Ign:5 katello://dummy_server/pulp/deb/Eurofins/Dev/Ubuntu_20_04_new/custom/Ubuntu_Server_LTS_20_04_new/http_de_archive_ubuntu_com_ubuntu default/all Translation-en
Ign:6 katello://dummy_server/pulp/deb/Eurofins/Dev/Ubuntu_20_04_new/custom/Ubuntu_Server_LTS_20_04_new/http_de_archive_ubuntu_com_ubuntu default/all Translation-en_US
Ign:7 katello://dummy_server/pulp/deb/Eurofins/Dev/Ubuntu_20_04_new/custom/Ubuntu_Server_LTS_20_04_new/http_de_archive_ubuntu_com_ubuntu default/all amd64 c-n-f Metadata
Ign:8 katello://dummy_server/pulp/deb/Eurofins/Dev/Ubuntu_20_04_new/custom/Ubuntu_Server_LTS_20_04_new/http_de_archive_ubuntu_com_ubuntu default/all all c-n-f Metadata
Err:3 katello://dummy_server/pulp/deb/Eurofins/Dev/Ubuntu_20_04_new/custom/Ubuntu_Server_LTS_20_04_new/http_de_archive_ubuntu_com_ubuntu default/all amd64 Packages
404 Not Found
Ign:4 katello://dummy_server/pulp/deb/Eurofins/Dev/Ubuntu_20_04_new/custom/Ubuntu_Server_LTS_20_04_new/http_de_archive_ubuntu_com_ubuntu default/all all Packages
Reading package lists… Done
E: Failed to fetch katello://dummy_server/pulp/deb/Eurofins/Dev/Ubuntu_20_04_new/custom/Ubuntu_Server_LTS_20_04_new/http_de_archive_ubuntu_com_ubuntu/dists/default/all/binary-amd64/Packages 404 Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.

  1. Eventually when i search for a package, it shows nothing:

@client:/home/ubuntu# apt search net-tools
Sorting… Done
Full Text Search… Done
iproute2/now 5.5.0-1ubuntu1 amd64 [installed,local]
networking and traffic control tools

Few more information:
/etc/apt/sources.list → file is empty and not using any public repositories

@client:/home/ubuntu# subscription-manager repos
Available Repositories in /etc/yum.repos.d/redhat.repo
Repo ID: dummy_company_================
Repo Name: Focal Main
Repo URL: https://dummy_server/pulp/deb/Eurofins/Dev/Ubuntu_20_04_new/custom/Ubuntu_Server_LTS_20_04_new/http_de_archive_ubuntu_com_ubuntu
Enabled: 1

$ cat /etc/pulp/server/plugins.conf.d/deb_distributor.json
“publish_default_release”: true

Content is already available in foreman and it’s synced:

Any suggestions would be appreciated.

Expected outcome:
net-tools package to be displayed

Foreman and Proxy versions:

Foreman and Proxy plugin versions:

Distribution and version:
Foreman 1.24.3

Other relevant data:

First of all 1.24 is very old and I am not sure what the state of APT repo support in that version was.

One possibility is that your Pulp instance may not be configured to publish the distribution used by subscription-manager. Can you check if /etc/pulp/server/plugins.conf.d/deb_distributor.json exists on your machine, and if it had the following line in it?:

  "publish_default_release": true,

The full file on my test system looks like this:

# cat /etc/pulp/server/plugins.conf.d/deb_distributor.json 
  "publish_default_release": true,
  "gpg_cmd": "/opt/orcharhino/apt_sign.sh",
  "gpg_key_id": "37C03ABE"

Make sure you have this file, with at least "publish_default_release": true set (and make sure the file is valid JSON). Then restart your Pulp services, and use “republish repository metadata” on any relevant Katello repos/content views. See if subscription-manager can now find the repos.

If this does not fix your issue then I am out of ideas for that version of Foreman.

Thanks for the response.

Yes, this file already exists and the content is almost same and i have verified the jason file. It’s valid.

@dummy_server ]# cat /etc/pulp/server/plugins.conf.d/deb_distributor.json
“publish_default_release”: true
@dummy_server ]#

It’s old version but we cannot update to latest version as it’s already in production. Any suggestions please?

Can you show me the repository page for your “focal main” repository, so I can have a look at the sync options?
Also, where are you getting your Ubuntu subscription-manager from?

Sure. This is the “focal main” repository.

I have installed the subscription-manager and it’s packages for Ubuntu from Index of /Ubuntu20LTS

On the test environment with Foreman 3.1.3. Ubuntu 20.04 is absolutely working as expected and we can see all the packages and installable also.

I guess the old version of Foreman 1.24 probably not supported for Ubuntu or missing some configuration.

I am still trying to find if there is any solution available for Foreman 1.24 to make it work with Ubuntu 20.04.

Thank you so much for the response and time taking for the suggestions.

Can you confirm that when you click the link at “Published At” on the repository page you posted, there is a file at dists/default/all/binary-amd64/Packages?

If this file is there (and not empty), then your Foreman/Katello server has everything it should have. In this case the problem is most likely found in the communication between subscription-manager and the server. Perhaps something to do with authentication. (As in subscription manager can’t see the relevant repositories because it does not have the right permissions/authentication. Although you are getting 404 and not 403, so maybe not permissions.) Whatever it is, it could be the subscription-manager version used has some incompatibility with Foreman 1.24.

Thank you.

I could not open the “Published At” link as it says " The connection for this site is not secure".


However, i can see that the Packages files exists on the server but it’s not empty. It has the package information.

[root@dummy_server binary-amd64 ]# pwd

[root@dummy_server binary-amd64 ]# grep -i net-tools Packages
Package: net-tools
Original-Maintainer: net-tools Team team+net-tools@tracker.debian.org
Homepage: net-tools download | SourceForge.net
Filename: pool/all/net-tools_1.60+git20180626.aebd88e-1ubuntu1_amd64.deb
Recommends: libxml2-utils, net-tools

[root@dummy_server binary-amd64 ]# du -hs Packages
5.2M Packages

Not sure if this files supposed to be empty. As suggested, subscription-manager version used has some incompatibility with Foreman 1.24.

What was the fix exactly? I am facing the same issue.

My environment:
Foreman: 1.24.3
Katello: 3.14.1
Pulp: 2.21.5