Page 1 of 1

Cant apply configuration in XI

Posted: Wed Jan 13, 2016 3:20 pm
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!

Re: Cant apply configuration in XI

Posted: Wed Jan 13, 2016 5:20 pm
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

Re: Cant apply configuration in XI

Posted: Wed Jan 13, 2016 6:30 pm
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!

Re: Cant apply configuration in XI

Posted: Wed Jan 13, 2016 6:54 pm
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.

Re: Cant apply configuration in XI

Posted: Thu Jan 14, 2016 9:00 am
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!

Re: Cant apply configuration in XI

Posted: Thu Jan 14, 2016 9:38 am
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

Re: Cant apply configuration in XI

Posted: Thu Jan 14, 2016 12:20 pm
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.