If you connect to your Rocky 9 system via the Cockpit web interface, there is an option under the Applications tab to install “Subscription Manager in Cockpit”. If you do this, it might make your system think that it needs to be registered with a RedHat subscription. After that, dnf updates may fail with the following error:
Unable to read consumer identity
This system is not registered with an entitlement server. You can use subscription-manager to register.
Of course, you don’t need a subscription to run Rocky 9. It seems like a bug that Cockpit assumes that you need a subscription. To un-do this screw-up, edit the following file and change “enabled=1” to “enabled=0”:
/etc/dnf/plugins/subscription-manager.conf
Reboot after? Maybe. To prevent it from happening again, enter the following configuration change:
The behavior you’re describing is not typical so I’m curious as to the configuration of this system and the versions of packages it is running, as we patch subscription-manager to be disabled by default.
I wonder what your subscription-manager config contains.
Here is mine. Note that I have set auto_enable_yum_plugins = 0, which prevents the problem from occurring. If the value is inside square brackets, then it’s the default. Note that mine is NOT, meaning I set the value myself.
I am sorry that I could not tell you what the value was prior to me ignorantly clicking on the subscription-manager “install” button in Cockpit. Nevertheless, there are a lot of “rhsm” (RedHat) links in the config file, and perhaps the ported subscription-manager in the appstream should nullify those, as well as make sure that the auto_enable_yum_plugins is set to 0.
If my config file is an anomaly, then something strange crawled into my system without my awareness.
Something strange – I browsed two prior backups, and subscription-manager did not exist on either one. ie, the directory /etc/rhsm did not exist, but it does now. (note - that directory contains the configuration file for subscription-manager.) Thus I assume that it was created after clicking the subscription-manager install button in Cockpit. Therefore, I think it might be safe to simply uninstall subscription manager and never touch the Install button in Cockpit again.
# dnf erase subscription-manager
Dependencies resolved.
======================================================================================================================================
Package Architecture Version Repository Size
======================================================================================================================================
Removing:
subscription-manager x86_64 1.29.47.1-1.el9_7.rocky.0.1 @baseos 3.4 M
Removing dependent packages:
subscription-manager-cockpit noarch 6-2.el9.rocky.0.1 @baseos 1.2 M
Transaction Summary
======================================================================================================================================
Remove 2 Packages
Freed space: 4.6 M
Is this ok [y/N]: y
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Erasing : subscription-manager-cockpit-6-2.el9.rocky.0.1.noarch 1/2
Running scriptlet: subscription-manager-1.29.47.1-1.el9_7.rocky.0.1.x86_64 2/2
Removed "/etc/systemd/system/multi-user.target.wants/rhsmcertd.service".
Erasing : subscription-manager-1.29.47.1-1.el9_7.rocky.0.1.x86_64 2/2
warning: /etc/rhsm/rhsm.conf saved as /etc/rhsm/rhsm.conf.rpmsave
warning: /etc/dnf/plugins/subscription-manager.conf saved as /etc/dnf/plugins/subscription-manager.conf.rpmsave
Running scriptlet: subscription-manager-1.29.47.1-1.el9_7.rocky.0.1.x86_64 2/2
Verifying : subscription-manager-1.29.47.1-1.el9_7.rocky.0.1.x86_64 1/2
Verifying : subscription-manager-cockpit-6-2.el9.rocky.0.1.noarch 2/2
Removed:
subscription-manager-1.29.47.1-1.el9_7.rocky.0.1.x86_64 subscription-manager-cockpit-6-2.el9.rocky.0.1.noarch
Complete!
Now the config file simply exists as /etc/rhsm/rhsm.conf.rpmsave, which is the vestigial remains of its once-active existence.