subscription-manager generally works, except for anything around ‘subscription-manager repos’.
List of enabled/disabled repositories
The Foreman/Katello server is running CentOS7, fully patched.
katello-3.14.1-1.el7.noarch
foreman-1.24.1-1.el7.noarch
I’ve tested subscription-manager on CentOS6, CentOS7, Oracle Linux 6 and Oracle Linux 7. All of them exhibit the following sort of output:
# subscription-manager repos
This system has no repositories available through subscriptions.
There are slightly different errors in /var/log/rhsm/rhsm.log on the client hosts.
CentOS6/OL6:
ValueError: Invalid date Bad time value: Invalid month: Bad
2020-01-20 14:16:27,933 [ERROR] subscription-manager:5242 @entcertlib.py:366 - Invalid date Bad time value: Invalid month: Bad
Traceback (most recent call last):
File “/usr/share/rhsm/subscription_manager/entcertlib.py”, line 339, in install
key, cert = self.build_cert(bundle)
File “/usr/share/rhsm/subscription_manager/entcertlib.py”, line 360, in build_cert
cert = create_from_pem(crtpem)
File “/usr/lib64/python2.6/site-packages/rhsm/certificate.py”, line 64, in create_from_pem
return _CertFactory().create_from_pem(pem)
File “/usr/lib64/python2.6/site-packages/rhsm/certificate2.py”, line 74, in create_from_pem
return self._read_x509(_certificate.load(pem=pem), path, pem)
File “/usr/lib64/python2.6/site-packages/rhsm/certificate2.py”, line 100, in _read_x509
raise CertificateException(str(e))
CertificateException: Invalid date Bad time value: Invalid month: Bad
2020-01-20 14:16:27,933 [ERROR] subscription-manager:5242 @entcertlib.py:367 - Bundle not loaded:
CentOS7:
ValueError: unknown string format
2020-01-20 07:17:45,651 [ERROR] subscription-manager:10312:MainThread @entcertlib.py:404 - unknown string format
Traceback (most recent call last):
File “/usr/lib64/python2.7/site-packages/subscription_manager/entcertlib.py”, line 377, in install
key, cert = self.build_cert(bundle)
File “/usr/lib64/python2.7/site-packages/subscription_manager/entcertlib.py”, line 398, in build_cert
cert = create_from_pem(crtpem)
File “/usr/lib64/python2.7/site-packages/rhsm/certificate.py”, line 61, in create_from_pem
return _CertFactory().create_from_pem(pem)
File “/usr/lib64/python2.7/site-packages/rhsm/certificate2.py”, line 82, in create_from_pem
return self._read_x509(_certificate.load(pem=pem), path, pem)
File “/usr/lib64/python2.7/site-packages/rhsm/certificate2.py”, line 113, in _read_x509
raise CertificateException(str(e))
CertificateException: unknown string format
OL7: oddly enough, this error looks like the OL6 error.
CentOS6:
subscription-manager-1.17.6-1.el6.x86_64
CentOS7:
subscription-manager-1.24.13-3.el7.centos.x86_64
OL6:
subscription-manager-1.17.6-1.el6.x86_64
OL7:
subscription-manager-1.17.6-1.el7.centos.x86_64
This is all on a fairly fresh install, paved over & rebuilt less than 2 weeks ago. I’m currently using the dgoodwin SubscriptionManager repositories.
What on earth do I have wrong?