Persistent Yum Updates warnings
Persistent Yum Updates warnings
Hello,
I'm running XI version 5.5.2 using the vmware appliance.
I'm seeing something weird with a couple of the Linux servers I monitor. On two of them out of 13 I get persistent Yum Updates warnings that say that there are packages requiring update. When I go on those servers and do yum updates I see no updates available. I can even enable EPEL and get updates from there in case nrpe is finding those too, but still it reports that updates are available. I found an old help for someone that suggested doing a "yum clean all" as root and as the nagios user. I've done that. The nagios user gets an error trying to clean packages, but they're all cleaned out by root. Still no change.
What do I need to do to get it to be correct?
Thanks.
I'm running XI version 5.5.2 using the vmware appliance.
I'm seeing something weird with a couple of the Linux servers I monitor. On two of them out of 13 I get persistent Yum Updates warnings that say that there are packages requiring update. When I go on those servers and do yum updates I see no updates available. I can even enable EPEL and get updates from there in case nrpe is finding those too, but still it reports that updates are available. I found an old help for someone that suggested doing a "yum clean all" as root and as the nagios user. I've done that. The nagios user gets an error trying to clean packages, but they're all cleaned out by root. Still no change.
What do I need to do to get it to be correct?
Thanks.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Persistent Yum Updates warnings
you would want to do the yum clean all as the root user
Re: Persistent Yum Updates warnings
If you opened the "check_yum" plugin in a text editor, you would see that it uses the "yum check-update" command.
If the exit code is NOT 0 (zero), it returns WARNING.
From the yum manual:
Code: Select all
$yum = system("yum check-update >/dev/null");From the yum manual:
What do you see, when you run the following commands on the remote machine?check-update
Implemented so you could know if your machine had any updates that needed to be applied without running it interactively.
Returns exit value of 100 if there are packages available for an update. Also returns a list of the packages to be updated
in list format. Returns 0 if no packages are available for update. Returns 1 if an error occurred. Running in verbose
mode also shows obsoletes.
Code: Select all
yum check-update
echo $?Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Persistent Yum Updates warnings
I'm getting
If I run as anything other than root. I believe that's what is causing it, but only for 2 out of those 13 machines I'm monitoring. On other machines I am able to run the command as a non-root user.
It doesn't seem to be an selinux related thing.
Code: Select all
Loaded plugins: product-id, search-disabled-repos
[Errno 13] Permission denied: '//var/lib/yum/rpmdb-indexes/version'
It doesn't seem to be an selinux related thing.
Re: Persistent Yum Updates warnings
Run the following command as root to see if this is going to fix the permissions issue:
Then, try your command again as a "non-root" user.
Code: Select all
chmod go+r /var/lib/yum/rpmdb-indexes/*Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Persistent Yum Updates warnings
OK. I tried that command to give permissions on that directory. Before doing that I'd done a yum clean all as root again, though, so that directory didn't have contents...
Here is the output:
But now the return code is 0 so the warnings went away. I'm not confident that the update check is actually doing anything, though.
Here is the output:
Code: Select all
Loaded plugins: product-id, refresh-packagekit, search-disabled-repos, subscription-manager
Repo rhel-6-server-rpms forced skip_if_unavailable=True due to: /etc/pki/entitlement/234234234289234234-key.pem
Repo rhel-6-server-optional-rpms forced skip_if_unavailable=True due to: /etc/pki/entitlement/234234234289234234-key.pem
https://cdn.redhat.com/content/dist/rhel/server/6/6Server/i386/optional/os/repodata/repomd.xml: [Errno 14] problem with the local client certificate
Trying other mirror.
https://cdn.redhat.com/content/dist/rhel/server/6/6Server/i386/os/repodata/repomd.xml: [Errno 14] problem with the local client certificate
Trying other mirror.
Re: Persistent Yum Updates warnings
This error:
https://access.redhat.com/solutions/57835
Thank you!
has nothing to do with our plugin... According to RedHat, the root cause for it is this:[Errno 14] problem with the local client certificate
Trying other mirror.
Here's an article, providing a solution for you:The system is subscribed to both Red Hat Subscription Manager and Red Hat Network. When yum is initiated, the subscription-manager and rhnclient plugins conflict.
https://access.redhat.com/solutions/57835
Thank you!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Persistent Yum Updates warnings
Interesting. I don't get those messages when running the update check as root. I'll give that a try, though.
Re: Persistent Yum Updates warnings
I'm not subscribed to both, but in looking at the error message more carefully and checking up through your previous suggestion about the yum cache permission I decided to try giving permission to the entitlements key to the nagios user.
Did
and now it works.
Thanks for the suggestions.
Did
Code: Select all
# chmod o+r /etc/pki/entitlements/*Thanks for the suggestions.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Persistent Yum Updates warnings
Great! Lockingamunter wrote:I'm not subscribed to both, but in looking at the error message more carefully and checking up through your previous suggestion about the yum cache permission I decided to try giving permission to the entitlements key to the nagios user.
Did
and now it works.Code: Select all
# chmod o+r /etc/pki/entitlements/*
Thanks for the suggestions.