Service check for system updates fails due to a GPG signature error
Related to Copied
After installing or upgrading to OP5 Monitor 9, running the service to check for system updates returns a GPG signature error.
Problem Copied
You have a service that checks for system updates and it is returning an error:
Running “Test this check” returns an error as well:
_USER1_/check_yum_update
Result code: 3
ERROR OUTPUT:
Importing GPG key 0xF6E3ADE7:
Userid : "op5 AB (op5 AB rpm signing) <support@op5.com>"
Fingerprint: 5063 C039 1143 B66E C653 D467 2F24 77F3 F6E3 ADE7
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-op5
Error: Failed to download metadata for repo 'op5-monitor-9-updates': repomd.xml GPG signature verification error: Bad GPG signature
====================
STANDARD OUTPUT:
Unknown problem
However, running the check when logged in as root user on the command line works without problem:
[root@mon9 ~]# /opt/plugins/check_yum_update
There are 38 updates available for your system |Available packages: Last, NetworkManager.x86_64, ...
Possible Cause(s) Copied
This is caused by the monitor user not being able to acquire the GPG keys. The root user has the keys since it has previously been able to run dnf-related commands such as dnf check-update, while the monitor user has not.
Possible Solution(s) Copied
Either login as the monitor user and run a dnf check-update to obtain the GPG keys or as a root or sudo-enabled user, run asmonitor dnf check-update.
Functionality can be verified after by running the plugin on the command line through asmonitor:
## asmonitor dnf check-update
## asmonitor /opt/plugins/check_yum_update
No read/execute access in current directory, moving to /
Your system is fully updated
NOTE: This has been addressed in OP5 Monitor version 9.1 and above. Refer to the release notes for more information.