Unable to apply configuration.
Re: Unable to apply configuration.
Here's the output:
[root@nagios init.d]# tail -f /usr/local/nagiosxi/var/cmdsubsys.log
............................................
PROCESSED 0 COMMANDS
ESS COMMAND: CMD=17, DATA=
APPLYING NAGIOSCORE CONFIG...
CMDLINE=cd /usr/local/nagiosxi/scripts && ./reconfigure_nagios.sh
URL: http://localhost/nagiosxi/includes/components/ccm/
CMDLINE
--2015-08-28 11:53:51-- http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: `nagiosql.login'
0K .......... . 809M=0s
2015-08-28 11:53:52 (809 MB/s) - `nagiosql.login' saved [11691]
/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=sra5to' -O nagiosql.loginLOGIN SUCCESSFUL!
IMPORTING CONFIG FILES...URL: http://localhost/nagiosxi/includes/components/ccm/
Array
(
)
RESETTING PERMS
SETUID ROOT OK
URL: http://localhost/nagiosxi/includes/components/ccm/
CMDLINE
--2015-08-28 11:53:52-- http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: `nagiosql.login'
0K .......... . 786M=0s
2015-08-28 11:53:53 (786 MB/s) - `nagiosql.login' saved [11691]
/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=sra5to' -O nagiosql.loginLOGIN SUCCESSFUL!
URL: http://localhost/nagiosxi/includes/components/ccm/
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'cmd=apply&type=writeConfig' -O nagiosql.export.monitoring
--2015-08-28 11:53:53-- http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: `nagiosql.export.monitoring'
0K .......... .... 1.12G=0s
2015-08-28 11:53:54 (1.12 GB/s) - `nagiosql.export.monitoring' saved [14751]
WRITE CONFIGS SUCCESSFUL!
OUTPUT:
Nagios Core 4.0.7
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 06-03-2014
License: GPL
Reading configuration data...
Read main config file okay...
Read object config files okay...
Running pre-flight check on configuration data...
Checking objects...
Checked 385 services.
Checked 144 hosts.
Checked 11 host groups.
Checked 8 service groups.
Checked 13 contacts.
Checked 7 contact groups.
Checked 125 commands.
Checked 20 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 144 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 20 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...
Total Warnings: 0
Total Errors: 0
Things look okay - No serious problems were detected during the pre-flight check
RET: 0
/etc/init.d/nagios: line 209: /dev/null: Permission denied
Running configuration check... CONFIG ERROR! Restart aborted. Check your Nagios configuration.
OUTPUT=Running configuration check... CONFIG ERROR! Restart aborted. Check your Nagios configuration.
RETURNCODE=6
........
PROCESSED 1 COMMANDS
[root@nagios init.d]# tail -f /usr/local/nagiosxi/var/cmdsubsys.log
............................................
PROCESSED 0 COMMANDS
ESS COMMAND: CMD=17, DATA=
APPLYING NAGIOSCORE CONFIG...
CMDLINE=cd /usr/local/nagiosxi/scripts && ./reconfigure_nagios.sh
URL: http://localhost/nagiosxi/includes/components/ccm/
CMDLINE
--2015-08-28 11:53:51-- http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: `nagiosql.login'
0K .......... . 809M=0s
2015-08-28 11:53:52 (809 MB/s) - `nagiosql.login' saved [11691]
/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=sra5to' -O nagiosql.loginLOGIN SUCCESSFUL!
IMPORTING CONFIG FILES...URL: http://localhost/nagiosxi/includes/components/ccm/
Array
(
)
RESETTING PERMS
SETUID ROOT OK
URL: http://localhost/nagiosxi/includes/components/ccm/
CMDLINE
--2015-08-28 11:53:52-- http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: `nagiosql.login'
0K .......... . 786M=0s
2015-08-28 11:53:53 (786 MB/s) - `nagiosql.login' saved [11691]
/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=sra5to' -O nagiosql.loginLOGIN SUCCESSFUL!
URL: http://localhost/nagiosxi/includes/components/ccm/
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'cmd=apply&type=writeConfig' -O nagiosql.export.monitoring
--2015-08-28 11:53:53-- http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: `nagiosql.export.monitoring'
0K .......... .... 1.12G=0s
2015-08-28 11:53:54 (1.12 GB/s) - `nagiosql.export.monitoring' saved [14751]
WRITE CONFIGS SUCCESSFUL!
OUTPUT:
Nagios Core 4.0.7
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 06-03-2014
License: GPL
Reading configuration data...
Read main config file okay...
Read object config files okay...
Running pre-flight check on configuration data...
Checking objects...
Checked 385 services.
Checked 144 hosts.
Checked 11 host groups.
Checked 8 service groups.
Checked 13 contacts.
Checked 7 contact groups.
Checked 125 commands.
Checked 20 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 144 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 20 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...
Total Warnings: 0
Total Errors: 0
Things look okay - No serious problems were detected during the pre-flight check
RET: 0
/etc/init.d/nagios: line 209: /dev/null: Permission denied
Running configuration check... CONFIG ERROR! Restart aborted. Check your Nagios configuration.
OUTPUT=Running configuration check... CONFIG ERROR! Restart aborted. Check your Nagios configuration.
RETURNCODE=6
........
PROCESSED 1 COMMANDS
Re: Unable to apply configuration.
Don't apply configuration or anything in between, when an apply config fails it reverts the files back to a known working state, we want to keep the files in a bad state.
First go to Configure > Core Config Manager > Tools > Write Config Files
- Click Delete (don't worry, it's safe, they get re-written)
- Click Write
Run this command and post the full output:
Then zip up your /usr/local/nagios/etc directory and attach it here.
First go to Configure > Core Config Manager > Tools > Write Config Files
- Click Delete (don't worry, it's safe, they get re-written)
- Click Write
Run this command and post the full output:
Code: Select all
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfgRe: Unable to apply configuration.
Output:
Nagios Core 4.0.7
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 06-03-2014
License: GPL
Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Read object config files okay...
Running pre-flight check on configuration data...
Checking objects...
Checked 385 services.
Checked 144 hosts.
Checked 11 host groups.
Checked 8 service groups.
Checked 13 contacts.
Checked 7 contact groups.
Checked 125 commands.
Checked 20 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 144 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 20 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...
Total Warnings: 0
Total Errors: 0
Things look okay - No serious problems were detected during the pre-flight check
Nagios Core 4.0.7
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 06-03-2014
License: GPL
Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Read object config files okay...
Running pre-flight check on configuration data...
Checking objects...
Checked 385 services.
Checked 144 hosts.
Checked 11 host groups.
Checked 8 service groups.
Checked 13 contacts.
Checked 7 contact groups.
Checked 125 commands.
Checked 20 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 144 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 20 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...
Total Warnings: 0
Total Errors: 0
Things look okay - No serious problems were detected during the pre-flight check
You do not have the required permissions to view the files attached to this post.
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Unable to apply configuration.
Can you 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: Unable to apply configuration.
Attached is contents of sudoers file.
No /etc/sudoers.d directory exists.
No /etc/sudoers.d directory exists.
You do not have the required permissions to view the files attached to this post.
Re: Unable to apply configuration.
The sudoers looks fine.
What are the permissions on "/dev/null"?/etc/init.d/nagios: line 209: /dev/null: Permission denied
Code: Select all
ll /dev/nullBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: Unable to apply configuration.
crw-r----- 1 mysql mysql 1, 3 Aug 28 10:04 /dev/null
Re: Unable to apply configuration.
Try this:
Then:
Apply config and send us the full output.
Code: Select all
chmod 666 /dev/null
chown root.root /dev/nullCode: Select all
tail -f /usr/local/nagiosxi/var/cmdsubsys.logRe: Unable to apply configuration.
Which output do you want? What was displayed while the tail -f was going?
The configuration applied this time, and everything under the "System Ok" is green again.
I'll attach the profile if there is anything else you need to check on.
The configuration applied this time, and everything under the "System Ok" is green again.
I'll attach the profile if there is anything else you need to check on.
You do not have the required permissions to view the files attached to this post.
Re: Unable to apply configuration.
Is everything working now?
Be sure to check out our Knowledgebase for helpful articles and solutions!