PID file preventing clean startup
Posted: Thu Oct 20, 2011 8:40 am
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.
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.