Apply config fails only when renaming a host

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
nms
Posts: 222
Joined: Wed Sep 28, 2016 9:35 am

Apply config fails only when renaming a host

Post by nms »

Hi,

I have a situation where I need to rename a host.
I did this via Bulk Renaming Tool, renamed the host then went to Monitoring/Hosts and renamed the address of the hosts (so it will be mapped with the hostname given in /etc/hosts).
Once done I applied the config, but it seems it hangs.

when looking at the log (/usr/local/nagiosxi/var/cmdsubsys.log), I observed this:
Another reconfigure process is still running, sleeping...
Another reconfigure process is still running, sleeping...
500 Internal Server Error
2018-10-24 17:06:54 ERROR 500: Internal Server Error.

NAGIOSQL WRITE CONFIGS FAILED! \n
OUTPUT=NAGIOSQL WRITE CONFIGS FAILED!\n
RETURNCODE=5
I searched for the term "Another reconfigure process is still running, sleeping." which I then followed the KB https://support.nagios.com/kb/article.php?id=34

From here I did the Fixing the sudoers Entries and changed the following values from /etc/php.ini to these:
max_execution_time = 100
max_input_time = 100
memory_limit = 512M
Restarted the httpd daemon, but I still could see the same behavior in the logs. Strangely enough, this ONLY happens if I tend to rename a host.

Note that the host contains services assigned to it.

Nagios XI is version 5.4.13 running on a CentOS 6.10
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Apply config fails only when renaming a host

Post by cdienger »

It's interesting that it would only happen if you change the hostname. Have you tried changing something else like the check interval?

Run "ps aux | grep reconfigure" to check for any reconfigure_nagios scripts that may be running. It may have hung previously.

Also check for the existence of /usr/local/nagiosxi/scripts/reconfigure_nagios.lock and remove it if found.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
nms
Posts: 222
Joined: Wed Sep 28, 2016 9:35 am

Re: Apply config fails only when renaming a host

Post by nms »

Hi,

There was no lock found, however, when applying the config a lock is created (as it should be the case).
Whilst still the config is still going on, I removed the lock file, saw that it was created again, removed again and the config worked.
tried this for 3 hosts in which they all worked using this case.

What could be the reason?

Rgds,
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Apply config fails only when renaming a host

Post by npolovenko »

@nms, I could not replicate this issue. Did the configuration apply successfully when you renamed the host via Bulk Renaming Tool? And then you changed the IP address in the hosts address field and everything failed?
How many services were assigned to this host? Please run the following command to check mysql for corrupted tables:
mysqlcheck -r -f -uroot -pnagiosxi --all-databases
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked