Page 1 of 2

Apply fails - backend login to Core Config Manager failed

Posted: Wed Sep 08, 2021 1:18 pm
by Raznok
An error occurred while attempting to apply your configuration to Nagios Core. Monitroing engine configuration files have been rolled back tot heir last known good checkpoint.

Error: Contact 'cthomas' has no service notification commands defined
Error: Contact 'cthomas' has no host notification commands defined

This is the second time this has happened to me. The first time, I rolled configuration back to BEFORE cthomas user was added (and subsequently deleted in an attempt to resolve this the first time). cthomas user does not exist on the system. The roll backs to fix last time wiped out about 4 hours of configuration work.

Now, today, I have spend a good 3 hours configuring and applying and configuring and applying. I go to put through a SQL DB configuration wizard apply and I am back to this crap for a user that the system, if it had properly rolled everything back, should not even know about.

I am beyond frustrated with this buggy nonsense wasting my time. I have spend another 2 hours of today reading through forum fixes that have accomplished nothing for me.

This is a default load pretty close to out of the box and we are only dealing with 100 hosts.

Re: Apply fails - backend login to Core Config Manager faile

Posted: Wed Sep 08, 2021 3:08 pm
by ssax
I'm sorry that you're having a frustrating experience, if you have any issues in the future you can create a new post like this or create a ticket and we can help you work through them so you don't need to rollback.

One thing you can try when that occurs is:

Please go to Configure > Core Config Manager > Tools > Config File Management:
- Click the Delete Files button (don't worry, it's safe, they will be rewritten)
- Then click the Write Configs button
- Then try to apply configuration

If that doesn't resolve it, another good method to see if it could be another issue would be to do this:

Please run this tail command (and leave it running):

Code: Select all

tail -Fn0 /usr/local/nagiosxi/var/cmdsubsys.log
Then try to apply configuration through the web interface and once it fails, you can send us the errors if you have questions.

Please PM me a copy of your profile.zip, you can download it from Admin > System Profile by clicking the Download Profile button.

Re: Apply fails - backend login to Core Config Manager faile

Posted: Wed Sep 08, 2021 3:32 pm
by Raznok
Already attempted the config files option thanks to another post. No joy.

Here is the log tail from an apply attempt:

[root@RPT-Nagios etc]# tail -Fn0 /usr/local/nagiosxi/var/cmdsubsys.log
.
PROCESSED 0 COMMANDS
................PROCESSING COMMAND ID 215...
PROCESS COMMAND: CMD=17, DATA=
APPLYING NAGIOSCORE CONFIG...
CMDLINE=cd /usr/local/nagiosxi/scripts && ./reconfigure_nagios.sh
No entry for terminal type "unknown";
using dumb terminal settings.

--- reset_config_perms.sh ------------
> Setting script permissions
> Setting CCM script permissions
> Setting special script permissions
> Setting special component script permissions
> Setting migrate permissions
> Setting configuration file/directory permissions
> Setting perfdata directory and RRD permissions
> Setting libexec directory permissions
> Setting Nagios XI config permissions
> Setting NOM checkpoint user:group permissions
> + Setting Recurring Downtime file user:group permissions
> + Setting BPI configuration file user:group permissions
--------------------------------------

--- ccm_import.php -------------------
> Setting import directory: /usr/local/nagios/etc/import/
> Importing config files into the CCM
- Importing: /usr/local/nagios/etc/import/jA6TtJDG.tmp.cfg .. ERROR
Duplicate entry 'fh-sql4.int.rgpt.com-1' for key 'config_name'Entry host_name::fh-sql4.int.rgpt.com inside tbl_host could not be inserted: 1<br>
--------------------------------------

Importing into the CCM failed!
OUTPUT=Importing into the CCM failed!
RETURNCODE=2
PROCESSING COMMAND ID 216...
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
..............................................
PROCESSED 2 COMMANDS
..................................

I will look to get profile.zip downloaded and sent over to you now.

Re: Apply fails - backend login to Core Config Manager faile

Posted: Wed Sep 08, 2021 3:37 pm
by Raznok
ssax wrote: Please PM me a copy of your profile.zip, you can download it from Admin > System Profile by clicking the Download Profile button.

I am not finding the means to PM you.

Re: Apply fails - backend login to Core Config Manager faile

Posted: Thu Sep 09, 2021 12:54 pm
by pbroste
Hello @Raznok

Thanks for following up, you can find the option to the right-hand panel under the name of the poster in the thread, hit the [PM] icon. You will have the option to attach the System Profile.

Just in case here is the dealo:
  • Login to the Nagios XI GUI using a web browser.
  • Click the "Admin" > "System Profile" Menu
  • Click the "Download Profile" button
  • Save the profile.zip file and share in a private message or upload it to the post/ticket
Thanks,
Perry

Re: Apply fails - backend login to Core Config Manager faile

Posted: Mon Sep 13, 2021 2:29 pm
by ssax
Run this command and then apply configuration again:

Code: Select all

rm -rf /usr/local/nagios/etc/import/*

Re: Apply fails - backend login to Core Config Manager faile

Posted: Tue Sep 14, 2021 10:02 am
by Raznok
ssax wrote:Run this command and then apply configuration again:

Code: Select all

rm -rf /usr/local/nagios/etc/import/*

That worked. What did I just do and how did it correct it?

Also, thanks a bunch.

Re: Apply fails - backend login to Core Config Manager faile

Posted: Tue Sep 14, 2021 6:21 pm
by ssax
I'm pretty sure that it is supposed to automatically overwrite on the import so I'm not sure why that import would fail with that duplicate error anyways.

Please attach these files:

Code: Select all

/usr/local/nagiosxi/scripts/ccm_import.php
/usr/local/nagiosxi/html/includes/components/ccm/classes/import.class.php

Re: Apply fails - backend login to Core Config Manager faile

Posted: Wed Sep 15, 2021 11:30 am
by Raznok
ssax wrote:I'm pretty sure that it is supposed to automatically overwrite on the import so I'm not sure why that import would fail with that duplicate error anyways.

Please attach these files:

Code: Select all

/usr/local/nagiosxi/scripts/ccm_import.php
/usr/local/nagiosxi/html/includes/components/ccm/classes/import.class.php
System does not allow PHP so I have added TXT to the files and attached.

Re: Apply fails - backend login to Core Config Manager faile

Posted: Wed Sep 15, 2021 6:08 pm
by ssax
What is the sql_mode of your DB?

Code: Select all

mysql -uroot -pnagiosxi -e 'select @@GLOBAL.sql_mode;'
Did you have any failed XI wizard runs?