Cant apply configuration in XI

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
agustin.roca
Posts: 39
Joined: Tue Apr 28, 2015 10:28 am

Cant apply configuration in XI

Post by agustin.roca »

Keeps hanged for ever. I saw another similar post but with no answers so i opened this one.

I did a reconfigure_nagios.sh and i see

Another reconfigure process is still running, sleeping...
Another reconfigure process is still running, sleeping...
Another reconfigure process is still running, sleeping...
Another reconfigure process is still running, sleeping...
Another reconfigure process is still running, sleeping...


I restarted all processess. Reboot the server and still same issue. Seems like something with the DB but really doesnt show. I enabled errors and debug in /etc/php.ini but no errors are shown.

Any hint is appreciated.
Thanks!
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Cant apply configuration in XI

Post by tgriep »

There might be a left over lock file from an another apply config. Try running the following to remove the lock file to see if that solves the issue.

Code: Select all

rm -f /usr/local/nagiosxi/scripts/reconfigure_nagios.lock
Be sure to check out our Knowledgebase for helpful articles and solutions!
agustin.roca
Posts: 39
Joined: Tue Apr 28, 2015 10:28 am

Re: Cant apply configuration in XI

Post by agustin.roca »

Hi! Now i see

Reset config permissions failed.
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.

thhen if i apply again i get the lock and waiting forever.

Tried another snaphsot and no luck

Thanks!
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Cant apply configuration in XI

Post by Box293 »

Can you run the following in an ssh session on your Nagios XI host.

Code: Select all

tail -f /usr/local/nagiosxi/var/cmdsubsys.log
Then go into XI and Apply Configurtation.

What output is produced in the SSH session? Please paste the entire output here in a code block.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
agustin.roca
Posts: 39
Joined: Tue Apr 28, 2015 10:28 am

Re: Cant apply configuration in XI

Post by agustin.roca »

Sure...

Code: Select all

tail -f /usr/local/nagiosxi/var/cmdsubsys.log
..............................................
........PROCESSING COMMAND ID 704...
PROCESS COMMAND: CMD=17, DATA=  
APPLYING NAGIOSCORE CONFIG...   
CMDLINE=cd /usr/local/nagiosxi/scripts && ./reconfigure_nagios.sh
URL: https://localhost/nagiosxi/includes/components/ccm/
CMDLINE
--2016-01-14 10:57:56--  https://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:443... connected.
WARNING: cannot verify localhost�s certificate, issued by �/C=--/ST=SomeState/L=SomeCity/O=SomeOrganization/OU=SomeOrganizationalUnit/CN=inagiosdx
u00.tx.corp.globant.com/[email protected]�:
  Self-signed certificate encountered.
    WARNING: certificate common name �inagiosdxu00.tx.corp.globant.com� doesn't match requested host name �localhost�.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html] 
Saving to: �nagiosql.login�

     0K .......... .......... .......... ........               892K=0.04s

2016-01-14 10:57:57 (892 KB/s) - �nagiosql.login� saved [38974]

/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies https://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'submit=Login&hidelog=true&loginSubmitted=true&username=nagiosxi&password=n@gweb' -O nagiosql.loginLOGIN SUCCESSFUL!
IMPORTING CONFIG FILES...URL: https://localhost/nagiosxi/includes/components/ccm/
Array
(
)
Another reconfigure process is still running, sleeping...
Thanks!
agustin.roca
Posts: 39
Joined: Tue Apr 28, 2015 10:28 am

Re: Cant apply configuration in XI

Post by agustin.roca »

FIXED!

I waited and see all the logs and found something about permissions for the user nagios. So I checked the sudoers file and add it there and all ok! Seems someone messed with the file. The error in the web interface should be clearer though.
Thanks again for the tips and pointing the right track!

Cheers!

You can close it
bwallace
Posts: 1145
Joined: Tue Nov 17, 2015 1:57 pm

Re: Cant apply configuration in XI

Post by bwallace »

Glad we were able to help. We'll lock this thread now and feel free to open another should you require assistance with anything else.
Be sure to check out the Knowledgebase for helpful articles and solutions!
Locked