Page 1 of 4

Error code: 9.

Posted: Wed Jun 27, 2018 3:34 am
by habuhejleh
Dear ,

We are facing problem in our Nagios XI version when we apply the configuration it takes long time verifying then give the below error:

There was an error while attempting to apply configuration. Error code: 9.

An error occurred while attempting to apply your configuration to Nagios Core. Monitoring engine configuration files have been rolled back to their last known good checkpoint.


Our Nagios XI version is 5.4.12 and it is installed on VM.

Please advise ASAP.

Best regards,
Haitham

Re: Error code: 9.

Posted: Wed Jun 27, 2018 11:58 am
by npolovenko
Hello, @habuhejleh. In XI web interface please go to Configure -> Core Configurations Manager, then click on Tools -> Config File Management in the left column. Then perform the following actions in order:

Code: Select all

1)Write
2)Delete
3)Write
4)Verify
Please post any errors after clicking the "Verify" button.

Re: Error code: 9.

Posted: Thu Jun 28, 2018 2:03 am
by habuhejleh
Hello ,
I did and I get the below verification result in the attachment:
Verification

and when I do apply configuration it takes long time (10 minutes) then gives me he below error in the attached:
Apply config Error

Please advise ASAP.

Thank you,
Haitham

Re: Error code: 9.

Posted: Thu Jun 28, 2018 10:32 am
by npolovenko
@habuhejleh, Please establish SSH session to the Nagios console. Switch to the nagios user:

Code: Select all

su - nagios
And run the following script as nagios user:

Code: Select all

/usr/local/nagiosxi/scripts/reconfigure_nagios.sh
Please let me know of the output.

Re: Error code: 9.

Posted: Tue Jul 03, 2018 6:25 am
by habuhejleh
We got the below error after executing the command:
RESETTING CONFIG PERMS FAILED!\n


Also you can see failures in the GUI as attached. Please advise asap.

Re: Error code: 9.

Posted: Tue Jul 03, 2018 10:37 am
by scottwilkerson
From that screenshot I can see there are database errors, please run these steps
https://assets.nagios.com/downloads/nag ... tabase.pdf

then, also return the results of

Code: Select all

getenforce
grep NAGIOS /etc/sudoers

Re: Error code: 9.

Posted: Wed Jul 04, 2018 4:06 am
by habuhejleh
Databases were repaired by the script.
Here is the output of the commands you requested:
[nagiosadmin@um-isp-nagios-redline ~]$ getenforce
Disabled
[nagiosadmin@um-isp-nagios-redline ~]$ grep NAGIOS /etc/sudoers
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/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 *
[nagiosadmin@um-isp-nagios-redline ~]$

We are still having the same problem when applying the configuration, it takes 10 minutes in verifying the configuration then gives the below error:
here was an error while attempting to apply configuration. Error code: 9.
An error occurred while attempting to apply your configuration to Nagios Core. Monitoring engine configuration files have been rolled back to their last known good checkpoint.

Please advise how to solve this problem asap

Re: Error code: 9.

Posted: Thu Jul 05, 2018 7:23 am
by habuhejleh
Please advise...

Re: Error code: 9.

Posted: Thu Jul 05, 2018 1:27 pm
by scottwilkerson
Please send a copy of profile.zip from Admin -> System Profile

Thanks!

Re: Error code: 9.

Posted: Fri Jul 06, 2018 2:01 pm
by habuhejleh
Done. Please advise.