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.
Ubuntu 20.4 product created, Content View published for “focal main” repository
Registered the Ubuntu client to foreman server and subscription identity shows all good.
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.
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
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?:
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.
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?
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.