I ran an update on a CentOS server running Nagios, after the update, Nagios failed to start.
The error in the logs was:
Failed to obtain lock on file /var/run/nagios.pid: Permission denied
So, I checked and there was no pid file for Nagios in /var/run. I created one and gave it the following permissions:
-rwxr--r-- 1 nagios nagios 6 May 31 11:58 nagios.pid
Nagios then started and seems to be running normally.
The only problem is, it refuses to stop now, so I can't re-start it to add new servers and services to be monitored!
When I issue the command "service nagios stop", I get [FAILED], but nothing at all gets outputted to the log, and the service remains up.
Any ideas on how I can get the service to stop now?
I'm running the RPM version which was installed via yum from the RPMForge repositories. The server is CenotOS 5.5.