nagios 4.0.5 website cannot write to file

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
averlon
Posts: 15
Joined: Fri Dec 06, 2013 4:18 am

nagios 4.0.5 website cannot write to file

Post by averlon »

Hi,
I got the message on my nagios website:

Code: Select all

Could not open command file '/usr/local/nagios/var/rw/nagios.cmd' for update!
This happens by chance. Sometimes, sometimes not.

What could be the reason for this.
Was the same behaviour in 4.0.4.

I had to reinstall my complete server (due to other reasons).
Ubuntu 13.10
nagios 4.0.4
mysql
ndoutils
Kind Regards
Karl-Heinz
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: nagios 4.0.5 website cannot write to file

Post by slansing »

What is the output of:

Code: Select all

ls -la /usr/local/nagios/var/rw/nagios.cmd
How often does this happen? Is it after restarts of nagios?
averlon
Posts: 15
Joined: Fri Dec 06, 2013 4:18 am

Re: nagios 4.0.5 website cannot write to file

Post by averlon »

Hi,

Code: Select all

prw-rw---- 1 nagios nagios 0 Apr 14 07:27 /usr/local/nagios/var/rw/nagios.cmd
No, it is not only after restart of nagios.

But it is only a home-installation - just to get knowledge on nagios. 3 Servers to monitor. 3 Clients, Printers, Switches, ...

Nagios Server is a XEN Guest. It probably is a network issue or some performance issue on the XEN/Ubuntu Guest.
Difficult to analyse and difficult to say.
Kind Regards
Karl-Heinz
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: nagios 4.0.5 website cannot write to file

Post by scottwilkerson »

Is the user apache runs under part of the nagios group?

This is one reason I could see it happening, otherwise it is usually just if the nagios process isn't currently running.
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
averlon
Posts: 15
Joined: Fri Dec 06, 2013 4:18 am

Re: nagios 4.0.5 website cannot write to file

Post by averlon »

Hi,
yes, www-data is part of nagios group.
Kind Regards
Karl-Heinz
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: nagios 4.0.5 website cannot write to file

Post by lmiltchev »

Run the following commands and show us the output:

Code: Select all

ls -lad /usr/local/nagios/var/rw/
ps -ef | grep nagios
grep nag /etc/group
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked