Could not stat() command file '/usr/local/nagios/var/rw/nagi
Could not stat() command file '/usr/local/nagios/var/rw/nagi
I am getting the following error. I am running Centos7 and Core 4.1.1.
Error: Could not stat() command file '/usr/local/nagios/var/rw/nagios.cmd'!
The external command file may be missing, Nagios may not be running, and/or Nagios may not be checking external commands.
An error occurred while attempting to commit your command for processing.
The searching I have done has said it is a permissions error. I tried a few items but no luck what so ever. Can someone point me in the correct direction
thanks
Jerry
Error: Could not stat() command file '/usr/local/nagios/var/rw/nagios.cmd'!
The external command file may be missing, Nagios may not be running, and/or Nagios may not be checking external commands.
An error occurred while attempting to commit your command for processing.
The searching I have done has said it is a permissions error. I tried a few items but no luck what so ever. Can someone point me in the correct direction
thanks
Jerry
Re: Could not stat() command file '/usr/local/nagios/var/rw/
Hi Jerry,
Can we please get the output of the following?
Check SELinux status:
Check the status of the service:
Check the configuration for errors:
Permissions:
Check log:
Check groups:
Can we please get the output of the following?
Check SELinux status:
Code: Select all
getenforceCode: Select all
systemctl status nagiosCode: Select all
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfgCode: Select all
ls -l /usr/local/nagios/var
ls -l /usr/local/nagios/var/rwCode: Select all
tail /usr/local/nagios/var/nagios.logCode: Select all
grep nag /etc/groupFormer Nagios Employee.
me.
me.
Re: Could not stat() command file '/usr/local/nagios/var/rw/
Hello
Thanks for the reply. I uploaded a file to answer commands you gave me to issue.
thanks again
Jerry
Thanks for the reply. I uploaded a file to answer commands you gave me to issue.
thanks again
Jerry
- Attachments
-
nagios.txt- (5.65 KiB) Downloaded 571 times
Re: Could not stat() command file '/usr/local/nagios/var/rw/
Can you disable SELinux and see if this changes anything?
Also, run these commands please:
Code: Select all
setenforce 0Code: Select all
usermod -G nagios nagios
usermod -G nagcmd apache
Former Nagios Employee.
me.
me.
Re: Could not stat() command file '/usr/local/nagios/var/rw/
Just after I posted the attachment . I read another article about changing the mode saying
The problem with this issue is definitely with SELinux, if you temporarily set it to permissive mode, all external commands work well
So I did it using the command you just sent. Also I changed the rights on the Nagios.cmd to 666.
It works. But When I reboot the files change back to 660 and it stops working once again. Does this make any sense
The problem with this issue is definitely with SELinux, if you temporarily set it to permissive mode, all external commands work well
So I did it using the command you just sent. Also I changed the rights on the Nagios.cmd to 666.
It works. But When I reboot the files change back to 660 and it stops working once again. Does this make any sense
Re: Could not stat() command file '/usr/local/nagios/var/rw/
What is the output of a umask command?
Former Nagios Employee.
me.
me.
Re: Could not stat() command file '/usr/local/nagios/var/rw/
in that directory I ran Umask
It replys
0022
It replys
0022
Re: Could not stat() command file '/usr/local/nagios/var/rw/
That's the output we want. Could we edit SELinux to not start upon boot?
Change SELINUX=permissive to SELINUX=disabled and reboot.
See if this fixes the issue.
Code: Select all
vi /etc/selinux/configSee if this fixes the issue.
Former Nagios Employee.
me.
me.
Re: Could not stat() command file '/usr/local/nagios/var/rw/
That did it!!! I rebooted a few time and we are good. Thanks for all you time and help
take care
Jerry
take care
Jerry
Re: Could not stat() command file '/usr/local/nagios/var/rw/
I'm glad we resolved it. SELinux is kind of a bully sometimes. I'll mark this one resolved and close it. Please let us know if there is anything else we can help you with.
Former Nagios Employee.
me.
me.