Page 1 of 1

Apply config is failing

Posted: Thu Sep 03, 2020 9:50 pm
by kandatih
Environment
Nagios XI 5.7.2 - Offline install
OS - Linux 7.7

we are trying to run apply configuration through Core Config Manager and its failing.

Not sure which config is causing the issue. Could you please assist to fix this issue.


We tried this troubleshooting steps, but it didnt help to fix the issue.
=====
login to the XI GUI and go to the Core Config Manager
Under "Tools", click "Write Config Files" or if you are running a newer versions of XI, The menu is called "Config File Management"
Click on the "Write" button, then the "Delete" button then click the "Write" button and then the "Verify" button.
If you get any errors, resolve them and click on the "Delete" button, "Write", "Verify" until all of the errors are resolved.
Click the Apply Configuration link and click the "Apply Configuration" button after ALL of the errors are resolved.
=====

Re: Apply config is failing

Posted: Thu Sep 03, 2020 10:06 pm
by kandatih
Error screenshot attached

Re: Apply config is failing

Posted: Fri Sep 04, 2020 1:18 pm
by benjaminsmith
Hi @kandath,

If you went through the process, and there were no configuration errors when you selected Verify after Delete and then Write, it ought to apply the new configuration.

Run the following tail command on the subsystem log and then select Apply Congfugiuration so we can see what's causing the error. Please post the full output to the thread. Thanks.

Code: Select all

 tail -f /usr/local/nagiosxi/var/cmdsubsys.log

Re: Apply config is failing

Posted: Fri Sep 04, 2020 6:32 pm
by sparknagioshelp
Hello mate,

Output as follow.

[nagios@caplovh2a /usr/local/nagiosxi/scripts]$ tail -f /usr/local/nagiosxi/var/cmdsubsys.log
CMDLINE=php /usr/local/nagiosxi/html/includes/components/nagiosbpi/api_tool.php --cmd=syncall
CMD: syncall
MSG: BPI configuration applied successfully! BPI configuration applied successfully!
OUTPUT=MSG: BPI configuration applied successfully! BPI configuration applied successfully!
RETURNCODE=0
.......................
PROCESSED 2 COMMANDS
............................................................
PROCESSED 0 COMMANDS
............................................................
PROCESSED 0 COMMANDS
............................................................
PROCESSED 0 COMMANDS
...........................................................
PROCESSED 0 COMMANDS
......................................................PROCESSING COMMAND ID 23566...
PROCESS COMMAND: CMD=17, DATA=
APPLYING NAGIOSCORE CONFIG...
CMDLINE=cd /usr/local/nagiosxi/scripts && ./reconfigure_nagios.sh
sudo: no tty present and no askpass program specified

Resetting configuration permissions failed!
OUTPUT=Resetting configuration permissions failed!
RETURNCODE=3
PROCESSING COMMAND ID 23567...
PROCESS COMMAND: CMD=1150, DATA=remove
CMDLINE=php /usr/local/nagiosxi/html/includes/components/nagiosbpi/api_tool.php --cmd=syncall
.......CMD: syncall
MSG: BPI configuration applied successfully! BPI configuration applied successfully!
OUTPUT=MSG: BPI configuration applied successfully! BPI configuration applied successfully!
RETURNCODE=0



Even we are not abale to start System Component Status
Monitoring Engine
Performance Grapher

Please help us to fix this issue.

Re: Apply config is failing

Posted: Mon Sep 07, 2020 10:58 pm
by kandatih
Issue fixed after changing user ownership of /usr/local/nagiosxi/scripts/reconfigure_nagios.sh to nagios from root.

Re: Apply config is failing

Posted: Tue Sep 08, 2020 7:26 am
by scottwilkerson
kandatih wrote:Issue fixed after changing user ownership of /usr/local/nagiosxi/scripts/reconfigure_nagios.sh to nagios from root.
Great!

Locking thread