Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
Cert Check appears to be failing on rhel7. Expecting the rhsmcertd.log to show "(Cert Check) Certificates updated." every time the rhsmcertd.certFrequency triggers, but instead "(Cert Check) Update failed (255)" is being logged
Version-Release number of selected component (if applicable):
[root@jsefler-7 ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: 0.7.24-1
subscription-manager: 1.8.1-1.git.8.47da6cb.el7
python-rhsm: 1.8.1-1.git.2.de00499.el7
How reproducible:
Steps to Reproduce:
[root@jsefler-7 ~]# subscription-manager config --rhsmcertd.certfrequency=1
[root@jsefler-7 ~]# subscription-manager config --server.insecure=1
[root@jsefler-7 ~]# subscription-manager register --serverurl=http://jsefler-f14-candlepin.usersys.redhat.com:8443/candlepin
Username: testuser1
Password:
Organization: admin
The system has been registered with id: d6b6c812-6f4b-442f-98ff-4924d6352bb3
[root@jsefler-7 ~]#
[root@jsefler-7 ~]# service rhsmcertd restart
Redirecting to /bin/systemctl restart rhsmcertd.service
THEN WAIT 2 MINUTES AND TAIL /var/log/rhsm/rhsmcertd.log AND /var/log/rhsm/rhsm.log
Actual results:
[root@jsefler-7 ~]# tail -f /var/log/rhsm/rhsmcertd.log
Mon Feb 4 16:40:29 2013 [WARN] (Healing) Update failed (255), retry will occur on next run.
Mon Feb 4 16:40:29 2013 [WARN] (Cert Check) Update failed (255), retry will occur on next run.
Mon Feb 4 16:40:29 2013 [WARN] (Cert Check) Update failed (255), retry will occur on next run.
Mon Feb 4 16:40:29 2013 [INFO] rhsmcertd is shutting down...
Mon Feb 4 16:40:29 2013 [INFO] Starting rhsmcertd...
Mon Feb 4 16:40:29 2013 [INFO] Healing interval: 1440.0 minute(s) [86400 second(s)]
Mon Feb 4 16:40:29 2013 [INFO] Cert check interval: 1.0 minute(s) [60 second(s)]
Mon Feb 4 16:40:29 2013 [INFO] Waiting 120 second(s) [2.0 minute(s)] before running updates.
Mon Feb 4 16:41:30 2013 [WARN] (Cert Check) Update failed (255), retry will occur on next run.
Mon Feb 4 16:42:30 2013 [WARN] (Healing) Update failed (255), retry will occur on next run.
Mon Feb 4 16:42:30 2013 [WARN] (Cert Check) Update failed (255), retry will occur on next run.
Mon Feb 4 16:42:30 2013 [WARN] (Cert Check) Update failed (255), retry will occur on next run.
[root@jsefler-7 ~]# tail -f /var/log/rhsm/rhsm.log
2013-02-04 16:42:30,713 [DEBUG] @profile.py:95 - Loading current RPM profile.
2013-02-04 16:42:30,714 [ERROR] @rhsmcertd-worker:83 - Error while updating certificates using daemon
2013-02-04 16:42:30,715 [ERROR] @rhsmcertd-worker:85 - rpmdb open failed
Traceback (most recent call last):
File "/usr/libexec/rhsmcertd-worker", line 73, in <module>
main(options, log)
File "/usr/libexec/rhsmcertd-worker", line 43, in main
key_file=ConsumerIdentity.keypath())
File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 583, in __init__
ssl_verify_depth=self.ssl_verify_depth)
File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 313, in __init__
v = Versions()
File "/usr/lib64/python2.7/site-packages/rhsm/version.py", line 42, in __init__
self._collect_data()
File "/usr/lib64/python2.7/site-packages/rhsm/version.py", line 47, in _collect_data
for package_def in self._get_packages():
File "/usr/lib64/python2.7/site-packages/rhsm/version.py", line 53, in _get_packages
profile = RPMProfile()
File "/usr/lib64/python2.7/site-packages/rhsm/profile.py", line 98, in __init__
installed = ts.dbMatch()
error: rpmdb open failed
This seems to only happen if invoked from systemctl
(for slightly easier debugging, /usr/lib/systemd/system/rhsmcertd.service
can be modified to add a '-d -n' to ExceStart line to trigger the
error on startup instead of waiting 2min)
I suspect this is selinux related. Or at least, there are selinux denials
for other rhsmcertd related things on the tests box I had.
What's the output of `sestatus` and `rpm -q selinux-policy selinux-policy-targeted`?
grep "rhsmcertd" /var/log/audit/audit.log and see if there are any
denials on the systems showing this.
Adrian
After yum update selinux-policy
from
selinux-policy-3.11.1-75.el7.noarch
to
selinux-policy-3.12.1-25.el7.noarch
the tail -f /var/log/rhsm/rhsmcertd.log started displaying
Tue Jul 8 17:42:25 1997 [INFO] (Cert Check) Certificates updated.
Moving this bug to CLOSED WORKSFORME after yum update selinux-policy