Hi All,
I have upgrading nagios from Nagios XI 2014R2.6 to Nagios XI 5.2.0 after performing the upgrade while I try Apply configuration its not working . I am getting below error.
Configuration verification failed.
Configuration error. Could not apply configuration.
Can you please help me in resolving this issue ?
Nagios XI 5.2.0 upgrade - Apply configuration not working
Nagios XI 5.2.0 upgrade - Apply configuration not working
Regards,
Ranjit W
Ranjit W
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Nagios XI 5.2.0 upgrade - Apply configuration not workin
Lets try these steps:
Go into CCM
Tools > Write Config Files
Click the Delete button (it's OK you won't lose anything)
It will say "Successfully deleted all Host / Service Config Files"
Click the Write Button
It will show an output of all the files it creates
Click the Verify button
The output should end with "Total Errors: 0"
Do you get 0 errors?
If you don't please go and resolve the highlighted problem and then perform the steps above again. For example fix the service it complains about OR disable it temporarily.
Keep repeating these steps until it verifies OK.
Go into CCM
Tools > Write Config Files
Click the Delete button (it's OK you won't lose anything)
It will say "Successfully deleted all Host / Service Config Files"
Click the Write Button
It will show an output of all the files it creates
Click the Verify button
The output should end with "Total Errors: 0"
Do you get 0 errors?
If you don't please go and resolve the highlighted problem and then perform the steps above again. For example fix the service it complains about OR disable it temporarily.
Keep repeating these steps until it verifies OK.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Nagios XI 5.2.0 upgrade - Apply configuration not workin
Hi Box293,
After following the steps you mentioned I got errors as zero but when I click Apply configuration its just loading .
Waiting for configuration verification..............................................................................................
After following the steps you mentioned I got errors as zero but when I click Apply configuration its just loading .
Waiting for configuration verification..............................................................................................
Regards,
Ranjit W
Ranjit W
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Nagios XI 5.2.0 upgrade - Apply configuration not workin
Can you run the following in an ssh session on your Nagios XI host.
Then go into CCM and Apply Configuration.
What output is produced in the SSH session?
Code: Select all
tail -f /usr/local/nagiosxi/var/cmdsubsys.logWhat output is produced in the SSH session?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Nagios XI 5.2.0 upgrade - Apply configuration not workin
Hi ,
Below is the output.
tail -f /usr/local/nagiosxi/var/cmdsubsys.log
...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...
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...
Another reconfigure process is still running, sleeping...
Another reconfigure process is still running, sleeping...
Another reconfigure process is still running, sleeping...
Below is the output.
tail -f /usr/local/nagiosxi/var/cmdsubsys.log
...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...
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...
Another reconfigure process is still running, sleeping...
Another reconfigure process is still running, sleeping...
Another reconfigure process is still running, sleeping...
Regards,
Ranjit W
Ranjit W
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Nagios XI 5.2.0 upgrade - Apply configuration not workin
Have a look in the directory /usr/local/nagiosxi/var/
There should be a temporary lock file in this directory which is making it think another reconfigure is running. I can't remember the name of the file off the top of my head but once you find it and delete it you then should be able to Apply Config.
Let us know how you go.
There should be a temporary lock file in this directory which is making it think another reconfigure is running. I can't remember the name of the file off the top of my head but once you find it and delete it you then should be able to Apply Config.
Let us know how you go.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Nagios XI 5.2.0 upgrade - Apply configuration not workin
Hi ,
I removed reconfigure_nagios.lock file located under /usr/local/nagiosxi/scripts and tired apply configuration for which I got below :
tail -f /usr/local/nagiosxi/var/cmdsubsys.log
................................................
PROCESSED 0 COMMANDS
tail: /usr/local/nagiosxi/var/cmdsubsys.log: file truncated
.
PROCESSED 0 COMMANDS
=17, DATA=
APPLYING NAGIOSCORE CONFIG...
CMDLINE=cd /usr/local/nagiosxi/scripts && ./reconfigure_nagios.sh
URL: http://localhost/nagiosxi/includes/components/ccm/
CMDLINE
--2015-10-19 08:22:35-- http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: `nagiosql.login'
0K .......... .......... .......... ....... 1.99M=0.02s
2015-10-19 08:22:35 (1.99 MB/s) - `nagiosql.login' saved [37974]
/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies http://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: http://localhost/nagiosxi/includes/components/ccm/
Array
(
[0] => x.cfg
)
IMPORTING /usr/local/nagios/etc/import/mlctstap003.fr.world.socgen.cfg
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'cmd=admin&type=import&importsubmitted=true&chbOverwrite=1&subForm=Import&selImportFile[]=/usr/local/nagios/etc/import/mlctstap003.fr.world.socgen.cfg' -O nagiosql.import.monitoring
--2015-10-19 08:22:35-- http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: `nagiosql.import.monitoring'
0K .......... ...... 100K=0.2s
2015-10-19 08:22:36 (100 KB/s) - `nagiosql.import.monitoring' saved [17398]
sudo: no tty present and no askpass program specified
RESETTING CONFIG PERMS FAILED!\n
OUTPUT=RESETTING CONFIG PERMS FAILED!\n
RETURNCODE=4
.........................
PROCESSED 1 COMMANDS
tail: /usr/local/nagiosxi/var/cmdsubsys.log: file truncated
...............................
In nagios GUI I got Configuration verification failed.
Configuration error. Could not apply configuration.
Where as verify configuration in the CCM page shows me 0 errors .
I removed reconfigure_nagios.lock file located under /usr/local/nagiosxi/scripts and tired apply configuration for which I got below :
tail -f /usr/local/nagiosxi/var/cmdsubsys.log
................................................
PROCESSED 0 COMMANDS
tail: /usr/local/nagiosxi/var/cmdsubsys.log: file truncated
.
PROCESSED 0 COMMANDS
=17, DATA=
APPLYING NAGIOSCORE CONFIG...
CMDLINE=cd /usr/local/nagiosxi/scripts && ./reconfigure_nagios.sh
URL: http://localhost/nagiosxi/includes/components/ccm/
CMDLINE
--2015-10-19 08:22:35-- http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: `nagiosql.login'
0K .......... .......... .......... ....... 1.99M=0.02s
2015-10-19 08:22:35 (1.99 MB/s) - `nagiosql.login' saved [37974]
/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies http://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: http://localhost/nagiosxi/includes/components/ccm/
Array
(
[0] => x.cfg
)
IMPORTING /usr/local/nagios/etc/import/mlctstap003.fr.world.socgen.cfg
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'cmd=admin&type=import&importsubmitted=true&chbOverwrite=1&subForm=Import&selImportFile[]=/usr/local/nagios/etc/import/mlctstap003.fr.world.socgen.cfg' -O nagiosql.import.monitoring
--2015-10-19 08:22:35-- http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: `nagiosql.import.monitoring'
0K .......... ...... 100K=0.2s
2015-10-19 08:22:36 (100 KB/s) - `nagiosql.import.monitoring' saved [17398]
sudo: no tty present and no askpass program specified
RESETTING CONFIG PERMS FAILED!\n
OUTPUT=RESETTING CONFIG PERMS FAILED!\n
RETURNCODE=4
.........................
PROCESSED 1 COMMANDS
tail: /usr/local/nagiosxi/var/cmdsubsys.log: file truncated
...............................
In nagios GUI I got Configuration verification failed.
Configuration error. Could not apply configuration.
Where as verify configuration in the CCM page shows me 0 errors .
Regards,
Ranjit W
Ranjit W
Re: Nagios XI 5.2.0 upgrade - Apply configuration not workin
Can you login to a shell on the XI system and run the following and post the output?
Thanks
Code: Select all
cd /usr/local/nagiosxi/scripts
su nagios
./reconfigure_nagios.shBe sure to check out our Knowledgebase for helpful articles and solutions!
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Nagios XI 5.2.0 upgrade - Apply configuration not workin
As well as what @tgriep has requested, can you please upload the file:
/etc/sudoers
Also, any files in /etc/sudoers.d/
/etc/sudoers
Also, any files in /etc/sudoers.d/
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Nagios XI 5.2.0 upgrade - Apply configuration not workin
Hi ,
Below is the content of /etc/sudoers file :
User_Alias NAGIOSXI=nagios
User_Alias NAGIOSXIWEB=apache
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios start, /etc/init.d/nagios stop, /etc/init.d/nagios restart, /etc/init.d/nagios reload, /etc/init.d/nagios status, /etc/init.d/nagios checkconfig, /etc/init.d/ndo2db start, /etc/init.d/ndo2db stop, /etc/init.d/ndo2db restart, /etc/init.d/ndo2db reload, /etc/init.d/ndo2db status, /etc/init.d/npcd start, /etc/init.d/npcd stop, /etc/init.d/npcd restart, /etc/init.d/npcd reload, /etc/init.d/npcd status, /usr/bin/nmap *, /usr/local/nagiosxi/scripts/upgrade_to_latest.sh, /usr/local/nagiosxi/scripts/change_timezone.sh, /usr/local/nagiosxi/scripts/manage_services.sh *
NAGIOSXIWEB ALL = NOPASSWD:/usr/bin/tail -100 /var/log/messages, /usr/bin/tail -100 /var/log/httpd/error_log, /usr/bin/tail -100 /var/log/mysqld.log, /usr/bin/nmap *, /etc/init.d/snmptt restart, /usr/local/nagiosxi/scripts/repair_databases.sh, /usr/local/nagiosxi/scripts/manage_services.sh *
cd /usr/local/nagiosxi/scripts
su nagios
./reconfigure_nagios.sh
When I run the above commands it prompting me for password and not going further :
$ ./reconfigure_nagios.sh
URL: http://localhost/nagiosxi/includes/components/ccm/
CMDLINE
/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'submit=Login&hidelog=true&loginSubmitted=true&username=nagiosxi&password=more@123' -O nagiosql.login--2015-10-20 07:52:00-- http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: `nagiosql.login'
[ <=> ] 37,976 --.-K/s in 0.02s
2015-10-20 07:52:00 (2.13 MB/s) - `nagiosql.login' saved [37976]
LOGIN SUCCESSFUL!
IMPORTING CONFIG FILES...URL: http://localhost/nagiosxi/includes/components/ccm/
Array
(
)
Please enter your Windows password:
Account cannot be accessed at this time.
Please contact your system administrator.
Sorry, try again.
Below is the content of /etc/sudoers file :
User_Alias NAGIOSXI=nagios
User_Alias NAGIOSXIWEB=apache
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios start, /etc/init.d/nagios stop, /etc/init.d/nagios restart, /etc/init.d/nagios reload, /etc/init.d/nagios status, /etc/init.d/nagios checkconfig, /etc/init.d/ndo2db start, /etc/init.d/ndo2db stop, /etc/init.d/ndo2db restart, /etc/init.d/ndo2db reload, /etc/init.d/ndo2db status, /etc/init.d/npcd start, /etc/init.d/npcd stop, /etc/init.d/npcd restart, /etc/init.d/npcd reload, /etc/init.d/npcd status, /usr/bin/nmap *, /usr/local/nagiosxi/scripts/upgrade_to_latest.sh, /usr/local/nagiosxi/scripts/change_timezone.sh, /usr/local/nagiosxi/scripts/manage_services.sh *
NAGIOSXIWEB ALL = NOPASSWD:/usr/bin/tail -100 /var/log/messages, /usr/bin/tail -100 /var/log/httpd/error_log, /usr/bin/tail -100 /var/log/mysqld.log, /usr/bin/nmap *, /etc/init.d/snmptt restart, /usr/local/nagiosxi/scripts/repair_databases.sh, /usr/local/nagiosxi/scripts/manage_services.sh *
cd /usr/local/nagiosxi/scripts
su nagios
./reconfigure_nagios.sh
When I run the above commands it prompting me for password and not going further :
$ ./reconfigure_nagios.sh
URL: http://localhost/nagiosxi/includes/components/ccm/
CMDLINE
/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'submit=Login&hidelog=true&loginSubmitted=true&username=nagiosxi&password=more@123' -O nagiosql.login--2015-10-20 07:52:00-- http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: `nagiosql.login'
[ <=> ] 37,976 --.-K/s in 0.02s
2015-10-20 07:52:00 (2.13 MB/s) - `nagiosql.login' saved [37976]
LOGIN SUCCESSFUL!
IMPORTING CONFIG FILES...URL: http://localhost/nagiosxi/includes/components/ccm/
Array
(
)
Please enter your Windows password:
Account cannot be accessed at this time.
Please contact your system administrator.
Sorry, try again.
Regards,
Ranjit W
Ranjit W