Page 3 of 5

Re: Waiting for configuration verification never ends.

Posted: Tue Nov 06, 2018 5:01 pm
by suryakiran
I installed nagios with user root, Is that something i need to look-over as i am unable to restart with nagios user.

Re: Waiting for configuration verification never ends.

Posted: Tue Nov 06, 2018 5:13 pm
by lmiltchev
Log in as root and restart crond and nagios service. Let us know if this helped.

Re: Waiting for configuration verification never ends.

Posted: Tue Nov 06, 2018 5:21 pm
by suryakiran
Its still the same. I have added couple of hosts and nothing is getting updated.
Let me know if you need to verify any logs.

Re: Waiting for configuration verification never ends.

Posted: Tue Nov 06, 2018 5:42 pm
by lmiltchev
Run the following commands as root user and show the output:

Code: Select all

service nagios stop
service ndo2db restart
service nagios start
service crond restart
tail -50 /var/log/cron
Log in as nagios user:

Code: Select all

su - nagios
run the following commands, and show the output:

Code: Select all

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
/usr/local/nagiosxi/scripts/reconfigure_nagios.sh

Re: Waiting for configuration verification never ends.

Posted: Wed Nov 07, 2018 9:37 am
by suryakiran
Hi Good Morning,

Please check the below output.

