Alright, I was having a bit of an issue with nagios, and didn't know if anyone had some ideas.
I'm running a nagios server (3.2) with a known-good configuration. The only problem I'm having is that I can't start the server automatically. When I try to start it in daemon mode (service nagios start) it fails. An strace reveals that it isn't allowed to write in the /var/run folder and create the file /var/run/nagios.pid.
Beyond that, if I create the file and then chown nagios.nagios, it then starts just fine (service nagios start - same command).
I didn't know if there was a better way to fix this than to add a line in the init script to create the pid file and chown it immediately before running.
By any means if there are any ideas, questions, let me know, and thank you much!
Please note, the issue is most certainly the /var/run/nagios.pid file.
PID file preventing clean startup
Re: PID file preventing clean startup
what are the permissions on the /var/run directory? They should be 755 at least on SLES and CentOS, I'm not so sure about RHEL but CentOS and RHEL are close cousins anyway so I would assume they are the same.
Did you do anything to customize the install?
Did you do anything to customize the install?
-
- Posts: 2
- Joined: Thu Oct 20, 2011 8:31 am
Re: PID file preventing clean startup
They are 755 owned by root.root
This is on RHEL5.5, and I haven't touched anything from the RPMforge RPM.
That being said, when I modified the /etc/init.d script to touch the file, change owner, and then delete on stop, it did work as expected.
This is on RHEL5.5, and I haven't touched anything from the RPMforge RPM.
That being said, when I modified the /etc/init.d script to touch the file, change owner, and then delete on stop, it did work as expected.
Re: PID file preventing clean startup
Good to see you got it working, weird that it's creating it with the wrong user though.