Unable to apply configuration - just hangs

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
krutaw
Posts: 60
Joined: Wed Jul 31, 2013 6:30 pm

Unable to apply configuration - just hangs

Post by krutaw »

So I had the mis-fortune of having a problem with one of my Nagios XI servers today where applying configuration would hang infinitely. I'm posting this to share how I fixed it so that hopefully someone doesn't bang their head on the desk like I did.


- Verified that the /etc/php.ini settings were configured as mentioned in this article: http://support.nagios.com/wiki/index.ph ... leshooting
- Verified the age of the password of my nagios user: sudo chage -l nagios
Last password change : May 19, 2013
Password expires : never
Password inactive : never
Account expires : Jan 20, 11761191
Minimum number of days between password change : 0
Maximum number of days between password change : 99999
Number of days of warning before password expires : 7


- Verified that the permissions on the /usr/local/nagiosxi folder structure were set properly based on this forum entry: http://support.nagios.com/forum/viewtop ... =6&t=21972
- Verified that crond was running
- Attempted restarting crond just for good measure
- Attempted to run crontab -l as nagios user <~~~~SPARK OF BRILLIANCE
This lead me to look in the /var/log/cron file for errors which showed this:
Apr 28 15:56:01 atxentlnag-p01 crond[1706]: (nagios) FAILED to authorize user with PAM (Permission denied)


In order to fix this, I added the nagios user to /etc/cron.allow and edited /etc/pam.d/crond to include the following line:
account sufficient pam_listfile.so item=user sense=allow file=/etc/cron.allow onerr=succeed

Then I restarted crond, and voila, Nagios XI (via CCM) can now apply configuration.

Happy Monitoring! :)
Last edited by krutaw on Thu Apr 30, 2015 9:16 am, edited 1 time in total.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Unable to apply configuration - just hangs

Post by ssax »

Thanks for posting your solution!

I also found a post that said that you should just restart your cron daemon if you experience that, did you try that?

Code: Select all

service crond restart
krutaw
Posts: 60
Joined: Wed Jul 31, 2013 6:30 pm

Re: Unable to apply configuration - just hangs

Post by krutaw »

Yup, but as you can see in the error log, it wasn't a matter of cron needing to be restarted, it was literally a matter of the user not having permissions. I should have mentioned that, my bad. I'll update the post. Thanks for pointing that out! :)
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Unable to apply configuration - just hangs

Post by ssax »

Ok, thanks for updating, I'm going to mark this as resolved and lock the topic.
Locked