tail -50 /var/log/cron
Nov 7 09:35:01 njbbngeoxp3v CROND[23734]: (stdsmont) CMD (/opt/stdsmont/bin/heartbeat.pl > /dev /null 2>&1)
Nov 7 09:35:01 njbbngeoxp3v CROND[23736]: (stdsmont) CMD (/opt/stdsmont/agent/linux/proc_mon/ch eck_hungproc.pl > /dev/null 2>&1)
Nov 7 09:35:01 njbbngeoxp3v CROND[23735]: (stdsmont) CMD (/opt/stdsmont/bin/checkstdsmont.pl > /dev/null 2>&1)
Nov 7 09:35:01 njbbngeoxp3v crontab[23754]: (stdsmont) LIST (stdsmont)
Nov 7 09:35:01 njbbngeoxp3v crond[23717]: (nagios) PAM ERROR (Permission denied)
Nov 7 09:35:01 njbbngeoxp3v crond[23721]: (nagios) PAM ERROR (Permission denied)
Nov 7 09:35:01 njbbngeoxp3v crond[23720]: (nagios) PAM ERROR (Permission denied)
Nov 7 09:35:01 njbbngeoxp3v crond[23717]: (nagios) FAILED to authorize user with PAM (Permissio n denied)
Nov 7 09:35:01 njbbngeoxp3v crond[23716]: (nagios) PAM ERROR (Permission denied)
Nov 7 09:35:01 njbbngeoxp3v crond[23719]: (nagios) PAM ERROR (Permission denied)
Nov 7 09:35:01 njbbngeoxp3v crond[23721]: (nagios) FAILED to authorize user with PAM (Permissio n denied)
Nov 7 09:35:01 njbbngeoxp3v crond[23720]: (nagios) FAILED to authorize user with PAM (Permissio n denied)
Nov 7 09:35:01 njbbngeoxp3v crond[23725]: (nagios) PAM ERROR (Permission denied)
Nov 7 09:35:01 njbbngeoxp3v crond[23724]: (nagios) PAM ERROR (Permission denied)
Nov 7 09:35:01 njbbngeoxp3v crond[23718]: (nagios) PAM ERROR (Permission denied)
Nov 7 09:35:01 njbbngeoxp3v crond[23719]: (nagios) FAILED to authorize user with PAM (Permissio n denied)
Nov 7 09:35:01 njbbngeoxp3v crond[23722]: (nagios) PAM ERROR (Permission denied)
Nov 7 09:35:01 njbbngeoxp3v crond[23716]: (nagios) FAILED to authorize user with PAM (Permissio n denied)
Nov 7 09:35:01 njbbngeoxp3v crond[23723]: (nagios) PAM ERROR (Permission denied)
Nov 7 09:35:01 njbbngeoxp3v crond[23725]: (nagios) FAILED to authorize user with PAM (Permissio n denied)
Nov 7 09:35:01 njbbngeoxp3v crond[23724]: (nagios) FAILED to authorize user with PAM (Permissio n denied)
Nov 7 09:35:01 njbbngeoxp3v crond[23722]: (nagios) FAILED to authorize user with PAM (Permissio n denied)
Nov 7 09:35:01 njbbngeoxp3v crond[23718]: (nagios) FAILED to authorize user with PAM (Permissio n denied)
Nov 7 09:35:01 njbbngeoxp3v crond[23723]: (nagios) FAILED to authorize user with PAM (Permissio n denied)
Nov 7 09:35:40 njbbngeoxp3v crond[30411]: (CRON) INFO (Shutting down)
Nov 7 09:35:40 njbbngeoxp3v crond[23964]: (CRON) INFO (RANDOM_DELAY will be scaled with factor 46% if used.)
Nov 7 09:35:40 njbbngeoxp3v crond[23964]: (CRON) INFO (running with inotify support)
Nov 7 09:35:40 njbbngeoxp3v crond[23964]: (CRON) INFO (@reboot jobs will be run at computer's s tartup.)
Nov 7 09:35:59 njbbngeoxp3v crond[23964]: (CRON) INFO (Shutting down)
Nov 7 09:35:59 njbbngeoxp3v crond[23987]: (CRON) INFO (RANDOM_DELAY will be scaled with factor 27% if used.)
Nov 7 09:35:59 njbbngeoxp3v crond[23987]: (CRON) INFO (running with inotify support)
Nov 7 09:35:59 njbbngeoxp3v crond[23987]: (CRON) INFO (@reboot jobs will be run at computer's s tartup.)
Nov 7 09:36:01 njbbngeoxp3v crond[23992]: (nagios) PAM ERROR (Permission denied)
Nov 7 09:36:01 njbbngeoxp3v crond[23997]: (nagios) PAM ERROR (Permission denied)
Nov 7 09:36:01 njbbngeoxp3v crond[23994]: (nagios) PAM ERROR (Permission denied)
Nov 7 09:36:01 njbbngeoxp3v crond[23995]: (nagios) PAM ERROR (Permission denied)
Nov 7 09:36:01 njbbngeoxp3v crond[23997]: (nagios) FAILED to authorize user with PAM (Permissio

su - nagios
Last login: Tue Nov 6 17:19:08 EST 2018 on pts/3
-bash-4.2$ /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

Nagios Core 4.2.4
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 12-07-2016
License: GPL

Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Read object config files okay...

Running pre-flight check on configuration data...

Checking objects...
Checked 13 services.
Checked 3 hosts.
Checked 12 host groups.
Checked 0 service groups.
Checked 2 contacts.
Checked 2 contact groups.
Checked 124 commands.
Checked 8 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 3 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 8 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 0
Total Errors: 0

Things look okay - No serious problems were detected during the pre-flight check
-bash-4.2$ /usr/local/nagiosxi/scripts/reconfigure_nagios.sh
URL: http://localhost/nagiosxi/includes/components/ccm/
CMDLINE
/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'submit=Login&hidelog=true&loginSubmitted=true&backend=1&username=nagiosxi&password=4RW8B4BVjbWD' -O nagiosql.login--2018-11-07 09:37:07-- http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost (localhost)... 127.0.0.1
Connecting to localhost (localhost)|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘nagiosql.login’

[ <=> ] 37,862 --.-K/s in 0.03s

2018-11-07 09:37:08 (1.28 MB/s) - ‘nagiosql.login’ saved [37862]

LOGIN SUCCESSFUL!
IMPORTING CONFIG FILES...URL: http://localhost/nagiosxi/includes/components/ccm/
Array
(
)
RESETTING PERMS
URL: http://localhost/nagiosxi/includes/components/ccm/
CMDLINE
/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'submit=Login&hidelog=true&loginSubmitted=true&backend=1&username=nagiosxi&password=4RW8B4BVjbWD' -O nagiosql.login--2018-11-07 09:37:08-- http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost (localhost)... 127.0.0.1
Connecting to localhost (localhost)|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘nagiosql.login’

[ <=> ] 37,862 --.-K/s in 0.02s

2018-11-07 09:37:09 (2.16 MB/s) - ‘nagiosql.login’ saved [37862]

LOGIN SUCCESSFUL!
URL: http://localhost/nagiosxi/includes/components/ccm/
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'backend=1&cmd=apply&type=writeConfig' -O nagiosql.export.monitoring
--2018-11-07 09:37:09-- http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost (localhost)... 127.0.0.1
Connecting to localhost (localhost)|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘nagiosql.export.monitoring’

[ <=> ] 22,065 --.-K/s in 0.02s

2018-11-07 09:37:09 (873 KB/s) - ‘nagiosql.export.monitoring’ saved [22065]

WRITE CONFIGS SUCCESSFUL!
OUTPUT:
Nagios Core 4.2.4
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 12-07-2016
License: GPL

Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Read object config files okay...

Running pre-flight check on configuration data...

Checking objects...
Checked 13 services.
Checked 3 hosts.
Checked 12 host groups.
Checked 0 service groups.
Checked 2 contacts.
Checked 2 contact groups.
Checked 124 commands.
Checked 8 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 3 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 8 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 0
Total Errors: 0

Things look okay - No serious problems were detected during the pre-flight check
RET: 0
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to manage system services or units.
Authenticating as: root
Password:
polkit-agent-helper-1: pam_authenticate failed: Authentication failure
==== AUTHENTICATION FAILED ===
Failed to restart nagios.service: Access denied
See system logs and 'systemctl status nagios.service' for details.

Re: Waiting for configuration verification never ends.

Posted: Wed Nov 07, 2018 10:15 am
by lmiltchev
On the first page of this post, @npolovenko said:
You have a polkit authentication agent running on this server, and its preventing the nagios user from having an access to the nagios service.
and you replied:
I have done the changes, I am able to execute the below command...
Now, we are seeing the same errors... Is polkit-agent still blocking nagios?
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to manage system services or units.
Authenticating as: root
Password:
polkit-agent-helper-1: pam_authenticate failed: Authentication failure
==== AUTHENTICATION FAILED ===
Failed to restart nagios.service: Access denied
See system logs and 'systemctl status nagios.service' for details.
If you want to use nagios to monitor your network infrastructure, you shouldn't be blocking it...

Also, I asked you to run 5 commands as root, but you showed us only the tail of the cron log... Please, run the following commands as root and show the output:

Code: Select all

service nagios stop
service ndo2db restart
service nagios start
service crond restart

Re: Waiting for configuration verification never ends.

Posted: Wed Nov 07, 2018 10:25 am
by suryakiran
Hi ,


Sorry about the yesterday message. I thought i have done the changes but i dint. I am able to execute the command /usr/local/nagiosxi/scripts/reconfigure_nagios.sh ..... as a root user but with user nagios its giving error near polkit authentication.


Please check the below output.
We gave permissions for nagios to run cron and now the output is shown below, Couldn't see pam authentication error which i used to get before.

[root@njbbngeoxp3v nagiosxi]# /usr/sbin/service nagios stop
Stopping nagios (via systemctl): [ OK ]
[root@njbbngeoxp3v nagiosxi]# /usr/sbin/service ndo2db restart
Restarting ndo2db (via systemctl): [ OK ]
[root@njbbngeoxp3v nagiosxi]# /usr/sbin/service nagios start
Starting nagios (via systemctl): [ OK ]
[root@njbbngeoxp3v nagiosxi]# /usr/bin/systemctl restart crond.service
[root@njbbngeoxp3v nagiosxi]# tail -50 /var/log/cron
Nov 7 10:14:01 njbbngeoxp3v CROND[18856]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/nom.php >> /usr/local/nagiosxi/var/nom.log 2>&1)
Nov 7 10:14:01 njbbngeoxp3v CROND[18857]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/reportengine.php >> /usr/local/nagiosxi/var/reportengine.log 2>&1)
Nov 7 10:15:01 njbbngeoxp3v CROND[30294]: (root) CMD (LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lib/mrtg/mrtg.lock --confcache-file /var/lib/mrtg/mrtg.ok)
Nov 7 10:15:02 njbbngeoxp3v CROND[30430]: (stdsmont) CMD (/opt/stdsmont/bin/checkstdsmont.pl > /dev/null 2>&1)
Nov 7 10:15:02 njbbngeoxp3v CROND[30431]: (stdsmont) CMD (/opt/stdsmont/agent/linux/proc_mon/check_hungproc.pl > /dev/null 2>&1)
Nov 7 10:15:02 njbbngeoxp3v CROND[30432]: (stdsmont) CMD (/opt/stdsmont/bin/heartbeat.pl > /dev/null 2>&1)
Nov 7 10:15:02 njbbngeoxp3v crontab[30458]: (stdsmont) LIST (stdsmont)
Nov 7 10:15:02 njbbngeoxp3v CROND[30471]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/feedproc.php >> /usr/local/nagiosxi/var/feedproc.log 2>&1)
Nov 7 10:15:02 njbbngeoxp3v CROND[30472]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/nom.php >> /usr/local/nagiosxi/var/nom.log 2>&1)
Nov 7 10:15:02 njbbngeoxp3v CROND[30470]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/perfdataproc.php >> /usr/local/nagiosxi/var/perfdataproc.log 2>&1)
Nov 7 10:15:02 njbbngeoxp3v CROND[30474]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/event_handler.php >> /usr/local/nagiosxi/var/event_handler.log 2>&1)
Nov 7 10:15:02 njbbngeoxp3v CROND[30475]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/cmdsubsys.php >> /usr/local/nagiosxi/var/cmdsubsys.log 2>&1)
Nov 7 10:15:02 njbbngeoxp3v CROND[30476]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/eventman.php >> /usr/local/nagiosxi/var/eventman.log 2>&1)
Nov 7 10:15:02 njbbngeoxp3v CROND[30477]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/sysstat.php >> /usr/local/nagiosxi/var/sysstat.log 2>&1)
Nov 7 10:15:02 njbbngeoxp3v CROND[30481]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/reportengine.php >> /usr/local/nagiosxi/var/reportengine.log 2>&1)
Nov 7 10:15:02 njbbngeoxp3v CROND[30482]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/dbmaint.php >> /usr/local/nagiosxi/var/dbmaint.log 2>&1)
Nov 7 10:15:02 njbbngeoxp3v CROND[30483]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/cleaner.php >> /usr/local/nagiosxi/var/cleaner.log 2>&1)
Nov 7 10:16:01 njbbngeoxp3v CROND[32159]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/reportengine.php >> /usr/local/nagiosxi/var/reportengine.log 2>&1)
Nov 7 10:16:01 njbbngeoxp3v CROND[32160]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/event_handler.php >> /usr/local/nagiosxi/var/event_handler.log 2>&1)
Nov 7 10:16:01 njbbngeoxp3v CROND[32161]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/sysstat.php >> /usr/local/nagiosxi/var/sysstat.log 2>&1)
Nov 7 10:16:01 njbbngeoxp3v CROND[32162]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/cleaner.php >> /usr/local/nagiosxi/var/cleaner.log 2>&1)
Nov 7 10:16:01 njbbngeoxp3v CROND[32163]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/eventman.php >> /usr/local/nagiosxi/var/eventman.log 2>&1)
Nov 7 10:16:01 njbbngeoxp3v CROND[32164]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/nom.php >> /usr/local/nagiosxi/var/nom.log 2>&1)
Nov 7 10:16:01 njbbngeoxp3v CROND[32165]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/feedproc.php >> /usr/local/nagiosxi/var/feedproc.log 2>&1)
Nov 7 10:16:01 njbbngeoxp3v CROND[32166]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/perfdataproc.php >> /usr/local/nagiosxi/var/perfdataproc.log 2>&1)
Nov 7 10:16:01 njbbngeoxp3v CROND[32168]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/cmdsubsys.php >> /usr/local/nagiosxi/var/cmdsubsys.log 2>&1)
Nov 7 10:17:01 njbbngeoxp3v CROND[32717]: (stdsmont) CMD (/opt/stdsmont/agent/linux/filesystem/checkfs.pl > /dev/null 2>&1)
Nov 7 10:17:01 njbbngeoxp3v CROND[32734]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/cleaner.php >> /usr/local/nagiosxi/var/cleaner.log 2>&1)
Nov 7 10:17:01 njbbngeoxp3v CROND[32735]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/nom.php >> /usr/local/nagiosxi/var/nom.log 2>&1)
Nov 7 10:17:01 njbbngeoxp3v CROND[32737]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/sysstat.php >> /usr/local/nagiosxi/var/sysstat.log 2>&1)
Nov 7 10:17:01 njbbngeoxp3v CROND[32736]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/cmdsubsys.php >> /usr/local/nagiosxi/var/cmdsubsys.log 2>&1)
Nov 7 10:17:01 njbbngeoxp3v CROND[32739]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/eventman.php >> /usr/local/nagiosxi/var/eventman.log 2>&1)
Nov 7 10:17:01 njbbngeoxp3v CROND[32738]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/reportengine.php >> /usr/local/nagiosxi/var/reportengine.log 2>&1)
Nov 7 10:17:01 njbbngeoxp3v CROND[32740]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/perfdataproc.php >> /usr/local/nagiosxi/var/perfdataproc.log 2>&1)
Nov 7 10:17:01 njbbngeoxp3v CROND[32748]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/event_handler.php >> /usr/local/nagiosxi/var/event_handler.log 2>&1)
Nov 7 10:17:01 njbbngeoxp3v CROND[32749]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/feedproc.php >> /usr/local/nagiosxi/var/feedproc.log 2>&1)
Nov 7 10:18:01 njbbngeoxp3v CROND[682]: (stdsmont) CMD (/opt/stdsmont/agent/linux/vmstat/checkvm.pl > /dev/null 2>&1)
Nov 7 10:18:01 njbbngeoxp3v CROND[693]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/feedproc.php >> /usr/local/nagiosxi/var/feedproc.log 2>&1)
Nov 7 10:18:01 njbbngeoxp3v CROND[696]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/reportengine.php >> /usr/local/nagiosxi/var/reportengine.log 2>&1)
Nov 7 10:18:01 njbbngeoxp3v CROND[697]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/sysstat.php >> /usr/local/nagiosxi/var/sysstat.log 2>&1)
Nov 7 10:18:01 njbbngeoxp3v CROND[698]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/nom.php >> /usr/local/nagiosxi/var/nom.log 2>&1)
Nov 7 10:18:01 njbbngeoxp3v CROND[701]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/cleaner.php >> /usr/local/nagiosxi/var/cleaner.log 2>&1)
Nov 7 10:18:01 njbbngeoxp3v CROND[702]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/cmdsubsys.php >> /usr/local/nagiosxi/var/cmdsubsys.log 2>&1)
Nov 7 10:18:01 njbbngeoxp3v CROND[705]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/eventman.php >> /usr/local/nagiosxi/var/eventman.log 2>&1)
Nov 7 10:18:01 njbbngeoxp3v CROND[706]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/perfdataproc.php >> /usr/local/nagiosxi/var/perfdataproc.log 2>&1)
Nov 7 10:18:01 njbbngeoxp3v CROND[707]: (nagios) CMD (/usr/bin/php -q /usr/local/nagiosxi/cron/event_handler.php >> /usr/local/nagiosxi/var/event_handler.log 2>&1)
Nov 7 10:18:03 njbbngeoxp3v crond[29021]: (CRON) INFO (Shutting down)
Nov 7 10:18:03 njbbngeoxp3v crond[851]: (CRON) INFO (RANDOM_DELAY will be scaled with factor 95% if used.)
Nov 7 10:18:03 njbbngeoxp3v crond[851]: (CRON) INFO (running with inotify support)
Nov 7 10:18:03 njbbngeoxp3v crond[851]: (CRON) INFO (@reboot jobs will be run at computer's startup.)

Re: Waiting for configuration verification never ends.

Posted: Wed Nov 07, 2018 11:03 am
by lmiltchev
It seems like cron jobs are running now - it's a good start!

However, the issue is only partially fixed.
I am able to execute the command /usr/local/nagiosxi/scripts/reconfigure_nagios.sh ..... as a root user but with user nagios its giving error near polkit authentication.
You should be able to run reconfigure_nagios.sh as nagios user. I am not very familiar with polkit authentication policies/rules in order to help you with that. It's out of nagios support scope anyway. You will need to find a way to allow nagios user to be able to execute this command.

Just to rule out suduers issues, can you post the /etc/sudoers file on the forum? We need to review it and make sure it hasn't been altered from the "default" in regards to nagios permissions.

Re: Waiting for configuration verification never ends.

Posted: Wed Nov 07, 2018 11:11 am
by suryakiran
Please check the below ouput.

User_Alias NAGIOSXI=nagios
User_Alias NAGIOSXIWEB=apache
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios start
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios stop
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios restart
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios reload
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios status
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios checkconfig
NAGIOSXI ALL = NOPASSWD:/etc/init.d/ndo2db start
NAGIOSXI ALL = NOPASSWD:/etc/init.d/ndo2db stop
NAGIOSXI ALL = NOPASSWD:/etc/init.d/ndo2db restart
NAGIOSXI ALL = NOPASSWD:/etc/init.d/ndo2db reload
NAGIOSXI ALL = NOPASSWD:/etc/init.d/ndo2db status
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd start
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd stop
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd restart
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd reload
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd status
NAGIOSXI ALL = NOPASSWD:/usr/bin/php /usr/local/nagiosxi/html/includes/components/autodiscovery/scripts/autodiscover_new.php *
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/html/includes/components/profile/getprofile.sh
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/upgrade_to_latest.sh
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/reconfigure_nagios.sh
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/change_timezone.sh
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/manage_services.sh *
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/reset_config_perms.sh
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/backup_xi.sh *
NAGIOSXIWEB ALL = NOPASSWD:/usr/bin/tail -100 /var/log/messages
NAGIOSXIWEB ALL = NOPASSWD:/usr/bin/tail -100 /var/log/httpd/error_log
NAGIOSXIWEB ALL = NOPASSWD:/usr/bin/tail -100 /var/log/mysqld.log
NAGIOSXIWEB ALL = NOPASSWD:/usr/bin/php /usr/local/nagiosxi/html/includes/components/autodiscovery/scripts/autodiscover_new.php *
NAGIOSXIWEB ALL = NOPASSWD:/usr/local/nagiosxi/html/includes/components/profile/getprofile.sh
NAGIOSXIWEB ALL = NOPASSWD:/etc/init.d/snmptt restart
NAGIOSXIWEB ALL = NOPASSWD:/usr/local/nagiosxi/scripts/repair_databases.sh
NAGIOSXIWEB ALL = NOPASSWD:/usr/local/nagiosxi/scripts/manage_services.sh *

root ALL=(ALL) ALL

Re: Waiting for configuration verification never ends.

Posted: Wed Nov 07, 2018 1:44 pm
by lmiltchev
The sudoers looks correct. Make sure that you also have the following line:

Code: Select all

Defaults:nagios !requiretty
You will still need to modify the polkit rules to allow nagios user to be able to execute reconfigure_nagios.sh.