Page 1 of 1

Unable to apply configuration - just hangs

Posted: Tue Apr 28, 2015 4:25 pm
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! :)

Re: Unable to apply configuration - just hangs

Posted: Tue Apr 28, 2015 4:46 pm
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

Re: Unable to apply configuration - just hangs

Posted: Thu Apr 30, 2015 9:15 am
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! :)

Re: Unable to apply configuration - just hangs

Posted: Thu Apr 30, 2015 2:17 pm
by ssax
Ok, thanks for updating, I'm going to mark this as resolved and lock the topic.