Page 1 of 1

Could not open command file '/usr/local/nagios/var/rw/nagios

Posted: Mon Dec 08, 2014 4:55 pm
by danoreilly
I've encountered this, apparently all-too-common, error. This is RHEL 6.6. However, after reading (and trying) about 10,000 articles on this, nothing has cleared up the problem. So, here is what I think the pertinent information is:

# grep nag /etc/group
nagios:x:54380:apache
nagcmd:x:54381:nagios,apache
nagiosadmin:x:54382:

# ll -d /usr/local/nagios/var/rw
drwxrwsr-x 2 nagios nagcmd 4096 Dec 8 13:27 /usr/local/nagios/var/rw
[ADMIN root@tadmin03: /usr/local/nagios/var]
# ll /usr/local/nagios/var/rw
total 0
prw-rw-rw- 1 nagios nagcmd 0 Dec 8 13:27 nagios.cmd
srw-rw---- 1 nagios nagcmd 0 Dec 8 13:27 nagios.qh
[ADMIN root@tadmin03: /usr/local/nagios/var]

HELP!!!!!!!!!!!!!!!!!!

Re: Could not open command file '/usr/local/nagios/var/rw/na

Posted: Mon Dec 08, 2014 7:05 pm
by Box293
Stop nagios:

Code: Select all

service nagios stop
When nagios is stopped what is the output of:

Code: Select all

ll /usr/local/nagios/var/rw
When nagios is stopped the nagios.cmd should not exists. If it does, delete it and then start Nagios.

Another problem can be SELinux. Is it enabled?

Code: Select all

getenforce
If it is, set it to permissive:

Code: Select all

sed -i 's/SELINUX=enforcing/SELINUX=permissive/g' /etc/selinux/config
setenforce 0